mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-26 06:40:08 +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
@@ -8,7 +8,6 @@
|
||||
flags = NOBLUDGEON
|
||||
w_class = ITEMSIZE_SMALL
|
||||
origin_tech = list(TECH_ILLEGAL = 2)
|
||||
var/datum/wires/explosive/c4/wires = null
|
||||
var/timer = 10
|
||||
var/atom/target = null
|
||||
var/open_panel = 0
|
||||
@@ -20,7 +19,7 @@
|
||||
|
||||
/obj/item/plastique/Initialize(mapload)
|
||||
. = ..()
|
||||
wires = new(src)
|
||||
set_wires(new /datum/wires/explosive/c4(src))
|
||||
image_overlay = image('icons/obj/assemblies.dmi', "plastic-explosive2")
|
||||
|
||||
/obj/item/plastique/Destroy()
|
||||
|
||||
@@ -155,7 +155,8 @@ Implant Specifics:<BR>"}
|
||||
return dat
|
||||
|
||||
/obj/item/implant/tracking/emp_act(severity, recursive)
|
||||
if (malfunction) //no, dawg, you can't malfunction while you are malfunctioning
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || malfunction) //no, dawg, you can't malfunction while you are malfunctioning
|
||||
return
|
||||
malfunction = MALFUNCTION_TEMPORARY
|
||||
|
||||
@@ -295,7 +296,8 @@ Implant Specifics:<BR>"}
|
||||
to_chat(usr, "The implanted explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate.")
|
||||
|
||||
/obj/item/implant/explosive/emp_act(severity, recursive)
|
||||
if (malfunction)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || malfunction)
|
||||
return
|
||||
malfunction = MALFUNCTION_TEMPORARY
|
||||
switch (severity)
|
||||
@@ -399,7 +401,8 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
return
|
||||
|
||||
/obj/item/implant/chem/emp_act(severity, recursive)
|
||||
if (malfunction)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || malfunction)
|
||||
return
|
||||
malfunction = MALFUNCTION_TEMPORARY
|
||||
|
||||
@@ -565,7 +568,8 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/implant/death_alarm/emp_act(severity, recursive) //for some reason alarms stop going off in case they are emp'd, even without this
|
||||
if (malfunction) //so I'm just going to add a meltdown chance here
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || malfunction) //so I'm just going to add a meltdown chance here
|
||||
return
|
||||
malfunction = MALFUNCTION_TEMPORARY
|
||||
if(prob(40)) //CHOMPEDIT: Make the malfunction a probability because annoying
|
||||
|
||||
@@ -114,6 +114,9 @@
|
||||
|
||||
|
||||
/obj/item/implant/sizecontrol/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(isliving(imp_in))
|
||||
var/newsize = pick(RESIZE_HUGE,RESIZE_BIG,RESIZE_NORMAL,RESIZE_SMALL,RESIZE_TINY,RESIZE_A_HUGEBIG,RESIZE_A_BIGNORMAL,RESIZE_A_NORMALSMALL,RESIZE_A_SMALLTINY)
|
||||
var/mob/living/H = imp_in
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
return dat
|
||||
|
||||
/obj/item/implant/integrated_circuit/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
IC.emp_act(severity, recursive)
|
||||
|
||||
/obj/item/implant/integrated_circuit/examine(mob/user)
|
||||
|
||||
@@ -51,9 +51,8 @@ Implant Specifics:<BR>"}
|
||||
return dat
|
||||
|
||||
/obj/item/implant/neural/emp_act(severity, recursive)
|
||||
if(!my_brain)
|
||||
return
|
||||
if(malfunction) //Don't malfunction while malfunctioning.
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || !my_brain || malfunction)
|
||||
return
|
||||
malfunction = MALFUNCTION_TEMPORARY
|
||||
|
||||
|
||||
@@ -256,6 +256,8 @@
|
||||
|
||||
/obj/item/medigun_backpack/emp_act(severity)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(bcell)
|
||||
bcell.emp_act(severity)
|
||||
|
||||
|
||||
@@ -374,7 +374,7 @@
|
||||
if(istype(AM, /obj) && proximity && active)
|
||||
// EMP stuff.
|
||||
var/obj/O = AM
|
||||
O.emp_act(3) // A weaker severity is used because this has infinite uses.
|
||||
O.emp_act(EMP_LIGHT) // A weaker severity is used because this has infinite uses.
|
||||
playsound(O, 'sound/effects/EMPulse.ogg', 100, 1)
|
||||
user.setClickCooldown(user.get_attack_speed(src)) // A lot of objects don't set click delay.
|
||||
return ..()
|
||||
@@ -383,7 +383,7 @@
|
||||
. = ..()
|
||||
if(target.isSynthetic() && active)
|
||||
// Do some extra damage. Not a whole lot more since emp_act() is pretty nasty on FBPs already.
|
||||
target.emp_act(3) // A weaker severity is used because this has infinite uses.
|
||||
target.emp_act(EMP_LIGHT) // A weaker severity is used because this has infinite uses.
|
||||
playsound(target, 'sound/effects/EMPulse.ogg', 100, 1)
|
||||
target.adjustFireLoss(force * 3) // 15 Burn, for 20 total.
|
||||
playsound(target, 'sound/weapons/blade1.ogg', 100, 1)
|
||||
|
||||
@@ -271,11 +271,12 @@
|
||||
powercheck(hitcost)
|
||||
|
||||
/obj/item/melee/shock_maul/emp_act(severity, recursive)
|
||||
if(status)
|
||||
status = FALSE
|
||||
visible_message(span_warning("\The [src]'s power field hisses and sputters out."))
|
||||
update_held_icon()
|
||||
..()
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || !status)
|
||||
return
|
||||
status = FALSE
|
||||
visible_message(span_warning("\The [src]'s power field hisses and sputters out."))
|
||||
update_held_icon()
|
||||
|
||||
/obj/item/melee/shock_maul/get_description_interaction()
|
||||
var/list/results = list()
|
||||
|
||||
@@ -126,6 +126,9 @@
|
||||
color = new_color
|
||||
|
||||
/obj/item/storage/wallet/poly/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
var/original_state = icon_state
|
||||
icon_state = "wallet-emp"
|
||||
update_icon()
|
||||
@@ -134,7 +137,6 @@
|
||||
if(src)
|
||||
icon_state = original_state
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/item/storage/wallet/womens
|
||||
name = "women's wallet"
|
||||
|
||||
Reference in New Issue
Block a user