from pathlib import Path


ROOT = Path(__file__).resolve().parents[1]

EXPECTED = {
    ROOT / "Source" / "AgrarianGame" / "AgrarianCampfire.h": [
        "void Extinguish();",
        "void SetLit(bool bNewLit);",
    ],
    ROOT / "Source" / "AgrarianGame" / "AgrarianCampfire.cpp": [
        "void AAgrarianCampfire::Extinguish()",
        "FuelSeconds = 0.0f;",
        "SetLit(false);",
        "void AAgrarianCampfire::SetLit(bool bNewLit)",
        "UpdateVisualState();",
    ],
    ROOT / "Docs" / "TechnicalDesignDocument.md": [
        "Campfires expose native extinguish logic",
    ],
    ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md": [
        "- [x] Add extinguish logic.",
    ],
}


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("Fire extinguish verification failed: " + "; ".join(missing))

    print("PASS: campfire extinguish logic is implemented and documented.")


if __name__ == "__main__":
    main()
