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_footstep_placeholders.py

60 lines
1.9 KiB
Python

#!/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<USoundBase> WalkFootstepSound;",
"TObjectPtr<USoundBase> SprintFootstepSound;",
"TObjectPtr<USoundBase> CrouchFootstepSound;",
"TObjectPtr<USoundBase> ProneFootstepSound;",
"WalkFootstepIntervalSeconds",
"SprintFootstepIntervalSeconds",
"CrouchFootstepIntervalSeconds",
"ProneFootstepIntervalSeconds",
"void UpdateFootstepAudio(float DeltaSeconds);",
],
CHAR_CPP: [
"#include \"Components/AudioComponent.h\"",
"FootstepAudioComponent = CreateDefaultSubobject<UAudioComponent>",
"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()