Check for custom server resources

This commit is contained in:
KingRainbow44 2023-04-18 17:43:10 -04:00
parent ee298235c2
commit de19116191
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE
12 changed files with 154 additions and 98 deletions

View File

@ -172,7 +172,7 @@ public final class Utils {
public static void startupCheck() {
ConfigContainer config = Grasscutter.getConfig();
Logger logger = Grasscutter.getLogger();
boolean exit = false;
boolean exit = false, custom = false;
String dataFolder = config.folderStructure.data;
@ -198,6 +198,22 @@ public final class Utils {
// resources
DataLoader.checkAllFiles();
// Check for Server resources.
if (!Files.exists(getResourcePath("Server"))) {
logger.info(translate("messages.status.resources.missing_server"));
custom = true;
}
// Check for ScriptSceneData.
if (!Files.exists(getResourcePath("ScriptSceneData"))) {
logger.info(translate("messages.status.resources.missing_scenes"));
custom = true;
}
// Log message if custom resources are missing.
if (custom) logger.info(translate("messages.status.resources.custom"));
// Exit if there are any missing files.
if (exit) System.exit(1);
}

View File

@ -63,7 +63,10 @@
"game_version": "Game version: %s",
"resources": {
"loading": "Loading resources...",
"finish": "Finished loading resources."
"finish": "Finished loading resources.",
"custom": "Find additional resources at: 'Anime-Game-Servers/CustomGCResources'.",
"missing_server": "To fully use questing, it is recommended to add the 'Server' folder.",
"missing_scenes": "To fully use questing, it is recommended to add the 'ScriptSceneData' folder."
}
}
},

View File

