Skip to content

Commit

Permalink
Delam scram counter penalty (#2885)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
Steals-The-PRs and lessthnthree authored Apr 15, 2024
1 parent 7fbc5c0 commit cc1c995
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/modules/power/supermatter/supermatter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..()
Expand Down
8 changes: 8 additions & 0 deletions modular_nova/modules/delam_emergency_stop/code/scram.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit cc1c995

Please sign in to comment.