Merge pull request #35371 from kevinz000/patch-444

doppler arrays no longer runtime when processing < 5/10/20 bombs
This commit is contained in:
vuonojenmustaturska
2018-02-07 12:38:09 +02:00
committed by CitadelStationBot
parent d6f916f37b
commit a93f9509fc
+7 -2
View File
@@ -110,8 +110,13 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
if(!istype(linked_techweb))
say("Warning: No linked research system!")
return
var/point_gain = techweb_scale_bomb(orig_light - 20 - linked_techweb.max_bomb_value)
if(!point_gain)
var/adjusted = orig_light - 20 - linked_techweb.max_bomb_value
if(adjusted <= 0)
say("Explosion not large enough for research calculations.")
return
var/point_gain = techweb_scale_bomb(adjusted)
if(point_gain <= 0)
say("Explosion not large enough for research calculations.")
return
linked_techweb.max_bomb_value = orig_light - 20
linked_techweb.research_points += point_gain