Skip to content

Commit

Permalink
Fix incorrect time display on /medicalcondition query (#2575)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pumpkin7266 authored Dec 19, 2024
1 parent 81201a4 commit 2cf4894
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/generated/resources/assets/gtceu/lang/en_ud.json
Original file line number Diff line number Diff line change
Expand Up @@ -1706,8 +1706,8 @@
"button.gtceu.toggle_waypoint.name": "ʇuıodʎɐM ǝןbbo⟘",
"command.gtceu.dump_data.success": "%s oʇ %s ʎɹʇsıbǝɹ ɯoɹɟ sǝɔɹnosǝɹ %s pǝdɯnᗡ",
"command.gtceu.medical_condition.get": ":suoıʇıpuoɔ ןɐɔıpǝɯ ǝsǝɥʇ sɐɥ %s ɹǝʎɐןԀ",
"command.gtceu.medical_condition.get.element": "spuoɔǝs %s :ɹ§%s uoıʇıpuoƆ",
"command.gtceu.medical_condition.get.element.permanent": ")ʇuǝuɐɯɹǝd( spuoɔǝs %s :ɹ§%s uoıʇıpuoƆ",
"command.gtceu.medical_condition.get.element": "spuoɔǝs %s sǝʇnuıɯ %s :ɹ§%s uoıʇıpuoƆ",
"command.gtceu.medical_condition.get.element.permanent": ")ʇuǝuɐɯɹǝd( spuoɔǝs %s sǝʇnuıɯ %s :ɹ§%s uoıʇıpuoƆ",
"command.gtceu.medical_condition.get.empty": "˙suoıʇıpuoɔ ןɐɔıpǝɯ ou sɐɥ %s ɹǝʎɐןԀ",
"command.gtceu.place_vein.failure": "%s uoıʇısod ʇɐ %s uıǝʌ ǝɔɐןd oʇ pǝןıɐℲ",
"command.gtceu.place_vein.success": "%s uoıʇısod ʇɐ %s uıǝʌ pǝɔɐןԀ",
Expand Down
4 changes: 2 additions & 2 deletions src/generated/resources/assets/gtceu/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -1706,8 +1706,8 @@
"button.gtceu.toggle_waypoint.name": "Toggle Waypoint",
"command.gtceu.dump_data.success": "Dumped %s resources from registry %s to %s",
"command.gtceu.medical_condition.get": "Player %s has these medical conditions:",
"command.gtceu.medical_condition.get.element": "Condition %s§r: %s seconds",
"command.gtceu.medical_condition.get.element.permanent": "Condition %s§r: %s seconds (permanent)",
"command.gtceu.medical_condition.get.element": "Condition %s§r: %s minutes %s seconds",
"command.gtceu.medical_condition.get.element.permanent": "Condition %s§r: %s minutes %s seconds (permanent)",
"command.gtceu.medical_condition.get.empty": "Player %s has no medical conditions.",
"command.gtceu.place_vein.failure": "Failed to place vein %s at position %s",
"command.gtceu.place_vein.success": "Placed vein %s at position %s",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,11 @@ private static int queryMedicalConditions(ServerPlayer target) throws CommandSyn
entry.getKey().canBePermanent) {
langKey = "command.gtceu.medical_condition.get.element.permanent";
}
float time = entry.getFloatValue();
target.sendSystemMessage(
Component.translatable(langKey,
Component.translatable("gtceu.medical_condition." + entry.getKey().name),
entry.getFloatValue() / 20f));
(int) (time / 60), (int) (time % 60)));
}
return count;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ public static void init(RegistrateLangProvider provider) {

provider.add("command.gtceu.medical_condition.get", "Player %s has these medical conditions:");
provider.add("command.gtceu.medical_condition.get.empty", "Player %s has no medical conditions.");
provider.add("command.gtceu.medical_condition.get.element", "Condition %s§r: %s seconds");
provider.add("command.gtceu.medical_condition.get.element.permanent", "Condition %s§r: %s seconds (permanent)");
provider.add("command.gtceu.medical_condition.get.element", "Condition %s§r: %s minutes %s seconds");
provider.add("command.gtceu.medical_condition.get.element.permanent",
"Condition %s§r: %s minutes %s seconds (permanent)");
provider.add("command.gtceu.dump_data.success", "Dumped %s resources from registry %s to %s");
provider.add("command.gtceu.place_vein.failure", "Failed to place vein %s at position %s");
provider.add("command.gtceu.place_vein.success", "Placed vein %s at position %s");
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/assets/gtceu/lang/ja_jp.json
Original file line number Diff line number Diff line change
Expand Up @@ -1706,8 +1706,8 @@
"button.gtceu.toggle_waypoint.name": "ウェイポイントを切り替え",
"command.gtceu.dump_data.success": "レジストリ %2$s から %1$s リソースを %3$s にダンプしました。",
"command.gtceu.medical_condition.get": "プレイヤー%sは以下のような健康状態にです。:",
"command.gtceu.medical_condition.get.element": "コンディション %s§r: %s 秒",
"command.gtceu.medical_condition.get.element.permanent": "コンディション %s§r: %s 秒(永続的)",
"command.gtceu.medical_condition.get.element": "コンディション %s§r: %s 分 %s ",
"command.gtceu.medical_condition.get.element.permanent": "コンディション %s§r: %s 分 %s 秒(永続的)",
"command.gtceu.medical_condition.get.empty": "プレイヤー%sは全て健康です。",
"command.gtceu.place_vein.failure": "鉱脈 %1$s を位置 %2$s に配置できませんでした。",
"command.gtceu.place_vein.success": "鉱脈 %s を位置 %s に配置しました。",
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/assets/gtceu/lang/ru_ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -7039,8 +7039,8 @@
"block.gtceu.green_borderless_lamp": "Зеленая лампа (Без границ)",
"block.gtceu.lamp.tooltip.no_bloom": "Без блика",
"block.gtceu.lamp.tooltip.no_light": "Без Света",
"command.gtceu.medical_condition.get.element.permanent": "%s§r: %s сек. (Постоянно)",
"command.gtceu.medical_condition.get.element": "%s§r: %s сек.",
"command.gtceu.medical_condition.get.element.permanent": "%s§r: %s мин %s сек. (Постоянно)",
"command.gtceu.medical_condition.get.element": "%s§r: %s мин %s сек.",
"command.gtceu.medical_condition.get.empty": "У игрока %s нет никаких заболеваний.",
"material.gtceu.calcium_hydroxide": "Гидроксид кальция",
"material.gtceu.dichloroethane": "Дихлорэтан",
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/assets/gtceu/lang/zh_cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -1752,8 +1752,8 @@
"button.gtceu.toggle_waypoint.name":"切换路径点",
"command.gtceu.dump_data.success":"已将注册表%2$s中的%1$s个资源转储到%3$s",
"command.gtceu.medical_condition.get":"玩家%s有以下疾病:",
"command.gtceu.medical_condition.get.element":"症状:%s§r %s秒",
"command.gtceu.medical_condition.get.element.permanent":"症状:%s§r %s秒(永久)",
"command.gtceu.medical_condition.get.element":"症状:%s§r %s分 %s秒",
"command.gtceu.medical_condition.get.element.permanent":"症状:%s§r %s分 %s秒(永久)",
"command.gtceu.medical_condition.get.empty":"玩家%s没有疾病。",
"command.gtceu.place_vein.failure":"无法放置%s矿脉于%s",
"command.gtceu.place_vein.success":"成功放置%s矿脉于%s",
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/assets/gtceu/lang/zh_tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -1737,8 +1737,8 @@
"button.gtceu.toggle_waypoint.name":"切換路徑點",
"command.gtceu.dump_data.success":"已將登錄檔%2$s中的%1$s個資源轉儲到%3$s",
"command.gtceu.medical_condition.get":"玩家%s有以下疾病:",
"command.gtceu.medical_condition.get.element":"症狀:%s§r %s秒",
"command.gtceu.medical_condition.get.element.permanent":"症狀:%s§r %s秒(永久)",
"command.gtceu.medical_condition.get.element":"症狀:%s§r %s分 %s秒",
"command.gtceu.medical_condition.get.element.permanent":"症狀:%s§r %s分 %s秒(永久)",
"command.gtceu.medical_condition.get.empty":"玩家%s沒有疾病。",
"command.gtceu.place_vein.failure":"無法放置%s礦脈於%s",
"command.gtceu.place_vein.success":"成功放置%s礦脈於%s",
Expand Down

0 comments on commit 2cf4894

Please sign in to comment.