mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] EMP cleanup (#11939)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
committed by
GitHub
parent
18997e2c84
commit
e98a9f484a
@@ -232,10 +232,10 @@
|
||||
else
|
||||
. += span_notice("The device doesn't appear to be transmitting any data.")
|
||||
|
||||
// Proc: emp_act()
|
||||
// Proc: emp_act(severity, recursive)
|
||||
// Parameters: None
|
||||
// Description: Drops all calls when EMPed, so the holder can then get murdered by the antagonist.
|
||||
/obj/item/communicator/emp_act()
|
||||
/obj/item/communicator/emp_act(severity, recursive)
|
||||
close_connection(reason = "Hardware error de%#_^@%-BZZZZZZZT")
|
||||
|
||||
// Proc: add_to_EPv2()
|
||||
|
||||
@@ -513,7 +513,7 @@
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/item/shockpaddles/emp_act(severity)
|
||||
/obj/item/shockpaddles/emp_act(severity, recursive)
|
||||
var/new_safety = rand(0, 1)
|
||||
if(safety != new_safety)
|
||||
safety = new_safety
|
||||
@@ -593,7 +593,7 @@
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/shockpaddles/standalone/emp_act(severity)
|
||||
/obj/item/shockpaddles/standalone/emp_act(severity, recursive)
|
||||
..()
|
||||
var/new_fail = 0
|
||||
switch(severity)
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/item/flash/emp_act(severity)
|
||||
/obj/item/flash/emp_act(severity, recursive)
|
||||
if(broken) return
|
||||
flash_recharge()
|
||||
if(!check_capacitor())
|
||||
|
||||
@@ -109,11 +109,6 @@
|
||||
user.update_mob_action_buttons()
|
||||
return 1
|
||||
|
||||
/obj/item/flashlight/emp_act(severity)
|
||||
for(var/obj/O in contents)
|
||||
O.emp_act(severity)
|
||||
..()
|
||||
|
||||
/obj/item/flashlight/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
add_fingerprint(user)
|
||||
if(on && user.zone_sel.selecting == O_EYES)
|
||||
|
||||
@@ -161,7 +161,7 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
||||
update_holder()
|
||||
update_icon()
|
||||
|
||||
/obj/item/gps/emp_act(severity)
|
||||
/obj/item/gps/emp_act(severity, recursive)
|
||||
if(emped) // Without a fancy callback system, this will have to do.
|
||||
return
|
||||
var/severity_modifier = severity ? severity : 4 // In case emp_act gets called without any arguments.
|
||||
|
||||
@@ -419,9 +419,9 @@
|
||||
audible_message(span_notice("\The [src] flashes a message across its screen, \"Additional personalities available for download.\""), hearing_distance = world.view, runemessage = "bleeps!")
|
||||
last_notify = world.time
|
||||
|
||||
/obj/item/paicard/emp_act(severity)
|
||||
/obj/item/paicard/emp_act(severity, recursive)
|
||||
for(var/mob/M in src)
|
||||
M.emp_act(severity)
|
||||
M.emp_act(severity, recursive)
|
||||
|
||||
/obj/item/paicard/ex_act(severity)
|
||||
if(pai)
|
||||
|
||||
@@ -112,12 +112,12 @@
|
||||
add_overlay("[initial(icon_state)]-nocell")
|
||||
*/
|
||||
|
||||
/obj/item/personal_shield_generator/emp_act(severity)
|
||||
/obj/item/personal_shield_generator/emp_act(severity, recursive)
|
||||
if(bcell && shield_active)
|
||||
switch(severity)
|
||||
if(1) //Point blank EMP shots have a good chance of burning the cell charge.
|
||||
if(prob(50))
|
||||
bcell.emp_act(severity)
|
||||
bcell.emp_act(severity, recursive)
|
||||
if(prob(5)) //1 in 20% chance to fry the battery completly, which has a 1/10 chance of making the battery explode on next use.
|
||||
bcell.corrupt() //Not too bad if you slotted a battery in. Disasterous if it has a self-charging battery.
|
||||
if(bcell.rigged) //Did the above just rig the cell? Turn it off. Don't immediately have it go boom. Instead have the cell blow soon-ish.
|
||||
@@ -135,8 +135,8 @@
|
||||
update_icon()
|
||||
else
|
||||
if(prob(25))
|
||||
bcell.emp_act(severity)
|
||||
..()
|
||||
bcell.emp_act(severity, recursive)
|
||||
//Intentionally not calling ..() here, as we have special cell handling.
|
||||
|
||||
/obj/item/personal_shield_generator/ui_action_click(mob/user, actiontype)
|
||||
toggle_shield()
|
||||
@@ -434,14 +434,6 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
// TODO: EMP ACT
|
||||
// The cell already gets hit and can have some nasty effects when EMP'd, so this isn't too much of a concern.
|
||||
|
||||
/*
|
||||
/obj/item/gun/energy/gun/generator/emp_act(severity)
|
||||
..()
|
||||
*/
|
||||
|
||||
/obj/item/gun/energy/gun/generator/dropped(mob/user)
|
||||
..() //update twohanding
|
||||
if(shield_generator)
|
||||
|
||||
@@ -601,9 +601,9 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
|
||||
return
|
||||
else return
|
||||
|
||||
/obj/item/radio/emp_act(severity)
|
||||
broadcasting = 0
|
||||
listening = 0
|
||||
/obj/item/radio/emp_act(severity, recursive)
|
||||
broadcasting = FALSE
|
||||
listening = FALSE
|
||||
for (var/ch_name in channels)
|
||||
channels[ch_name] = 0
|
||||
..()
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/datum/matter_synth/proc/add_charge(var/amount)
|
||||
energy = min(energy + amount, max_energy)
|
||||
|
||||
/datum/matter_synth/proc/emp_act(var/severity)
|
||||
/datum/matter_synth/proc/emp_act(severity, recursive)
|
||||
use_charge(max_energy * 0.1 / severity)
|
||||
|
||||
/datum/matter_synth/medicine
|
||||
|
||||
@@ -154,7 +154,7 @@ circuitry. As a result neurotoxins can cause massive damage.<HR>
|
||||
Implant Specifics:<BR>"}
|
||||
return dat
|
||||
|
||||
/obj/item/implant/tracking/emp_act(severity)
|
||||
/obj/item/implant/tracking/emp_act(severity, recursive)
|
||||
if (malfunction) //no, dawg, you can't malfunction while you are malfunctioning
|
||||
return
|
||||
malfunction = MALFUNCTION_TEMPORARY
|
||||
@@ -294,7 +294,7 @@ Implant Specifics:<BR>"}
|
||||
usr.mind.store_memory("Explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate.", 0, 0)
|
||||
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)
|
||||
/obj/item/implant/explosive/emp_act(severity, recursive)
|
||||
if (malfunction)
|
||||
return
|
||||
malfunction = MALFUNCTION_TEMPORARY
|
||||
@@ -398,7 +398,7 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/implant/chem/emp_act(severity)
|
||||
/obj/item/implant/chem/emp_act(severity, recursive)
|
||||
if (malfunction)
|
||||
return
|
||||
malfunction = MALFUNCTION_TEMPORARY
|
||||
@@ -557,7 +557,7 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
qdel(a)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/implant/death_alarm/emp_act(severity) //for some reason alarms stop going off in case they are emp'd, even without this
|
||||
/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
|
||||
return
|
||||
malfunction = MALFUNCTION_TEMPORARY
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
owner = user
|
||||
|
||||
|
||||
/obj/item/implant/sizecontrol/emp_act(severity)
|
||||
/obj/item/implant/sizecontrol/emp_act(severity, recursive)
|
||||
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
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
<b>Integrity:</b> Implant is not shielded from electromagnetic interference, otherwise it is independent of subject's status."}
|
||||
return dat
|
||||
|
||||
/obj/item/implant/integrated_circuit/emp_act(severity)
|
||||
IC.emp_act(severity)
|
||||
/obj/item/implant/integrated_circuit/emp_act(severity, recursive)
|
||||
IC.emp_act(severity, recursive)
|
||||
|
||||
/obj/item/implant/integrated_circuit/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -50,7 +50,7 @@ circuitry. Resulting faults can cause damage to the host's brain.<HR>
|
||||
Implant Specifics:<BR>"}
|
||||
return dat
|
||||
|
||||
/obj/item/implant/neural/emp_act(severity)
|
||||
/obj/item/implant/neural/emp_act(severity, recursive)
|
||||
if(!my_brain)
|
||||
return
|
||||
if(malfunction) //Don't malfunction while malfunctioning.
|
||||
|
||||
@@ -38,11 +38,6 @@
|
||||
/obj/item/inducer/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/item/inducer/emp_act(severity)
|
||||
. = ..()
|
||||
if(cell)
|
||||
cell.emp_act(severity)
|
||||
|
||||
/obj/item/inducer/attack(mob/living/M, mob/living/user)
|
||||
if(user.a_intent == I_HURT)
|
||||
return ..()
|
||||
|
||||
@@ -267,11 +267,9 @@
|
||||
update_held_icon()
|
||||
powercheck(hitcost)
|
||||
|
||||
/obj/item/melee/shock_maul/emp_act(severity)
|
||||
if(bcell)
|
||||
bcell.emp_act(severity) //let's not duplicate code everywhere if we don't have to please.
|
||||
/obj/item/melee/shock_maul/emp_act(severity, recursive)
|
||||
if(status)
|
||||
status = 0
|
||||
status = FALSE
|
||||
visible_message(span_warning("\The [src]'s power field hisses and sputters out."))
|
||||
update_held_icon()
|
||||
..()
|
||||
|
||||
@@ -702,12 +702,6 @@
|
||||
total_storage_space += I.get_storage_cost()
|
||||
max_storage_space = max(total_storage_space,max_storage_space) //Prevents spawned containers from being too small for their contents.
|
||||
|
||||
/obj/item/storage/emp_act(severity)
|
||||
if(!isliving(src.loc))
|
||||
for(var/obj/O in contents)
|
||||
O.emp_act(severity)
|
||||
..()
|
||||
|
||||
/obj/item/storage/attack_self(mob/user as mob)
|
||||
if((user.get_active_hand() == src) || (isrobot(user)) && allow_quick_empty)
|
||||
if(src.verbs.Find(/obj/item/storage/verb/quick_empty))
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
if(new_color && (new_color != color))
|
||||
color = new_color
|
||||
|
||||
/obj/item/storage/wallet/poly/emp_act()
|
||||
/obj/item/storage/wallet/poly/emp_act(severity, recursive)
|
||||
var/original_state = icon_state
|
||||
icon_state = "wallet-emp"
|
||||
update_icon()
|
||||
@@ -134,6 +134,7 @@
|
||||
if(src)
|
||||
icon_state = original_state
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/item/storage/wallet/womens
|
||||
name = "women's wallet"
|
||||
|
||||
@@ -213,11 +213,6 @@
|
||||
H.forcesay(GLOB.hit_appends)
|
||||
powercheck()
|
||||
|
||||
/obj/item/melee/baton/emp_act(severity)
|
||||
if(bcell)
|
||||
bcell.emp_act(severity) //let's not duplicate code everywhere if we don't have to please.
|
||||
..()
|
||||
|
||||
//Makeshift stun baton. Replacement for stun gloves.
|
||||
/obj/item/melee/baton/cattleprod
|
||||
name = "stunprod"
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/secure_closet/emp_act(severity)
|
||||
for(var/obj/O in src)
|
||||
O.emp_act(severity)
|
||||
/obj/structure/closet/secure_closet/emp_act(severity, recursive)
|
||||
if(!broken)
|
||||
if(prob(50/severity))
|
||||
locked = !locked
|
||||
|
||||
@@ -223,15 +223,13 @@
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/crate/secure/emp_act(severity)
|
||||
for(var/obj/O in src)
|
||||
O.emp_act(severity)
|
||||
/obj/structure/closet/crate/secure/emp_act(severity, recursive)
|
||||
if(!broken && !opened && prob(50/severity))
|
||||
if(!locked)
|
||||
locked = 1
|
||||
locked = TRUE
|
||||
else
|
||||
playsound(src, 'sound/effects/sparks4.ogg', 75, 1)
|
||||
locked = 0
|
||||
locked = FALSE
|
||||
if(!opened && prob(20/severity))
|
||||
if(!locked)
|
||||
open()
|
||||
|
||||
Reference in New Issue
Block a user