fixes a divide-by-zero whoops
This commit is contained in:
@@ -117,10 +117,9 @@
|
||||
continue
|
||||
contam_atoms += thing
|
||||
var/did_contam = 0
|
||||
if(can_contam)
|
||||
if(can_contam && contam_atoms.len)
|
||||
var/rad_strength = ((strength-RAD_MINIMUM_CONTAMINATION) * RAD_CONTAMINATION_STR_COEFFICIENT)/contam_atoms.len
|
||||
for(var/k in 1 to contam_atoms.len)
|
||||
var/atom/thing = contam_atoms[k]
|
||||
for(var/thing in contam_atoms)
|
||||
thing.AddComponent(/datum/component/radioactive, rad_strength, source)
|
||||
did_contam = 1
|
||||
return did_contam
|
||||
|
||||
Reference in New Issue
Block a user