Skip to content

Commit

Permalink
Fixed Wildfire
Browse files Browse the repository at this point in the history
- Looks like mistake from an "undo", extra check caused a single fire spawn followed by ending the event
  • Loading branch information
Aaron C Robinson committed Nov 27, 2017
1 parent 1a0dea6 commit e7eae88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Binary file modified Assemblies/SeasonalWeather.dll
Binary file not shown.
12 changes: 4 additions & 8 deletions Source/SeasonalWeather/GameConditions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public override void Init()
base.Init();
IntRange range = new IntRange((int)(base.Map.Size.x * 0.23f), (int)(base.Map.Size.x * 0.4f));
this.fires = range.RandomInRange;
Log.Message($"{this.fires}");
// how to find out if this side is a mountain face?
this.direction = Rot4.Random;
}
Expand All @@ -101,7 +102,7 @@ public override void ExposeData()

public override void GameConditionTick()
{
if (this.seedingFires && Find.TickManager.TicksGame > this.nextFireTicks)
if (this.seedingFires)
{
if (Find.TickManager.TicksGame > this.nextFireTicks)
{
Expand All @@ -113,19 +114,14 @@ public override void GameConditionTick()
}
} else
{
if (noFirewatcher)
base.Map.fireWatcher.FireWatcherTick();
if (!base.Map.fireWatcher.LargeFireDangerPresent)
{
Log.Message("GameCondition_Wildfire averted");
// TODO: letter?
this.Duration = 0; // Expired => true
}
}

for (int j = 0; j < this.overlays.Count; j++)
this.overlays[j].TickOverlay(base.Map);

if (noFirewatcher)
base.Map.fireWatcher.FireWatcherTick();
}

public override void GameConditionDraw()
Expand Down

0 comments on commit e7eae88

Please sign in to comment.