#!/usr/bin/env python3 """Verify MVP footstep placeholder hooks are present.""" from pathlib import Path ROOT = Path(__file__).resolve().parents[1] CHAR_H = ROOT / "Source" / "AgrarianGame" / "AgrarianGameCharacter.h" CHAR_CPP = ROOT / "Source" / "AgrarianGame" / "AgrarianGameCharacter.cpp" TDD = ROOT / "Docs" / "TechnicalDesignDocument.md" ROADMAP = ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md" REQUIRED = { CHAR_H: [ "UAudioComponent* FootstepAudioComponent;", "TObjectPtr WalkFootstepSound;", "TObjectPtr SprintFootstepSound;", "TObjectPtr CrouchFootstepSound;", "TObjectPtr ProneFootstepSound;", "WalkFootstepIntervalSeconds", "SprintFootstepIntervalSeconds", "CrouchFootstepIntervalSeconds", "ProneFootstepIntervalSeconds", "void UpdateFootstepAudio(float DeltaSeconds);", ], CHAR_CPP: [ "#include \"Components/AudioComponent.h\"", "FootstepAudioComponent = CreateDefaultSubobject", "FootstepAudioComponent->bAllowSpatialization = true", "UpdateFootstepAudio(DeltaSeconds);", "GetCurrentFootstepSound()", "GetCurrentFootstepIntervalSeconds()", "GetCharacterMovement()->IsFalling()", ], TDD: [ "native footstep placeholders", "`FootstepAudioComponent`", "walk, sprint, crouch, and prone sound", ], ROADMAP: [ "[x] Add footstep placeholders.", ], } def main() -> None: missing = [] for path, snippets in REQUIRED.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 SystemExit("FAILED: " + "; ".join(missing)) print("OK: footstep placeholder hooks are implemented.") if __name__ == "__main__": main()