45 lines
1.4 KiB
Python
45 lines
1.4 KiB
Python
from pathlib import Path
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
REQUIRED = {
|
|
ROOT / "Source" / "AgrarianGame" / "AgrarianCampfire.h": [
|
|
"class UParticleSystemComponent;",
|
|
"TObjectPtr<UParticleSystemComponent> SmokeEffect;",
|
|
],
|
|
ROOT / "Source" / "AgrarianGame" / "AgrarianCampfire.cpp": [
|
|
"#include \"Particles/ParticleSystemComponent.h\"",
|
|
"SmokeEffect = CreateDefaultSubobject<UParticleSystemComponent>(TEXT(\"SmokeEffect\"));",
|
|
"SmokeEffect->bAutoActivate = false;",
|
|
"SmokeEffect->SetVisibility(false);",
|
|
"SmokeEffect->SetVisibility(bLit);",
|
|
"SmokeEffect->ActivateSystem();",
|
|
"SmokeEffect->DeactivateSystem();",
|
|
],
|
|
ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md": [
|
|
"- [x] Add smoke/visual effect placeholder.",
|
|
],
|
|
ROOT / "Docs" / "TechnicalDesignDocument.md": [
|
|
"assetless `SmokeEffect` particle-system component",
|
|
],
|
|
}
|
|
|
|
|
|
def main():
|
|
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("Campfire smoke placeholder verification failed:\n" + "\n".join(missing))
|
|
|
|
print("PASS: campfire smoke placeholder is implemented and documented.")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|