@ -63,7 +63,10 @@
"game_version": "Versión del juego: %s",
"resources": {
"loading": "Cargando recursos...",
"finish": "Ha finalizado la carga de recursos."
"finish": "Ha finalizado la carga de recursos.",
"custom": "🇺🇸Find additional resources at: 'Anime-Game-Servers/CustomGCResources'.",
"missing_server": "🇺🇸To fully use questing, it is recommended to add the 'Server' folder.",
"missing_scenes": "🇺🇸To fully use questing, it is recommended to add the 'ScriptSceneData' folder."
}
}
},
@ -236,7 +239,7 @@
"not_found": "Misión no encontrada.",
"invalid_id": "ID de misión inválido.",
"description": "Añade o finaliza misiones",
"enabled": "Questing enabled."
"enabled": "🇺🇸Questing enabled."
},
"group": {
"invalid_groupid": "ID de grupo invalida.",
@ -249,7 +252,7 @@
"description": "Reproduce una escena"
},
"sound": {
"description": "Plays a sound"
"description": "🇺🇸Plays a sound"
},
"reload": {
"reload_start": "Recargando configuración.",
@ -365,7 +368,7 @@
"trialAvatarActivity": {
"description": "Manipular las funcionalidades de la Actividad de Avatar de Prueba. Esto incluye alternar estados de mazmorra y recompensa.",
"not_found": "No se encontraron los datos del jugador de la actividad del avatar de prueba. Quizás la actividad no esté habilitada.",
"invalid_param": "Invalid parameter.",
"invalid_param": "🇺🇸Invalid parameter.",
"schedule_not_found": "Horario %s no encontrado.",
"success_schedule": "Cambió la identificación del horario a %s.",
"success_dungeon": "Se alteró el estado de la mazmorra del avatar %s.",
@ -409,23 +412,23 @@
},
"documentation": {
"handbook": {
"title": "GM Handbook",
"title": "🇺🇸GM Handbook",
"title_commands": "Comandos",
"title_avatars": "Avatares",
"title_items": "Objetos",
"title_scenes": "Escenario",
"title_monsters": "Monstruos",
"header_id": "Id",
"header_id": "🇺🇸Id",
"header_command": "Comando",
"header_description": "Descripción",
"header_avatar": "Avatar",
"header_avatar": "🇺🇸Avatar",
"header_item": "Objeto",
"header_scene": "Escenario",
"header_monster": "Monstruo"
},
"index": {
"title": "Documentación",
"handbook": "GM Handbook",
"handbook": "🇺🇸GM Handbook",
"gacha_mapping": "JSON de mapeo del Gacha"
}
},

View File

@ -63,7 +63,10 @@
"game_version": "Version du jeu: %s",
"resources": {
"loading": "Chargement des ressources...",
"finish": "Chargement des ressources terminé."
"finish": "Chargement des ressources terminé.",
"custom": "🇺🇸Find additional resources at: 'Anime-Game-Servers/CustomGCResources'.",
"missing_server": "🇺🇸To fully use questing, it is recommended to add the 'Server' folder.",
"missing_scenes": "🇺🇸To fully use questing, it is recommended to add the 'ScriptSceneData' folder."
}
}
},
@ -239,17 +242,17 @@
"enabled": "Quêtes activées."
},
"group": {
"invalid_groupid": "Invalid group ID.",
"invalid_suiteid": "Invalid suite ID.",
"group_not_found": "Group not found.",
"description": "Alter group loading",
"refreshed": "Group %s refreshed."
"invalid_groupid": "🇺🇸Invalid group ID.",
"invalid_suiteid": "🇺🇸Invalid suite ID.",
"group_not_found": "🇺🇸Group not found.",
"description": "🇺🇸Alter group loading",
"refreshed": "🇺🇸Group %s refreshed."
},
"cutscene": {
"description": "Joue une cinématique"
},
"sound": {
"description": "Plays a sound"
"description": "🇺🇸Plays a sound"
},
"reload": {
"reload_start": "Rechargement de la configuration.",
@ -424,9 +427,9 @@
"header_monster": "Monstre"
},
"index": {
"title": "Documentation",
"title": "🇺🇸Documentation",
"handbook": "Manuel GM",
"gacha_mapping": "Gacha mapping JSON"
"gacha_mapping": "🇺🇸Gacha mapping JSON"
}
},
"plugin": {

View File

@ -1,7 +1,7 @@
{
"messages": {
"game": {
"address_bind": "Server di gioco avviato su \u001B[1m\u001B[33m%s:%s\u001B[0m",
"address_bind": "Server di gioco avviato su \u001b[1m\u001b[33m%s:%s\u001b[0m",
"port_bind": "Server di gioco avviato sulla porta %s",
"connect": "Client connesso da %s",
"disconnect": "Client disconnesso da %s",
@ -9,7 +9,7 @@
"command_error": "Errore comando:"
},
"dispatch": {
"address_bind": "[Dispatch] Dispatch server avviato su \u001B[1m\u001B[33m%s:%s\u001B[0m",
"address_bind": "[Dispatch] Dispatch server avviato su \u001b[1m\u001b[33m%s:%s\u001b[0m",
"port_bind": "[Dispatch] Dispatch server avviato sulla porta %s",
"request": "[Dispatch] Client %s %s richiesta: %s",
"keystore": {
@ -63,7 +63,10 @@
"game_version": "Versione del gioco: %s",
"resources": {
"loading": "Caricamento risorse...",
"finish": "Terminato il caricamento delle risorse."
"finish": "Terminato il caricamento delle risorse.",
"custom": "🇺🇸Find additional resources at: 'Anime-Game-Servers/CustomGCResources'.",
"missing_server": "🇺🇸To fully use questing, it is recommended to add the 'Server' folder.",
"missing_scenes": "🇺🇸To fully use questing, it is recommended to add the 'ScriptSceneData' folder."
}
}
},
@ -84,6 +87,7 @@
"artifactId": "ID artefatto non valido.",
"avatarId": "ID avatar non valido.",
"avatarLevel": "Livello avatar non valido.",
"cfgId": "🇺🇸Invalid cfg ID.",
"entityId": "ID entità non valido.",
"itemId": "ID articolo non valido.",
"itemLevel": "ItemLevel non valido.",
@ -166,6 +170,10 @@
"in_dungeon_error": "Sei già in quel dungeon.",
"description": "Entra in un dungeon"
},
"entity": {
"description": "🇺🇸Modify an existing entity's properties",
"not_found_error": "🇺🇸Entity does not exist"
},
"give": {
"usage_relic": "Utilizzo: fornire <artifactID> [mainPropID] [<appendPropID>[,<times>]]... [lv<livello 0-20>]",
"illegal_relic": "Questo ID artefatto appartiene a un intervallo nella blacklist, potrebbe non essere quello che volevi.",
@ -230,20 +238,21 @@
"finished": "Missione completata %s.",
"not_found": "Missione non trovata.",
"invalid_id": "ID missione non valido.",
"description": "Aggiungi o completa missioni"
"description": "Aggiungi o completa missioni",
"enabled": "🇺🇸Questing enabled."
},
"group": {
"invalid_groupid": "Invalid group ID.",
"invalid_suiteid": "Invalid suite ID.",
"group_not_found": "Group not found.",
"description": "Alter group loading",
"refreshed": "Group %s refreshed."
"invalid_groupid": "🇺🇸Invalid group ID.",
"invalid_suiteid": "🇺🇸Invalid suite ID.",
"group_not_found": "🇺🇸Group not found.",
"description": "🇺🇸Alter group loading",
"refreshed": "🇺🇸Group %s refreshed."
},
"cutscene": {
"description": "Riproduce un filmato"
},
"sound": {
"description": "Plays a sound"
"description": "🇺🇸Plays a sound"
},
"reload": {
"reload_start": "Ricarica configurazione.",
@ -396,7 +405,7 @@
"available_three_stars": "Articoli a 3 stelle disponibili"
},
"records": {
"title": "Gacha Records",
"title": "🇺🇸Gacha Records",
"date": "Data",
"item": "oggetto"
}
@ -412,7 +421,7 @@
"header_id": "ID",
"header_command": "Comando",
"header_description": "Descrizione",
"header_avatar": "Avatar",
"header_avatar": "🇺🇸Avatar",
"header_item": "Articolo",
"header_scene": "Scena",
"header_monster": "Mostro"

View File

@ -63,7 +63,10 @@
"game_version": "ゲームバージョン: %s",
"resources": {
"loading": "resourcesファイルをロード中...",
"finish": "resourcesファイルのロードが完了。"
"finish": "resourcesファイルのロードが完了。",
"custom": "🇺🇸Find additional resources at: 'Anime-Game-Servers/CustomGCResources'.",
"missing_server": "🇺🇸To fully use questing, it is recommended to add the 'Server' folder.",
"missing_scenes": "🇺🇸To fully use questing, it is recommended to add the 'ScriptSceneData' folder."
}
}
},
@ -84,6 +87,7 @@
"artifactId": "聖遺物IDが無効な値です。",
"avatarId": "キャラIDが無効な値です。",
"avatarLevel": "キャラレベルが無効な値です。",
"cfgId": "🇺🇸Invalid cfg ID.",
"entityId": "エンティティIDが無効な値です。",
"itemId": "アイテムIDが無効な値です。",
"itemLevel": "アイテムレベルが無効な値です。",
@ -235,20 +239,20 @@
"not_found": "クエストが見つかりません。",
"invalid_id": "クエストIDが無効です。",
"description": "クエストを追加または終了します。",
"enabled": "Questing enabled."
"enabled": "🇺🇸Questing enabled."
},
"group": {
"invalid_groupid": "Invalid group ID.",
"invalid_suiteid": "Invalid suite ID.",
"group_not_found": "Group not found.",
"description": "Alter group loading",
"refreshed": "Group %s refreshed."
"invalid_groupid": "🇺🇸Invalid group ID.",
"invalid_suiteid": "🇺🇸Invalid suite ID.",
"group_not_found": "🇺🇸Group not found.",
"description": "🇺🇸Alter group loading",
"refreshed": "🇺🇸Group %s refreshed."
},
"cutscene": {
"description": "カットシーンを再生します"
},
"sound": {
"description": "Plays a sound"
"description": "🇺🇸Plays a sound"
},
"reload": {
"reload_start": "設定を再読み込みしています。",
@ -408,7 +412,7 @@
},
"documentation": {
"handbook": {
"title": "GM Handbook",
"title": "🇺🇸GM Handbook",
"title_commands": "コマンド",
"title_avatars": "キャラ",
"title_items": "アイテム",
@ -424,7 +428,7 @@
},
"index": {
"title": "ドキュメント",
"handbook": "GM Handbook",
"handbook": "🇺🇸GM Handbook",
"gacha_mapping": "ガチャマップ JSON"
}
},

