mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Adds an EMP protection component, allowing ANYTHING to be protected from EMP (#37671)
The component is initialized with any combination of three flags, EMP_PROTECT_SELF protects against effects that target the object itself, EMP_PROTECT_WIRES protects against wires being messed with similar to the NO_EMP_WIRES_1 flag which this PR removes, EMP_PROTECT_CONTENTS protects against things that are inside the object like organs, internal "non-virtual" power cells and the like This enables (but doesn't introduce) new mechanics such as adding EMP shielding at runtime to any atom, or taking it away.
This commit is contained in:
committed by
yogstation13-bot
parent
5af3d4dcae
commit
ddd4409133
@@ -144,6 +144,9 @@
|
||||
|
||||
// EMPs are similar to explosions, but don't cause physical damage to the casing. Instead they screw up the components
|
||||
/obj/machinery/modular_computer/emp_act(severity)
|
||||
. = ..()
|
||||
if(. & EMP_PROTECT_CONTENTS)
|
||||
return
|
||||
if(cpu)
|
||||
cpu.emp_act(severity)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user