mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Fix Supermatter Warning the Entire Station on explode
SM, as it exists currently, will play the delamination warning over radio comms/globally when it is close to exploding, even if it isn't located on the station. It would also benefit from a causality field, even outside it. This fixes that. Supermatter will no longer warn the entire station if it is presently being damaged unless it exists on the same levels as the station. It will also skip the causality field otherwise, though this is subject to Headmin review.
This commit is contained in:
@@ -249,6 +249,9 @@
|
||||
var/alert_msg = " Integrity at [integrity]%"
|
||||
var/message_sound = 'sound/ambience/matteralarm.ogg'
|
||||
|
||||
if(!(src.z in using_map.station_levels)) // CHOMPEdit: SM Global Warn Fix; Is our location the same as the station? If no, then we're not going to warn.
|
||||
return // CHOMPEdit: SM Global Warn Fix; No need to announce if we're outside the station's Z, at a POI, etc.
|
||||
|
||||
if(final_countdown) // Chompers additon
|
||||
return
|
||||
if(damage > emergency_point)
|
||||
@@ -407,6 +410,10 @@
|
||||
/obj/machinery/power/supermatter/proc/countdown()
|
||||
set waitfor = FALSE
|
||||
|
||||
if(!(src.z in using_map.station_levels)) // CHOMPEdit: SM Global Warn Fix; Is our location the same as the station? If no, then we're not going to use a stabilization field.
|
||||
explode() // CHOMPEdit: SM Global Warn Fix; Just exploding, because we're not on the station's Z. No safety countdown.
|
||||
return // CHOMPEdit: SM Global Warn Fix; Stops the code here.
|
||||
|
||||
if(final_countdown) // We're already doing it go away
|
||||
return
|
||||
final_countdown = TRUE
|
||||
|
||||
Reference in New Issue
Block a user