mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
Stops HFRs (and other INDESTRUCTIBLE machinery) from being able to be blown up if an explosion's epicenter is on the tile (#62164)
* Stops HFRs from being able to be blown up if an explosion's epicenter is on the tile * Stops stationloving objects from being able to be teleported to HFR core * Automatically add PREVENT_CONTENTS_EXPLOSION_1 to all INDESTRUCTIBLE machinery * Document reason for PREVENT_CONTENTS_EXPLOSION_1 flag being needed
This commit is contained in:
@@ -159,7 +159,11 @@
|
||||
|
||||
if(occupant_typecache)
|
||||
occupant_typecache = typecacheof(occupant_typecache)
|
||||
|
||||
|
||||
if((resistance_flags & INDESTRUCTIBLE) && component_parts){ // This is needed to prevent indestructible machinery still blowing up. If an explosion occurs on the same tile as the indestructible machinery without the PREVENT_CONTENTS_EXPLOSION_1 flag, /datum/controller/subsystem/explosions/proc/propagate_blastwave will call ex_act on all movable atoms inside the machine, including the circuit board and component parts. However, if those parts get deleted, the entire machine gets deleted, allowing for INDESTRUCTIBLE machines to be destroyed. (See #62164 for more info)
|
||||
flags_1 |= PREVENT_CONTENTS_EXPLOSION_1
|
||||
}
|
||||
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/machinery/LateInitialize()
|
||||
|
||||
@@ -171,6 +171,15 @@
|
||||
radio.listening = 0
|
||||
radio.recalculateChannels()
|
||||
investigate_log("has been created.", INVESTIGATE_HYPERTORUS)
|
||||
|
||||
RegisterSignal(src.loc, COMSIG_ATOM_ENTERED, .proc/on_entered)
|
||||
|
||||
for(var/atom/movable/movable_object in src.loc)
|
||||
SEND_SIGNAL(movable_object, COMSIG_MOVABLE_SECLUDED_LOCATION)
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/hypertorus/core/proc/on_entered(datum/source, atom/movable/arrived, atom/old_loc, list/atom/old_locs)
|
||||
SIGNAL_HANDLER
|
||||
SEND_SIGNAL(arrived, COMSIG_MOVABLE_SECLUDED_LOCATION) // to prevent stationloving items (eg. nuke disk) being teleported onto core
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/hypertorus/core/Destroy()
|
||||
unregister_signals(TRUE)
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF
|
||||
flags_1 = PREVENT_CONTENTS_EXPLOSION_1
|
||||
layer = OBJ_LAYER
|
||||
pipe_flags = PIPING_ONE_PER_TURF | PIPING_DEFAULT_LAYER_ONLY
|
||||
circuit = /obj/item/circuitboard/machine/thermomachine
|
||||
@@ -128,6 +129,7 @@
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF
|
||||
flags_1 = PREVENT_CONTENTS_EXPLOSION_1
|
||||
power_channel = AREA_USAGE_ENVIRON
|
||||
var/active = FALSE
|
||||
var/icon_state_open
|
||||
|
||||
Reference in New Issue
Block a user