From 7b3c980347f1c52bfe3db0f42b47a7c3e1702ecd Mon Sep 17 00:00:00 2001 From: Migratingcocofruit <69551563+Migratingcocofruit@users.noreply.github.com> Date: Fri, 4 Apr 2025 19:14:24 +0300 Subject: [PATCH] improves SM warnings (#28618) --- .../power/engines/supermatter/supermatter.dm | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/code/modules/power/engines/supermatter/supermatter.dm b/code/modules/power/engines/supermatter/supermatter.dm index fe58695cd49..340f982d328 100644 --- a/code/modules/power/engines/supermatter/supermatter.dm +++ b/code/modules/power/engines/supermatter/supermatter.dm @@ -663,31 +663,34 @@ if(damage > warning_point) // while the core is still damaged and it's still worth noting its status if((REALTIMEOFDAY - lastwarning) / 10 >= WARNING_DELAY) alarm() - - //Oh shit it's bad, time to freak out - if(damage > emergency_point) - radio.autosay("[emergency_alert] Integrity: [get_integrity()]%", name, null) - lastwarning = REALTIMEOFDAY - if(!has_reached_emergency) - investigate_log("has reached the emergency point for the first time.", INVESTIGATE_SUPERMATTER) - message_admins("[src] has reached the emergency point [ADMIN_JMP(src)].") - has_reached_emergency = TRUE - else if(damage >= damage_archived) // The damage is still going up - radio.autosay("[warning_alert] Integrity: [get_integrity()]%", name, "Engineering") - lastwarning = REALTIMEOFDAY - (WARNING_DELAY * 5) - - else // Phew, we're safe + if(damage < damage_archived) // We are gaining integrity. Just say that radio.autosay("[safe_alert] Integrity: [get_integrity()]%", name, "Engineering") lastwarning = REALTIMEOFDAY + else // We are losing integrity, let's warn engineering. + if(damage > emergency_point) //Oh shit it's bad, time to freak out + radio.autosay("[emergency_alert] Integrity: [get_integrity()]%", name, null) + lastwarning = REALTIMEOFDAY + if(!has_reached_emergency) + investigate_log("has reached the emergency point for the first time.", "supermatter") + message_admins("[src] has reached the emergency point [ADMIN_JMP(src)].") + has_reached_emergency = TRUE + else // The damage is still going up but not yet super high + radio.autosay("[warning_alert] Integrity: [get_integrity()]%", name, "Engineering") + lastwarning = REALTIMEOFDAY - (WARNING_DELAY * 5) - if(power > POWER_PENALTY_THRESHOLD) - radio.autosay("Warning: Hyperstructure has reached dangerous power level.", name, "Engineering") - if(powerloss_inhibitor < 0.5) - radio.autosay("DANGER: CHARGE INERTIA CHAIN REACTION IN PROGRESS.", name, "Engineering") + // Warning for other engine statuses + // We are taking damage from power + if(power > POWER_PENALTY_THRESHOLD) + radio.autosay("Warning: Hyperstructure has reached dangerous power level.", name, "Engineering") + // The current gas mix allows EER to keep building up + if(powerloss_inhibitor < 0.01) + radio.autosay("DANGER: CHARGE INERTIA CHAIN REACTION IN PROGRESS.", name, "Engineering") - if(combined_gas > MOLE_CRUNCH_THRESHOLD) - radio.autosay("Warning: Critical coolant mass reached.", name, "Engineering") - //Boom (Mind blown) + // We are taking mole damage + if(combined_gas > MOLE_PENALTY_THRESHOLD) + radio.autosay("Warning: Critical coolant mass reached.", name, "Engineering") + + //Boom (Mind blown) if(damage > explosion_point) countdown() return 1