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_fire_weather_behavior.py
T
2026-05-17 19:21:26 -07:00

53 lines
1.8 KiB
Python

from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
REQUIRED = {
ROOT / "Source" / "AgrarianGame" / "AgrarianCampfire.h": [
"#include \"AgrarianTypes.h\"",
"float RainFuelDrainMultiplier = 1.5f;",
"float StormFuelDrainMultiplier = 2.5f;",
"float WetWeatherExtinguishFuelThresholdSeconds = 6.0f;",
"bool bWetWeatherCanExtinguish = true;",
"float GetWeatherFuelDrainMultiplier() const;",
"bool IsWetWeatherActive() const;",
"EAgrarianWeatherType GetCurrentWeather() const;",
],
ROOT / "Source" / "AgrarianGame" / "AgrarianCampfire.cpp": [
"#include \"AgrarianGameState.h\"",
"DeltaSeconds * GetWeatherFuelDrainMultiplier()",
"bWetWeatherCanExtinguish && IsWetWeatherActive()",
"WetWeatherExtinguishFuelThresholdSeconds",
"Extinguish();",
"case EAgrarianWeatherType::Rain:",
"case EAgrarianWeatherType::Storm:",
"World->GetGameState<AAgrarianGameState>()",
"return EAgrarianWeatherType::Clear;",
],
ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md": [
"- [x] Connect rain/weather to fire behavior.",
],
ROOT / "Docs" / "TechnicalDesignDocument.md": [
"Campfires now read the replicated `AAgrarianGameState::Weather` value",
],
}
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 weather behavior verification failed:\n" + "\n".join(missing))
print("PASS: campfire weather behavior is implemented and documented.")
if __name__ == "__main__":
main()