hhmm
This commit is contained in:
parent
434f07cc4e
commit
16074232aa
40 changed files with 1509 additions and 732 deletions
|
|
@ -378,32 +378,38 @@ def check_current_save_format() -> None:
|
|||
save_storage = read_text(ROOT / "js/save_storage.js")
|
||||
restore_coordinator = read_text(ROOT / "js/restore_coordinator.js")
|
||||
required_snapshot = [
|
||||
"const SNAPSHOT_VERSION = 3",
|
||||
"const SNAPSHOT_VERSION = 4",
|
||||
"a: \"tj1\"",
|
||||
"function compactWorld",
|
||||
"function compactTarinai",
|
||||
"function compactItem",
|
||||
"function compactAnt",
|
||||
"logs = []",
|
||||
"worldRef.logs = []",
|
||||
"worldRef.family = {}",
|
||||
"recordFamily",
|
||||
]
|
||||
for token in required_snapshot:
|
||||
if token not in snapshot:
|
||||
fail(f"current save snapshot token missing: {token}")
|
||||
fail(f"binary save snapshot token missing: {token}")
|
||||
forbidden_snapshot = [
|
||||
"logs: clonePlain",
|
||||
"compactAnt",
|
||||
"effects: (worldRef.effects",
|
||||
"cameraX",
|
||||
"cameraY",
|
||||
"behavior:",
|
||||
"deathReason",
|
||||
"summary:",
|
||||
"app: \"tarinai_colony_game\"",
|
||||
]
|
||||
offenders = [token for token in forbidden_snapshot if token in snapshot]
|
||||
if offenders:
|
||||
fail("old broad snapshot fields still present: " + ", ".join(offenders))
|
||||
fail("broad snapshot fields still present after light-save conversion: " + ", ".join(offenders))
|
||||
required_codec = [
|
||||
'EXPORT_PREFIX = "TN3!"',
|
||||
'EXPORT_PREFIX = "たり"',
|
||||
'RAW_CODEC = "生"',
|
||||
'DEFLATE_CODEC = "縮"',
|
||||
"SAVE_TEXT_ALPHABET",
|
||||
"base91Encode",
|
||||
"base91Decode",
|
||||
"jp2048Encode",
|
||||
"jp2048Decode",
|
||||
'CompressionStream("deflate-raw")',
|
||||
"DecompressionStream",
|
||||
"async function encodeSnapshot",
|
||||
|
|
@ -411,9 +417,9 @@ def check_current_save_format() -> None:
|
|||
]
|
||||
for token in required_codec:
|
||||
if token not in save_codec:
|
||||
fail(f"current save codec token missing: {token}")
|
||||
fail(f"binary save codec token missing: {token}")
|
||||
required_storage = [
|
||||
'STORAGE_PREFIX = "tarinai_save_slot_v3_"',
|
||||
'STORAGE_PREFIX = "tarinai_japanese_hash_slot_v1_"',
|
||||
"function writeSlot",
|
||||
"function readSlot",
|
||||
"function requireSlot",
|
||||
|
|
@ -421,7 +427,7 @@ def check_current_save_format() -> None:
|
|||
]
|
||||
for token in required_storage:
|
||||
if token not in save_storage:
|
||||
fail(f"current save storage token missing: {token}")
|
||||
fail(f"binary save storage token missing: {token}")
|
||||
required_facade = [
|
||||
"TarinaiSaveSystem",
|
||||
"TarinaiSaveCodec",
|
||||
|
|
@ -432,7 +438,7 @@ def check_current_save_format() -> None:
|
|||
for token in required_facade:
|
||||
if token not in combined:
|
||||
fail(f"save/restore split facade token missing: {token}")
|
||||
for token in ("TN2!", "tarinai_save_slot_v2_", "legacyForcedColumn"):
|
||||
for token in ("TN2!", "TN3!", "tarinai_save_slot_v2_", "tarinai_save_slot_v3_", "legacyForcedColumn"):
|
||||
if token in combined or token in snapshot:
|
||||
fail(f"save backward compatibility residue still present: {token}")
|
||||
if "renderStats" in snapshot or "TarinaiFreezeSystem" in snapshot or "renderArchive" in snapshot:
|
||||
|
|
@ -446,7 +452,7 @@ def check_current_save_format() -> None:
|
|||
placement = read_text(ROOT / "js/world_placement_log.js")
|
||||
if "playLogSoundForEntry" in placement:
|
||||
fail("log sound mapping still lives in world_placement_log.js")
|
||||
ok("current save snapshot, codec, storage, and restore coordinator present")
|
||||
ok("binary hash save snapshot, codec, storage, and restore coordinator present")
|
||||
|
||||
def check_unified_item_registry() -> None:
|
||||
data = manifest()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue