List game & server version when starting server (#1181)

* When the server starts, it now outputs the game and server version. Too dumb to not hardcode it - sorry!

* ...

* sorry i dropped my spaghetti, I'll help clean that

* Doing simple stuff: now without hardcoding!

* Restored Git hash functionality

* Fixed other languages and made the output more useful.

* Forgot this file lol
This commit is contained in:
AZ 2022-06-04 09:41:18 +00:00 committed by GitHub
parent e6fa00e55d
commit d4bb7c95b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 4 deletions

View File

@ -102,6 +102,8 @@ public final class Grasscutter {
// Initialize server. // Initialize server.
Grasscutter.getLogger().info(translate("messages.status.starting")); Grasscutter.getLogger().info(translate("messages.status.starting"));
Grasscutter.getLogger().info(translate("messages.status.game_version", GameConstants.VERSION));
Grasscutter.getLogger().info(translate("messages.status.version", BuildConfig.VERSION, BuildConfig.GIT_HASH));
// Load all resources. // Load all resources.
Grasscutter.updateDayOfWeek(); Grasscutter.updateDayOfWeek();

View File

@ -27,6 +27,7 @@ import emu.grasscutter.server.event.game.ServerTickEvent;
import emu.grasscutter.server.event.internal.ServerStartEvent; import emu.grasscutter.server.event.internal.ServerStartEvent;
import emu.grasscutter.server.event.internal.ServerStopEvent; import emu.grasscutter.server.event.internal.ServerStopEvent;
import emu.grasscutter.task.TaskMap; import emu.grasscutter.task.TaskMap;
import emu.grasscutter.BuildConfig;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;

View File

@ -52,7 +52,8 @@
"run_mode_help": "Server run mode must be 'HYBRID', 'DISPATCH_ONLY', or 'GAME_ONLY'. Unable to start Grasscutter...", "run_mode_help": "Server run mode must be 'HYBRID', 'DISPATCH_ONLY', or 'GAME_ONLY'. Unable to start Grasscutter...",
"create_resources": "Creating resources folder...", "create_resources": "Creating resources folder...",
"resources_error": "Place a copy of 'BinOutput' and 'ExcelBinOutput' in the resources folder.", "resources_error": "Place a copy of 'BinOutput' and 'ExcelBinOutput' in the resources folder.",
"version": "Grasscutter version: %s-%s" "version": "Grasscutter version: %s-%s",
"game_version": "Game version: %s"
} }
}, },
"commands": { "commands": {

View File

@ -48,7 +48,8 @@
"run_mode_help": "Tryb pracy serwera musi być ustawiony na 'HYBRID', 'DISPATCH_ONLY', lub 'GAME_ONLY'. Nie można wystartować Grasscutter...", "run_mode_help": "Tryb pracy serwera musi być ustawiony na 'HYBRID', 'DISPATCH_ONLY', lub 'GAME_ONLY'. Nie można wystartować Grasscutter...",
"create_resources": "Tworzenie folderu resources...", "create_resources": "Tworzenie folderu resources...",
"resources_error": "Umieść kopię 'BinOutput' i 'ExcelBinOutput' w folderze resources.", "resources_error": "Umieść kopię 'BinOutput' i 'ExcelBinOutput' w folderze resources.",
"version": "Grasscutter versión: %s-%s" "version": "Grasscutter versión: %s-%s",
"game_version": "Game versión: %s"
} }
}, },
"commands": { "commands": {

View File

@ -52,7 +52,8 @@
"run_mode_help": "服务器运行模式必须为 'HYBRID'(混合)、'DISPATCH_ONLY'(仅 Dispatch) 或 'GAME_ONLY'(仅游戏)。Grasscutter 启动失败...", "run_mode_help": "服务器运行模式必须为 'HYBRID'(混合)、'DISPATCH_ONLY'(仅 Dispatch) 或 'GAME_ONLY'(仅游戏)。Grasscutter 启动失败...",
"create_resources": "正在创建 resources 目录...", "create_resources": "正在创建 resources 目录...",
"resources_error": "请将 BinOutput 和 ExcelBinOutput 复制到 resources 目录。", "resources_error": "请将 BinOutput 和 ExcelBinOutput 复制到 resources 目录。",
"version": "Grasscutter 版本:%s-%s" "version": "Grasscutter 版本:%s-%s",
"game_version": "游戏版本: %s"
} }
}, },
"commands": { "commands": {

View File

@ -52,7 +52,8 @@
"run_mode_help": "伺服器運行模式必須為 HYBRID 或者 DISPATCH_ONLY 或者 GAME_ONLY。Grasscutter 啟動失敗...", "run_mode_help": "伺服器運行模式必須為 HYBRID 或者 DISPATCH_ONLY 或者 GAME_ONLY。Grasscutter 啟動失敗...",
"create_resources": "正在建立 resources 資料夾...", "create_resources": "正在建立 resources 資料夾...",
"resources_error": "請將 BinOutput 和 ExcelBinOutput 複製到 resources 資料夾。", "resources_error": "請將 BinOutput 和 ExcelBinOutput 複製到 resources 資料夾。",
"version": "Grasscutter版本 %s-%s" "version": "Grasscutter版本 %s-%s",
"game_version": "游戏版本: %s"
} }
}, },
"commands": { "commands": {