View File

@ -63,7 +63,10 @@
"game_version": "게임 버전: %s",
"resources": {
"loading": "리소스 로딩중...",
"finish": "리소스 로딩완료."
"finish": "리소스 로딩완료.",
"custom": "🇺🇸Find additional resources at: 'Anime-Game-Servers/CustomGCResources'.",
"missing_server": "🇺🇸To fully use questing, it is recommended to add the 'Server' folder.",
"missing_scenes": "🇺🇸To fully use questing, it is recommended to add the 'ScriptSceneData' folder."
}
}
},
@ -239,17 +242,17 @@
"enabled": "🇺🇸Questing enabled."
},
"group": {
"invalid_groupid": "Invalid group ID.",
"invalid_suiteid": "Invalid suite ID.",
"group_not_found": "Group not found.",
"description": "Alter group loading",
"refreshed": "Group %s refreshed."
"invalid_groupid": "🇺🇸Invalid group ID.",
"invalid_suiteid": "🇺🇸Invalid suite ID.",
"group_not_found": "🇺🇸Group not found.",
"description": "🇺🇸Alter group loading",
"refreshed": "🇺🇸Group %s refreshed."
},
"cutscene": {
"description": "Plays a cutscene"
"description": "🇺🇸Plays a cutscene"
},
"sound": {
"description": "Plays a sound"
"description": "🇺🇸Plays a sound"
},
"reload": {
"reload_start": "구성 설정을 다시 불러오는중...",
@ -281,10 +284,10 @@
"set_message_sender": "메세지 발송자가 '%s'으로 설정되었습니다.\n계속하려면 '/sendmail <itemID|itemName|finish> [amount] [level]'을 사용하십시오.",
"send": "%s 의 %s을 (레벨 %s)을 메세지에 첨부했습니다.\n계속 항목을 추가하거나, '/sendmail finish'을 사용해 메세지를 보낼 수 있습니다..",
"invalid_arguments_please_use": "잘못된 인수입니다.\n '/sendmail %s'을 사용하십시오",
"title": "<title>",
"message": "<message>",
"sender": "<sender>",
"arguments": "<itemID|itemName|finish> [amount] [level]",
"title": "🇺🇸<title>",
"message": "🇺🇸<message>",
"sender": "🇺🇸<sender>",
"arguments": "🇺🇸<itemID|itemName|finish> [amount] [level]",
"error": "오류: 잘못된 시공 단계 %s. Console에서 스택을 확인하십시오.",
"description": "지정된 사용자에게 메세지를 보냅니다. 이 명령어의 사용법은 세부 내용에 따라 달라집니다."
},
@ -425,8 +428,8 @@
},
"index": {
"title": "문서",
"handbook": "GM Handbook",
"gacha_mapping": "Gacha mapping JSON"
"handbook": "🇺🇸GM Handbook",
"gacha_mapping": "🇺🇸Gacha mapping JSON"
}
},
"plugin": {

View File

@ -63,7 +63,10 @@
"game_version": "Wersja gry: %s",
"resources": {
"loading": "Ładowanie zasobów...",
"finish": "Załadowano zasoby."
"finish": "Załadowano zasoby.",
"custom": "🇺🇸Find additional resources at: 'Anime-Game-Servers/CustomGCResources'.",
"missing_server": "🇺🇸To fully use questing, it is recommended to add the 'Server' folder.",
"missing_scenes": "🇺🇸To fully use questing, it is recommended to add the 'ScriptSceneData' folder."
}
}
},
@ -236,20 +239,20 @@
"not_found": "Nie ma zadania o podanym ID.",
"invalid_id": "Błędny format ID zadania.",
"description": "Dodaj lub wykonaj wskazane zadanie.",
"enabled": "Questing enabled."
"enabled": "🇺🇸Questing enabled."
},
"group": {
"invalid_groupid": "Invalid group ID.",
"invalid_suiteid": "Invalid suite ID.",
"group_not_found": "Group not found.",
"description": "Alter group loading",
"refreshed": "Group %s refreshed."
"invalid_groupid": "🇺🇸Invalid group ID.",
"invalid_suiteid": "🇺🇸Invalid suite ID.",
"group_not_found": "🇺🇸Group not found.",
"description": "🇺🇸Alter group loading",
"refreshed": "🇺🇸Group %s refreshed."
},
"cutscene": {
"description": "Odtwarza przerywnik filmowy"
},
"sound": {
"description": "Plays a sound"
"description": "🇺🇸Plays a sound"
},
"reload": {
"reload_start": "Ponowne ładowanie konfiguracji...",

View File

@ -63,7 +63,10 @@
"game_version": "Versiunea de joc: %s",
"resources": {
"loading": "Se încarcă resursele...",
"finish": "Resursele au fost încărcate."
"finish": "Resursele au fost încărcate.",
"custom": "🇺🇸Find additional resources at: 'Anime-Game-Servers/CustomGCResources'.",
"missing_server": "🇺🇸To fully use questing, it is recommended to add the 'Server' folder.",
"missing_scenes": "🇺🇸To fully use questing, it is recommended to add the 'ScriptSceneData' folder."
}
}
},
@ -236,20 +239,20 @@
"not_found": "Misiunea nu a fost găsită.",
"invalid_id": "ID-ul misiunii nu a fost găsit.",
"description": "Adaugă sau termină misiuni",
"enabled": "Questing enabled."
"enabled": "🇺🇸Questing enabled."
},
"group": {
"invalid_groupid": "Invalid group ID.",
"invalid_suiteid": "Invalid suite ID.",
"group_not_found": "Group not found.",
"description": "Alter group loading",
"refreshed": "Group %s refreshed."
"invalid_groupid": "🇺🇸Invalid group ID.",
"invalid_suiteid": "🇺🇸Invalid suite ID.",
"group_not_found": "🇺🇸Group not found.",
"description": "🇺🇸Alter group loading",
"refreshed": "🇺🇸Group %s refreshed."
},
"cutscene": {
"description": "Plays a cutscene"
"description": "🇺🇸Plays a cutscene"
},
"sound": {
"description": "Plays a sound"
"description": "🇺🇸Plays a sound"
},
"reload": {
"reload_start": "Se reîncarcă configurația.",

View File

@ -63,7 +63,10 @@
"game_version": "Версия игры: %s",
"resources": {
"loading": "Загружаем ресурсы...",
"finish": "Загрузка ресурсов завершена."
"finish": "Загрузка ресурсов завершена.",
"custom": "🇺🇸Find additional resources at: 'Anime-Game-Servers/CustomGCResources'.",
"missing_server": "🇺🇸To fully use questing, it is recommended to add the 'Server' folder.",
"missing_scenes": "🇺🇸To fully use questing, it is recommended to add the 'ScriptSceneData' folder."
}
}
},
@ -236,20 +239,20 @@
"not_found": "Квест не найден.",
"invalid_id": "Некорректный ID квеста.",
"description": "Добавляет (add) или завершает (finish) квесты",
"enabled": "Questing enabled."
"enabled": "🇺🇸Questing enabled."
},
"group": {
"invalid_groupid": "Invalid group ID.",
"invalid_suiteid": "Invalid suite ID.",
"group_not_found": "Group not found.",
"description": "Alter group loading",
"refreshed": "Group %s refreshed."
"invalid_groupid": "🇺🇸Invalid group ID.",
"invalid_suiteid": "🇺🇸Invalid suite ID.",
"group_not_found": "🇺🇸Group not found.",
"description": "🇺🇸Alter group loading",
"refreshed": "🇺🇸Group %s refreshed."
},
"cutscene": {
"description": "Odtwarza przerywnik filmowy"
},
"sound": {
"description": "Plays a sound"
"description": "🇺🇸Plays a sound"
},
"reload": {
"reload_start": "Перезагружаем файл конфигурации.",

View File

@ -63,7 +63,10 @@
"game_version": "游戏版本:%s",
"resources": {
"loading": "正在加载 resources...",
"finish": "完成加载 resources。"
"finish": "完成加载 resources。",
"custom": "🇺🇸Find additional resources at: 'Anime-Game-Servers/CustomGCResources'.",
"missing_server": "🇺🇸To fully use questing, it is recommended to add the 'Server' folder.",
"missing_scenes": "🇺🇸To fully use questing, it is recommended to add the 'ScriptSceneData' folder."
}
}
},
@ -236,20 +239,20 @@
"not_found": "任务不存在。",
"invalid_id": "无效的任务ID。",
"description": "添加或完成任务",
"enabled": "Questing enabled."
"enabled": "🇺🇸Questing enabled."
},
"group": {
"invalid_groupid": "Invalid group ID.",
"invalid_suiteid": "Invalid suite ID.",
"group_not_found": "Group not found.",
"description": "Alter group loading",
"refreshed": "Group %s refreshed."
"invalid_groupid": "🇺🇸Invalid group ID.",
"invalid_suiteid": "🇺🇸Invalid suite ID.",
"group_not_found": "🇺🇸Group not found.",
"description": "🇺🇸Alter group loading",
"refreshed": "🇺🇸Group %s refreshed."
},
"cutscene": {
"description": "Plays a cutscene"
"description": "🇺🇸Plays a cutscene"
},
"sound": {
"description": "Plays a sound"
"description": "🇺🇸Plays a sound"
},
"reload": {
"reload_start": "正在重载配置文件和数据...",

View File

@ -63,7 +63,10 @@
"game_version": "遊戲版本:%s",
"resources": {
"loading": "加載資源中...",
"finish": "資源加載完成.。"
"finish": "資源加載完成.。",
"custom": "🇺🇸Find additional resources at: 'Anime-Game-Servers/CustomGCResources'.",
"missing_server": "🇺🇸To fully use questing, it is recommended to add the 'Server' folder.",
"missing_scenes": "🇺🇸To fully use questing, it is recommended to add the 'ScriptSceneData' folder."
}
}
},
@ -236,20 +239,20 @@
"not_found": "未找到任務",
"invalid_id": "無效的任務ID",
"description": "添加或完成任務",
"enabled": "Questing enabled."
"enabled": "🇺🇸Questing enabled."
},
"group": {
"invalid_groupid": "Invalid group ID.",
"invalid_suiteid": "Invalid suite ID.",
"group_not_found": "Group not found.",
"description": "Alter group loading",
"refreshed": "Group %s refreshed."
"invalid_groupid": "🇺🇸Invalid group ID.",
"invalid_suiteid": "🇺🇸Invalid suite ID.",
"group_not_found": "🇺🇸Group not found.",
"description": "🇺🇸Alter group loading",
"refreshed": "🇺🇸Group %s refreshed."
},
"cutscene": {
"description": "Plays a cutscene"
"description": "🇺🇸Plays a cutscene"
},
"sound": {
"description": "Plays a sound"
"description": "🇺🇸Plays a sound"
},
"reload": {
"reload_start": "正在重新加載設定檔。",