Connect campfires to weather

This commit is contained in:
2026-05-17 19:21:26 -07:00
parent 7291c4844b
commit 879a4805c5
5 changed files with 117 additions and 4 deletions
+52
View File
@@ -0,0 +1,52 @@
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()