extends RefCounted ## The running client's version string — the ONE place anything asks (T-1241). ## ## Reads `application/config/version` out of ProjectSettings, which Godot bakes ## into the exported PCK. That is the whole point: two call sites previously ## line-scanned `res://../project.yaml` at runtime, which resolves to the repo ## root in a dev run and TO NOTHING in an exported build — both returned their ## "?.?.?" fallback in a shipped game. ## ## For the Atlas disk cache (D-255, step_canvas_disk_cache.gd) that was not a ## cosmetic defect: the version tag is that cache's ONLY invalidation signal, so ## a constant sentinel meant every exported build stamped and compared the same ## string and a canvas cached by one build would be served by every later build, ## forever. T-1239 is what that failure looks like when it happens — eight days ## of a map drawn from a canvas whose generating code no longer existed. ## ## No file IO and no fallback branch, deliberately. A missing setting returns "" ## and callers can see that; there is no environment where this reads one thing ## in the editor and another in an export, which is exactly the property the ## project.yaml scan lacked. ## ## `project.yaml` remains the source of truth for the version (CLAUDE.md); the ## ProjectSettings entry is a mirror, and `tooling/check-client-version` fails ## the push if the two drift. const SETTING_KEY: String = "application/config/version" static func current() -> String: return str(ProjectSettings.get_setting(SETTING_KEY, ""))