From cc1c99559fecbdf4cb148eee26eaabe3bb5917ab Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Mon, 15 Apr 2024 22:59:34 +0300 Subject: [PATCH] Delam scram counter penalty (#2885) * penalties for delam scram * do it in the main check * max penalty of 16 * reset to 0, shrimple * reset on activation Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com> --- code/modules/power/supermatter/supermatter.dm | 1 + modular_nova/modules/delam_emergency_stop/code/scram.dm | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 057fedf7281..6cf6367339b 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -236,6 +236,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) QDEL_NULL(radio) QDEL_NULL(countdown) if(is_main_engine && GLOB.main_supermatter_engine == src) + SSpersistence.reset_delam_counter() // NOVA EDIT ADDITION BEGIN - DELAM SCRAM GLOB.main_supermatter_engine = null QDEL_NULL(soundloop) return ..() diff --git a/modular_nova/modules/delam_emergency_stop/code/scram.dm b/modular_nova/modules/delam_emergency_stop/code/scram.dm index 0ad1ede4e49..e7105b6b60a 100644 --- a/modular_nova/modules/delam_emergency_stop/code/scram.dm +++ b/modular_nova/modules/delam_emergency_stop/code/scram.dm @@ -189,6 +189,7 @@ // Fire bell close, that nice 'are we gonna die?' rumble out far on = TRUE + SSpersistence.reset_delam_counter() alert_sound_to_playing('sound/misc/earth_rumble_distant3.ogg', override_volume = TRUE) update_appearance() @@ -461,6 +462,13 @@ return ..() +/// Resets the safety incident display internal counter back to -1 (delam event happened) +/datum/controller/subsystem/persistence/proc/reset_delam_counter() + delam_highscore = rounds_since_engine_exploded + rounds_since_engine_exploded = -1 + for(var/obj/machinery/incident_display/sign as anything in GLOB.map_delamination_counters) + sign.update_delam_count(rounds_since_engine_exploded) + MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/atmospherics/components/unary/delam_scram, 0) MAPPING_DIRECTIONAL_HELPERS(/obj/structure/sign/delam_procedure, 32)