Reserve container persistence schema
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user