[MIRROR] timestop the SM [MDB IGNORE] (#20352)

* timestop the SM (#74302)

## About The Pull Request

Allows the timestop effects to freeze the Supermatter processing so that
engineers might be able to save it this time
## Why It's Good For The Game

Both wizards and science nerds are able to stop the SM seconds from
meltdown so that engies can figure out what's the right pipe to place to
prevent a destruction of property.
## Changelog
🆑
add: Timestop blocks the SM from processing (can't be healed, doesn't
output gases but can still take damage)
/🆑

* timestop the SM

---------

Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-04-05 11:32:12 -07:00
committed by GitHub
co-authored by Ghilker
parent eb2e02aa37
commit 2090bf4df3
5 changed files with 39 additions and 8 deletions
@@ -95,3 +95,7 @@
#define COMSIG_ATOM_PROPAGATE_RAD_PULSE "atom_propagate_radiation_pulse"
/// from cosmetic items to restyle certain mobs, objects or organs: (atom/source, mob/living/trimmer, atom/movable/original_target, body_zone, restyle_type, style_speed)
#define COMSIG_ATOM_RESTYLE "atom_restyle"
/// when a timestop ability is used on the atom: (datum/proximity_monitor/advanced/timestop)
#define COMSIG_ATOM_TIMESTOP_FREEZE "atom_timestop_freeze"
/// when the timestop ability effect ends on the atom: (datum/proximity_monitor/advanced/timestop)
#define COMSIG_ATOM_TIMESTOP_UNFREEZE "atom_timestop_unfreeze"
+7
View File
@@ -71,6 +71,13 @@
/// Purge the current forced delam and make it zero again (back to normal).
/// Needs to be higher priority than current forced_delam though.
#define SM_DELAM_STRATEGY_PURGE null
///Totally disable the processing of the SM, used on the hugbox
#define SM_PROCESS_DISABLED -1
///Totally disable the processing of the SM, set when the timestop effect hit the SM
#define SM_PROCESS_TIMESTOP 0
///Enable the SM to process atmos and internal procs
#define SM_PROCESS_ENABLED 1
// These are used by supermatter and supermatter monitor program, mostly for UI updating purposes. Higher should always be worse!
// [/obj/machinery/power/supermatter_crystal/proc/get_status]
@@ -132,6 +132,8 @@
RegisterSignal(A, COMSIG_MOVABLE_PRE_MOVE, PROC_REF(unfreeze_atom))
RegisterSignal(A, COMSIG_ITEM_PICKUP, PROC_REF(unfreeze_atom))
SEND_SIGNAL(A, COMSIG_ATOM_TIMESTOP_FREEZE, src)
return TRUE
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_all()
@@ -142,7 +144,6 @@
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_atom(atom/movable/A)
SIGNAL_HANDLER
if(A.throwing)
unfreeze_throwing(A)
if(isliving(A))
@@ -154,6 +155,9 @@
UnregisterSignal(A, COMSIG_MOVABLE_PRE_MOVE)
UnregisterSignal(A, COMSIG_ITEM_PICKUP)
SEND_SIGNAL(A, COMSIG_ATOM_TIMESTOP_UNFREEZE, src)
escape_the_negative_zone(A)
A.move_resist = frozen_things[A]
frozen_things -= A
@@ -166,7 +170,6 @@
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_mecha(obj/vehicle/sealed/mecha/M)
M.completely_disabled = FALSE
/datum/proximity_monitor/advanced/timestop/proc/freeze_throwing(atom/movable/AM)
var/datum/thrownthing/T = AM.throwing
T.paused = TRUE
+21 -4
View File
@@ -144,9 +144,10 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
var/disable_gas = FALSE
/// Disables power changes.
var/disable_power_change = FALSE
/// Disables the SM's proccessing totally.
/// Make sure absorbed_gasmix and gas_percentage isnt null if this is on.
var/disable_process = FALSE
/// Disables the SM's proccessing totally when set to SM_PROCESS_DISABLED.
/// Temporary disables the processing when it's set to SM_PROCESS_TIMESTOP.
/// Make sure absorbed_gasmix and gas_percentage isnt null if this is on SM_PROCESS_DISABLED.
var/disable_process = SM_PROCESS_ENABLED
///Stores the time of when the last zap occurred
var/last_power_zap = 0
@@ -188,6 +189,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
AddElement(/datum/element/bsa_blocker)
RegisterSignal(src, COMSIG_ATOM_BSA_BEAM, PROC_REF(force_delam))
RegisterSignal(src, COMSIG_ATOM_TIMESTOP_FREEZE, PROC_REF(time_frozen))
RegisterSignal(src, COMSIG_ATOM_TIMESTOP_UNFREEZE, PROC_REF(time_unfrozen))
var/static/list/loc_connections = list(
COMSIG_TURF_INDUSTRIAL_LIFT_ENTER = PROC_REF(tram_contents_consume),
@@ -235,7 +238,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
/obj/machinery/power/supermatter_crystal/process_atmos()
// PART 1: PRELIMINARIES
if(disable_process)
if(disable_process != SM_PROCESS_ENABLED)
return
var/turf/local_turf = loc
@@ -441,6 +444,20 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
else
icon_state = base_icon_state
/obj/machinery/power/supermatter_crystal/proc/time_frozen()
SIGNAL_HANDLER
if(disable_process != SM_PROCESS_ENABLED)
return
disable_process = SM_PROCESS_TIMESTOP
/obj/machinery/power/supermatter_crystal/proc/time_unfrozen()
SIGNAL_HANDLER
if(disable_process != SM_PROCESS_TIMESTOP)
return
disable_process = SM_PROCESS_ENABLED
/obj/machinery/power/supermatter_crystal/proc/force_delam()
SIGNAL_HANDLER
investigate_log("was forcefully delaminated", INVESTIGATE_ENGINE)
@@ -3,7 +3,7 @@
disable_damage = TRUE
disable_gas = TRUE
disable_power_change = TRUE
disable_process = TRUE
disable_process = SM_PROCESS_DISABLED
/// Normal SM designated as main engine.
/obj/machinery/power/supermatter_crystal/engine
@@ -28,7 +28,7 @@
disable_damage = TRUE
disable_gas = TRUE
disable_power_change = TRUE
disable_process = TRUE
disable_process = SM_PROCESS_DISABLED
moveable = FALSE
anchored = TRUE