35 lines
1.2 KiB
Python
35 lines
1.2 KiB
Python
#!/usr/bin/env python3
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
ROADMAP = ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md"
|
|
TECHNICAL_DESIGN = ROOT / "Docs" / "TechnicalDesignDocument.md"
|
|
ITEMS = ROOT / "Scripts" / "setup_item_definitions.py"
|
|
RECIPES = ROOT / "Scripts" / "setup_recipe_definitions.py"
|
|
RECIPE_VERIFY = ROOT / "Scripts" / "verify_recipe_definitions.py"
|
|
|
|
|
|
def compact(path: Path) -> str:
|
|
return " ".join(path.read_text(encoding="utf-8").split())
|
|
|
|
|
|
def require(path: Path, text: str) -> None:
|
|
data = compact(path)
|
|
if text not in data:
|
|
raise SystemExit(f"FAIL: {path.relative_to(ROOT)} missing required text: {text}")
|
|
|
|
|
|
def main() -> None:
|
|
require(ROADMAP, "[x] Add wall piece if needed.")
|
|
require(ROADMAP, "primitive_wall_panel")
|
|
require(TECHNICAL_DESIGN, "The MVP wall piece is `primitive_wall_panel`")
|
|
require(ITEMS, '"item_id": "primitive_wall_panel"')
|
|
require(RECIPES, '"recipe_id": "primitive_wall_panel"')
|
|
require(RECIPES, '("primitive_wall_panel", 4)')
|
|
require(RECIPE_VERIFY, '"recipe_id": "primitive_wall_panel"')
|
|
print("PASS: MVP shelter wall piece is defined as a craftable construction part.")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|