diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm index 1ee9f99c451..ba6c0fe1233 100644 --- a/code/modules/supermatter/supermatter.dm +++ b/code/modules/supermatter/supermatter.dm @@ -126,7 +126,7 @@ integrity = round(100 - integrity * 100) integrity = integrity < 0 ? 0 : integrity var/alert_msg = " Integrity at [integrity]%" - + if(damage > emergency_point) alert_msg = emergency_alert + alert_msg lastwarning = world.timeofday - WARNING_DELAY * 4 @@ -149,7 +149,7 @@ else if(safe_warned && public_alert) radio.autosay(alert_msg, "Supermatter Monitor") public_alert = 0 - + /obj/machinery/power/supermatter/process() @@ -243,9 +243,13 @@ //adjusted range so that a power of 170 (pretty high) results in 9 tiles, roughly the distance from the core to the engine monitoring room. //note that the rads given at the maximum range is a constant 0.2 - as power increases the maximum range merely increases. - for(var/mob/living/l in range(src, round(sqrt(power / 2)))) + //adjusted to pseudo take into account obstacles in the way (1/3rd of the range is dropped if no direct visibility between core and target is) + var/rad_range = round(sqrt(power / 2)) + for(var/mob/living/l in range(src, rad_range)) var/radius = max(get_dist(l, src), 1) var/rads = (power / 10) * ( 1 / (radius**2) ) + if (!(l in oview(rad_range, src)) && !(l in range(src, round(rad_range * 2/3)))) + continue l.apply_effect(rads, IRRADIATE) power -= (power/DECAY_FACTOR)**3 //energy losses due to radiation