Compare commits

...

1 Commits

Author SHA1 Message Date
881866a9c4 Зміна мови посеред зламу більше не дає штрафу "висмикнутий кабель"; run_tests.sh виконуваний
All checks were successful
build / build (push) Successful in 5m14s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017HrHZxHMi8WGuNwdjBFWq8
2026-11-26 09:23:59 +00:00
3 changed files with 12 additions and 0 deletions

View File

@@ -1024,6 +1024,7 @@ const EN := {
"⚠ Не вдалося записати %s (немає місця на диску чи файл зайнятий іншою програмою). Прогрес може не зберегтися.": "⚠ Could not write %s (the disk is full or another program holds the file). Progress may not be saved.",
"☠ Параноя не зберігається: оновлення перезапустить гру й зітре забіг. Онови після кінця забігу.": "☠ Paranoid doesn't save: updating restarts the game and wipes the run. Update after the run ends.",
"☠ Параноя не зберігається: мову можна змінити після кінця забігу.": "☠ Paranoid doesn't save: you can change the language after the run ends.",
"🔒 Мову можна змінити після зламу: заверши його або відключись (disconnect).": "🔒 You can change the language after the crack: finish it or disconnect.",
"⬇ Завантажую %s (%d МБ)…": "⬇ Downloading %s (%d MB)…",
"запит не відправився": "the request wasn't sent",
"не вдалося перейменувати поточний exe": "couldn't rename the current exe",

View File

@@ -2721,6 +2721,9 @@ func set_lang(l: String) -> void:
if paranoid_run():
say(L.t("☠ Параноя не зберігається: мову можна змінити після кінця забігу."), "err")
return
if crack != null: # перезапуск сцени посеред зламу = висмикнутий кабель (+25% трасування після старту)
say(L.t("🔒 Мову можна змінити після зламу: заверши його або відключись (disconnect)."), "err")
return
Settings.set_value(self, "lang", l)
L.lang = l
save_game()

View File

@@ -312,6 +312,14 @@ func _run() -> void:
g.run("lang en")
ok(g.cfg["lang"] == "uk" and g.diff == 2 and g.log_lines.any(func(l): return "після кінця забігу" in l[0]), "Параноя: зміна мови не перезапускає гру й не стирає забіг")
g.run("difficulty novice")
g.servers[0]["open"] = false
g.servers[0]["ports_open"] = g.servers[0]["ports"].duplicate()
g.run("connect 1")
g.run("crack")
g.set_lang("en")
ok(g.crack != null and g.cfg["lang"] == "uk" and g.log_lines.any(func(l): return "після зламу" in l[0]), "зміна мови посеред зламу не перезапускає гру (інакше штраф за висмикнутий кабель)")
g.crack = null
g.run("disconnect")
g.save_game()
ok(g.diff == 0 and FileAccess.file_exists(SAVE), "Новачок: збереження є")
g.save_path = "user://нема_такої_папки/save.json"