Rename to Work-Death Balance, add mascot favicon and rebalance rifle/grenade damage

This commit is contained in:
enne2
2026-10-15 17:15:16 +02:00
parent 2606fc5cc2
commit 21a1d5bf79
22 changed files with 352 additions and 39 deletions
+25
View File
@@ -139,6 +139,31 @@ func run_test() -> void:
str(junk_after.get_value("player", "locked", true))])
DirAccess.remove_absolute(ProjectSettings.globalize_path(junk_path))
# 12) Native rename migration: temporary files only, old source is read-only.
var legacy_path := "user://test_legacy_profile.cfg"
var migrated_path := "user://test_migrated_profile.cfg"
DirAccess.remove_absolute(ProjectSettings.globalize_path(migrated_path))
Profile.save_profile({"name": "Legacy", "player_id": "abcdef0123456789",
"best": 850, "locked": true}, legacy_path)
var old_hash := FileAccess.get_sha256(legacy_path)
var migrated := Profile.load_profile(migrated_path, legacy_path)
check("rinomina: nome, id, record e blocco migrati senza perdite",
migrated.name == "Legacy" and migrated.player_id == "abcdef0123456789"
and migrated.best == 850 and migrated.locked)
check("rinomina: il vecchio file rimane byte-identico",
FileAccess.get_sha256(legacy_path) == old_hash)
check("rinomina: il profilo viene scritto nella nuova posizione",
FileAccess.file_exists(migrated_path))
migrated.name = "Attuale"
migrated.best = 950
Profile.save_profile(migrated, migrated_path)
var preferred := Profile.load_profile(migrated_path, legacy_path)
check("rinomina: un profilo nuovo esistente prevale sul vecchio",
preferred.name == "Attuale" and preferred.best == 950)
check("rinomina: percorso legacy risolto accanto al nuovo user data",
Profile.legacy_profile_path().ends_with("/Zombie Room FPS/zombie_fps_profile.cfg"))
DirAccess.remove_absolute(ProjectSettings.globalize_path(legacy_path))
DirAccess.remove_absolute(ProjectSettings.globalize_path(migrated_path))
DirAccess.remove_absolute(ProjectSettings.globalize_path(TEST_PATH))
print("%d controlli superati, %d falliti" % [checks - failures, failures])
quit(1 if failures > 0 else 0)