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:
vuonojenmustaturska
2018-05-22 11:38:02 +12:00
committed by oranges
parent 37a08ce59e
commit 1eccbcca18
97 changed files with 408 additions and 187 deletions
@@ -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)