From 210e9e973208379a1e54f8b11a9bfdef54ba8476 Mon Sep 17 00:00:00 2001 From: Kawaa <89033115+Kawaa-qwq@users.noreply.github.com> Date: Mon, 5 Sep 2022 22:12:38 +0800 Subject: [PATCH] Added a directive to fix some minor bugs (#1744) * Pull request made after merging the latest version * Update src/main/resources/languages/ja-JP.json --- .../emu/grasscutter/command/commands/PositionCommand.java | 3 ++- src/main/java/emu/grasscutter/tools/Tools.java | 4 +++- src/main/resources/languages/en-US.json | 4 ++-- src/main/resources/languages/es-ES.json | 4 ++-- src/main/resources/languages/fr-FR.json | 4 ++-- src/main/resources/languages/ja-JP.json | 4 ++-- src/main/resources/languages/ko-KR.json | 4 ++-- src/main/resources/languages/pl-PL.json | 4 ++-- src/main/resources/languages/ro-RO.json | 4 ++-- src/main/resources/languages/ru-RU.json | 2 +- src/main/resources/languages/zh-CN.json | 7 +++---- src/main/resources/languages/zh-TW.json | 4 ++-- 12 files changed, 25 insertions(+), 23 deletions(-) diff --git a/src/main/java/emu/grasscutter/command/commands/PositionCommand.java b/src/main/java/emu/grasscutter/command/commands/PositionCommand.java index 92a6ee0a2..e899287e8 100644 --- a/src/main/java/emu/grasscutter/command/commands/PositionCommand.java +++ b/src/main/java/emu/grasscutter/command/commands/PositionCommand.java @@ -13,7 +13,8 @@ public final class PositionCommand implements CommandHandler { @Override public void execute(Player sender, Player targetPlayer, List args) { Position pos = targetPlayer.getPosition(); + Position rot = targetPlayer.getRotation(); CommandHandler.sendTranslatedMessage(sender, "commands.position.success", - pos.getX(), pos.getY(), pos.getZ(), targetPlayer.getSceneId()); + pos.getX(), pos.getY(), pos.getZ(), rot.getX(), rot.getY(), rot.getZ(), targetPlayer.getSceneId()); } } diff --git a/src/main/java/emu/grasscutter/tools/Tools.java b/src/main/java/emu/grasscutter/tools/Tools.java index e9ebe9f86..792b8e77e 100644 --- a/src/main/java/emu/grasscutter/tools/Tools.java +++ b/src/main/java/emu/grasscutter/tools/Tools.java @@ -97,7 +97,9 @@ public final class Tools { // Write txt files for (int i = 0; i < TextStrings.NUM_LANGUAGES; i++) { - final String fileName = "./GM Handbook - %s.txt".formatted(TextStrings.ARR_LANGUAGES[i]); + File GMHandbookOutputpath=new File("./GM Handbook"); + GMHandbookOutputpath.mkdir(); + final String fileName = "./GM Handbook/GM Handbook - %s.txt".formatted(TextStrings.ARR_LANGUAGES[i]); try (PrintWriter writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(fileName), StandardCharsets.UTF_8), false)) { writer.write(handbookBuilders.get(i).toString()); } diff --git a/src/main/resources/languages/en-US.json b/src/main/resources/languages/en-US.json index a77afd3c9..76b61daa3 100644 --- a/src/main/resources/languages/en-US.json +++ b/src/main/resources/languages/en-US.json @@ -207,8 +207,8 @@ "description": "Grants or removes a permission for a user" }, "position": { - "success": "Coordinates: %s, %s, %s\nScene ID: %s", - "description": "Get coordinates" + "success": "Coordinates: %s, %s, %s\nRotation:%s, %s, %s\nScene ID: %s", + "description": "Gets position and rotation information" }, "quest": { "added": "Quest %s added.", diff --git a/src/main/resources/languages/es-ES.json b/src/main/resources/languages/es-ES.json index a7978ea99..657ff8073 100644 --- a/src/main/resources/languages/es-ES.json +++ b/src/main/resources/languages/es-ES.json @@ -207,8 +207,8 @@ "description": "Da o quita un permiso a un jugador" }, "position": { - "success": "Coordenadas: %s, %s, %s\nID del escenario: %s", - "description": "Da las coordenadas en el escenario actual" + "success": "Coordenadas: %s, %s, %s\nRotación: %s, %s, %s\nID del escenario: %s", + "description": "Obtener información sobre ubicación y rotación" }, "quest": { "added": "Misión %s añadida.", diff --git a/src/main/resources/languages/fr-FR.json b/src/main/resources/languages/fr-FR.json index 1e8122886..050917a72 100644 --- a/src/main/resources/languages/fr-FR.json +++ b/src/main/resources/languages/fr-FR.json @@ -207,8 +207,8 @@ "description": "Accorde ou retire une permission a un utilisateur" }, "position": { - "success": "Coordonées: %s, %s, %s\nID de la scène: %s", - "description": "Obtenir vos coordonnées" + "success": "Coordonées: %s, %s, %s\nRotatifs:%s, %s, %s\nID de la scène: %s", + "description": "Obtient des informations de position et de rotation" }, "quest": { "added": "Quête %s ajoutée.", diff --git a/src/main/resources/languages/ja-JP.json b/src/main/resources/languages/ja-JP.json index 4b9b91b9b..f96aa0dd7 100644 --- a/src/main/resources/languages/ja-JP.json +++ b/src/main/resources/languages/ja-JP.json @@ -207,8 +207,8 @@ "description": "ユーザーの権限を付与または削除します" }, "position": { - "success": "座標: %s、%s、%s\nシーンID: %s", - "description": "座標を取得する" + "success": "座標:%s、%s、%s\n回転:%s、%s、%s\nシーンID: %s", + "description": "位置と回転情報を取得します" }, "quest": { "added": "クエスト %s が追加されました。", diff --git a/src/main/resources/languages/ko-KR.json b/src/main/resources/languages/ko-KR.json index 06f244c38..07298ec87 100644 --- a/src/main/resources/languages/ko-KR.json +++ b/src/main/resources/languages/ko-KR.json @@ -207,8 +207,8 @@ "description": "사용자에게 권한을 부여하거나 제거합니다." }, "position": { - "success": "좌표: %s, %s, %s\nScene ID: %s", - "description": "좌표를 출력합니다" + "success": "좌표: %s, %s, %s\n회전:%s, %s, %s\nScene ID: %s", + "description": "위치 및 회전 정보를 가져옵니다" }, "quest": { "added": "%s 퀘스트가 추가되었습니다.", diff --git a/src/main/resources/languages/pl-PL.json b/src/main/resources/languages/pl-PL.json index 3b8a1d1d3..f1f9bd162 100644 --- a/src/main/resources/languages/pl-PL.json +++ b/src/main/resources/languages/pl-PL.json @@ -207,8 +207,8 @@ "description": "Dodaj lub usuń uprawnienia podanego gracza." }, "position": { - "success": "Koordynaty: (%s, %s, %s).\nID sceny: %s.", - "description": "Pokaż gdzie znajduje się dany gracz." + "success": "Koordynaty: (%s, %s, %s).\nKrążyć:%s, %s, %s\nID sceny: %s.", + "description": "Pobiera informacje o pozycji i obrocie" }, "quest": { "added": "Zadanie %s zostało dodane.", diff --git a/src/main/resources/languages/ro-RO.json b/src/main/resources/languages/ro-RO.json index 2ccd78c66..1d337def6 100644 --- a/src/main/resources/languages/ro-RO.json +++ b/src/main/resources/languages/ro-RO.json @@ -207,8 +207,8 @@ "description": "Acordă sau elimină o permisiune de la un utilizator." }, "position": { - "success": "Coordonate: %s, %s, %s\nScene ID: %s", - "description": "Obțineți coordonatele" + "success": "Coordonate: %s, %s, %s\nGravitează:%s, %s, %s\nScene ID: %s", + "description": "Obține informații despre poziție și rotație" }, "quest": { "added": "Misiunea %s adăugată.", diff --git a/src/main/resources/languages/ru-RU.json b/src/main/resources/languages/ru-RU.json index ea6c396a0..99a42a0c4 100644 --- a/src/main/resources/languages/ru-RU.json +++ b/src/main/resources/languages/ru-RU.json @@ -207,7 +207,7 @@ "description": "Добавляет (add) или удаляет (remove) разрешения у пользователя" }, "position": { - "success": "Координаты: %s, %s, %s\nID сцены: %s", + "success": "Координаты: %s, %s, %s\nПоворот:%s, %s, %s\nID сцены: %s", "description": "Позволяет получить координаты" }, "quest": { diff --git a/src/main/resources/languages/zh-CN.json b/src/main/resources/languages/zh-CN.json index 1362d06f4..95672d89c 100644 --- a/src/main/resources/languages/zh-CN.json +++ b/src/main/resources/languages/zh-CN.json @@ -181,7 +181,7 @@ }, "killall": { "scene_not_found_in_player_world": "未在玩家世界中找到此场景。", - "kill_monsters_in_scene": "已杀死场景 %s 中的 %s 个怪物。", + "kill_monsters_in_scene": "已杀死 %s 个怪物。 [场景ID: %s ]", "description": "杀死所有怪物" }, "killCharacter": { @@ -207,9 +207,8 @@ "description": "添加或移除指定玩家的权限" }, "position": { - "success": "坐标:%s, %s, %s\n场景ID:%s", - "description": "获取所在位置" - }, + "success": "坐标:%s, %s, %s\n旋转:%s, %s, %s\n场景ID:%s", + "description": "获取所在位置和旋转信息"}, "quest": { "added": "已添加任务 %s。", "finished": "已完成任务 %s。", diff --git a/src/main/resources/languages/zh-TW.json b/src/main/resources/languages/zh-TW.json index 365de4da6..f0a715130 100644 --- a/src/main/resources/languages/zh-TW.json +++ b/src/main/resources/languages/zh-TW.json @@ -207,8 +207,8 @@ "description": "指派或移除指定玩家的權限。" }, "position": { - "success": "座標:%s, %s, %s\n場景ID:%s", - "description": "獲取目前所在位置的座標。" + "success": "坐標:%s, %s, %s\n旋轉:%s, %s, %s\n場景ID:%s", + "description": "獲取所在坐標和旋轉信息" }, "quest": { "added": "已添加任務 %s",