Merge pull request #4152 from Anewbe/claustrophobia_nullcheck

Adds a nullcheck to the claustrophobia trait
This commit is contained in:
Mechoid
2017-10-26 10:56:59 -07:00
committed by GitHub

View File

@@ -268,6 +268,7 @@
total_lum += T.get_lumcount() total_lum += T.get_lumcount()
total_tiles++ total_tiles++
if(total_tiles)
average_lum = total_lum / total_tiles average_lum = total_lum / total_tiles
if(average_lum > fear_threshold) if(average_lum > fear_threshold)