mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-20 19:57:28 +01:00
[MIRROR] EMP & Wires refactor (#12658)
Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
co-authored by
Guti
Cameron Lennox
parent
494fc9bea9
commit
b116cc450d
@@ -107,6 +107,7 @@
|
||||
return -1
|
||||
|
||||
/obj/item/organ/internal/eyes/emp_act(severity, recursive)
|
||||
..()
|
||||
if(owner && robotic)
|
||||
owner.eye_blurry += (4/severity)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || !robotic || !owner)
|
||||
return
|
||||
owner.eye_blurry += (4/severity)
|
||||
|
||||
@@ -417,6 +417,9 @@
|
||||
robotize()
|
||||
|
||||
/obj/item/organ/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
for(var/obj/O as anything in src.contents)
|
||||
O.emp_act(severity, recursive)
|
||||
|
||||
@@ -424,13 +427,13 @@
|
||||
return
|
||||
for(var/i = 1; i <= robotic; i++)
|
||||
switch (severity)
|
||||
if (1)
|
||||
if (EMP_HEAVY)
|
||||
take_damage(rand(5,9))
|
||||
if (2)
|
||||
if (EMP_MEDIUM)
|
||||
take_damage(rand(3,7))
|
||||
if (3)
|
||||
if (EMP_LIGHT)
|
||||
take_damage(rand(2,5))
|
||||
if (4)
|
||||
if (EMP_HARMLESS)
|
||||
take_damage(rand(1,3))
|
||||
|
||||
/obj/item/organ/proc/removed(var/mob/living/user)
|
||||
|
||||
@@ -131,6 +131,9 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/external/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
for(var/obj/O as anything in src.contents)
|
||||
O.emp_act(severity, recursive)
|
||||
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
owner.visible_message(span_danger("\The [owner] twitches visibly!"))
|
||||
|
||||
/obj/item/organ/internal/cell/emp_act(severity, recursive)
|
||||
..()
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
owner?.adjust_nutrition(-rand(10 / severity, 50 / severity))
|
||||
|
||||
/obj/item/organ/internal/cell/machine/handle_organ_proc_special()
|
||||
@@ -109,11 +111,12 @@
|
||||
if(istype(holder_mob))
|
||||
holder_mob.drop_from_inventory(src)
|
||||
qdel(src)
|
||||
|
||||
/*
|
||||
// EMP loops inside things, this should still work?
|
||||
/obj/item/organ/internal/mmi_holder/emp_act(severity, recursive)
|
||||
if(stored_mmi)
|
||||
stored_mmi.emp_act(severity, recursive)
|
||||
|
||||
*/
|
||||
/obj/item/organ/internal/mmi_holder/posibrain
|
||||
name = "positronic brain interface"
|
||||
brain_type = /obj/item/mmi/digital/posibrain
|
||||
|
||||
@@ -184,10 +184,10 @@
|
||||
icon_state = "posi1"
|
||||
stored_mmi.icon_state = "posi1"
|
||||
stored_mmi.brainmob.languages = owner.languages
|
||||
|
||||
/*
|
||||
/obj/item/organ/internal/mmi_holder/posibrain/nano/emp_act(severity, recursive)
|
||||
return //Proteans handle EMP's differently
|
||||
|
||||
*/
|
||||
// The 'out on the ground' object, not the organ holder
|
||||
/obj/item/mmi/digital/posibrain/nano
|
||||
name = "protean posibrain"
|
||||
|
||||
Reference in New Issue
Block a user