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_crafting_debug_tools.py
2026-05-17 18:08:48 -07:00

48 lines
1.6 KiB
Python

from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
EXPECTED = {
ROOT / "Source" / "AgrarianGame" / "AgrarianGamePlayerController.h": [
"void AgrarianCraft(FName RecipeId);",
"void AgrarianCraftStatus();",
"void ServerAgrarianCraft(FName RecipeId);",
],
ROOT / "Source" / "AgrarianGame" / "AgrarianGamePlayerController.cpp": [
"#include \"AgrarianCraftingComponent.h\"",
"void AAgrarianGamePlayerController::AgrarianCraft(FName RecipeId)",
"void AAgrarianGamePlayerController::AgrarianCraftStatus()",
"CraftingComponent->GetKnownRecipes(Recipes)",
"CraftingComponent->CanCraft(Recipe.RecipeId, FailureReason)",
"void AAgrarianGamePlayerController::ServerAgrarianCraft_Implementation(FName RecipeId)",
"CraftingComponent->Craft(RecipeId)",
],
ROOT / "Docs" / "TechnicalDesignDocument.md": [
"`AgrarianCraft <RecipeId>`",
"`AgrarianCraftStatus`",
],
ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md": [
"- [x] Add crafting debug tools.",
"AgrarianCraftStatus",
],
}
def main():
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)} missing {snippet!r}")
if missing:
raise RuntimeError("Crafting debug tools verification failed: " + "; ".join(missing))
print("PASS: crafting debug exec tools are wired and documented.")
if __name__ == "__main__":
main()