This repository has been archived on 2026-05-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
AgrarianGameArchive/Scripts/verify_container_persistence_schema.py

45 lines
1.4 KiB
Python

from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
EXPECTED = {
ROOT / "Source" / "AgrarianGame" / "AgrarianSaveGame.h": [
"struct FAgrarianSavedContainer",
"FName ContainerId = NAME_None;",
"FName ContainerTypeId = NAME_None;",
"FTransform Transform;",
"TArray<FAgrarianItemStack> Inventory;",
"FString OwnerPlayerId;",
"TArray<FAgrarianSavedContainer> Containers;",
],
ROOT / "Docs" / "PersistenceDesignDocument.md": [
"`FAgrarianSavedContainer`",
"Version 0.1.M does not yet have a placed container actor to capture",
"`simple_container` remains a craftable inventory item",
],
ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md": [
"[x] Save containers.",
"`FAgrarianSavedContainer`",
"`simple_container` remains covered by player inventory",
],
}
def main() -> None:
missing = []
for path, snippets in EXPECTED.items():
text = path.read_text(encoding="utf-8")
for snippet in snippets:
if snippet not in text:
missing.append(f"{path.relative_to(ROOT)}: {snippet}")
if missing:
raise RuntimeError("Container persistence schema verification failed: " + "; ".join(missing))
print("PASS: container persistence schema is reserved without claiming placed-container capture.")
if __name__ == "__main__":
main()