Skip to content

Commit

Permalink
Fixing case where wildfire is fully within the window but deals no da…
Browse files Browse the repository at this point in the history
…mage
  • Loading branch information
xephero committed Oct 7, 2018
1 parent e0c3231 commit fe731ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tethercalc.py
Expand Up @@ -253,6 +253,10 @@ def get_tick_damages(report, start, end):

# Wildfire handling. This part is hard
for source, wildfire in wildfires.items():
# If wildfire never went off, set to 0 damage
if 'damage' not in wildfire:
wildfire['damage'] = 0

# If entirely within the window, just add the real value
if ('start' in wildfire and
'end' in wildfire and
Expand Down

0 comments on commit fe731ab

Please sign in to comment.