mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +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
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user