mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-24 05:38:15 +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
@@ -1,2 +1,12 @@
|
||||
/// 33554431 (2^24 - 1) is the maximum value our bitflags can reach.
|
||||
#define MAX_BITFLAG_DIGITS 8
|
||||
|
||||
///Object will protect itself.
|
||||
#define EMP_PROTECT_SELF (1<<0)
|
||||
///Object will protect its contents from being EMPed.
|
||||
#define EMP_PROTECT_CONTENTS (1<<1)
|
||||
///Object will protect its wiring from being EMPed.
|
||||
#define EMP_PROTECT_WIRES (1<<2)
|
||||
|
||||
///Protects against all EMP types.
|
||||
#define EMP_PROTECT_ALL (EMP_PROTECT_SELF | EMP_PROTECT_CONTENTS | EMP_PROTECT_WIRES)
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#define EMP_HEAVY 1
|
||||
#define EMP_MEDIUM 2
|
||||
#define EMP_LIGHT 3
|
||||
#define EMP_HARMLESS 4
|
||||
#define EMP_NONE 5
|
||||
@@ -125,3 +125,7 @@
|
||||
#define WIRE_SORT_FORWARD "Sort Forward"
|
||||
#define WIRE_SORT_SIDE "Sort Side"
|
||||
#define WIRE_SORT_SCAN "Sort Scan"
|
||||
|
||||
#define WIRE_HACK "Hack"
|
||||
#define WIRE_DISABLE "Disable"
|
||||
#define WIRE_SHOCK "High Voltage Ground"
|
||||
|
||||
@@ -1650,3 +1650,59 @@ GLOBAL_DATUM(dview_mob, /mob/dview)
|
||||
final_material_list[mat] = mat_per_item[index]
|
||||
object.set_custom_materials(final_material_list, multiplier)
|
||||
index += 1
|
||||
|
||||
/proc/spiral_range(dist = 0, center = usr, orange = FALSE)
|
||||
var/list/atom_list = list()
|
||||
var/turf/t_center = get_turf(center)
|
||||
if(!t_center)
|
||||
return list()
|
||||
|
||||
if(!orange)
|
||||
atom_list += t_center
|
||||
atom_list += t_center.contents
|
||||
|
||||
if(!dist)
|
||||
return atom_list
|
||||
|
||||
|
||||
var/turf/checked_turf
|
||||
var/y
|
||||
var/x
|
||||
var/c_dist = 1
|
||||
|
||||
|
||||
while( c_dist <= dist )
|
||||
y = t_center.y + c_dist
|
||||
x = t_center.x - c_dist + 1
|
||||
for(x in x to t_center.x + c_dist)
|
||||
checked_turf = locate(x, y, t_center.z)
|
||||
if(checked_turf)
|
||||
atom_list += checked_turf
|
||||
atom_list += checked_turf.contents
|
||||
|
||||
y = t_center.y + c_dist - 1
|
||||
x = t_center.x + c_dist
|
||||
for(y in t_center.y - c_dist to y)
|
||||
checked_turf = locate(x, y, t_center.z)
|
||||
if(checked_turf)
|
||||
atom_list += checked_turf
|
||||
atom_list += checked_turf.contents
|
||||
|
||||
y = t_center.y - c_dist
|
||||
x = t_center.x + c_dist - 1
|
||||
for(x in t_center.x - c_dist to x)
|
||||
checked_turf = locate(x, y, t_center.z)
|
||||
if(checked_turf)
|
||||
atom_list += checked_turf
|
||||
atom_list += checked_turf.contents
|
||||
|
||||
y = t_center.y - c_dist + 1
|
||||
x = t_center.x - c_dist
|
||||
for(y in y to t_center.y + c_dist)
|
||||
checked_turf = locate(x, y, t_center.z)
|
||||
if(checked_turf)
|
||||
atom_list += checked_turf
|
||||
atom_list += checked_turf.contents
|
||||
c_dist++
|
||||
|
||||
return atom_list
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
has_sensor = FALSE // Reveals ling, and doesn't make sense anyway!
|
||||
|
||||
/obj/item/clothing/under/chameleon/changeling/emp_act(severity, recursive) //As these are purely organic, EMP does nothing to them.
|
||||
. = ..()
|
||||
return
|
||||
|
||||
/obj/item/clothing/under/chameleon/changeling/verb/shred() //Remove individual pieces if needed.
|
||||
@@ -53,8 +54,9 @@
|
||||
origin_tech = list()
|
||||
canremove = FALSE
|
||||
|
||||
/obj/item/clothing/head/chameleon/changeling/emp_act(severity, recursive)
|
||||
return
|
||||
/obj/item/clothing/head/chameleon/changeling/Initialize(mapload)
|
||||
. = ..()
|
||||
AddElement(/datum/element/empprotection, EMP_PROTECT_SELF)
|
||||
|
||||
/obj/item/clothing/head/chameleon/changeling/verb/shred() //The copypasta is real.
|
||||
set name = "Shred Helmet"
|
||||
@@ -78,8 +80,9 @@
|
||||
origin_tech = list()
|
||||
canremove = FALSE
|
||||
|
||||
/obj/item/clothing/suit/chameleon/changeling/emp_act(severity, recursive)
|
||||
return
|
||||
/obj/item/clothing/suit/chameleon/changeling/Initialize(mapload)
|
||||
. = ..()
|
||||
AddElement(/datum/element/empprotection, EMP_PROTECT_SELF)
|
||||
|
||||
/obj/item/clothing/suit/chameleon/changeling/verb/shred()
|
||||
set name = "Shred Suit"
|
||||
@@ -103,8 +106,9 @@
|
||||
origin_tech = list()
|
||||
canremove = FALSE
|
||||
|
||||
/obj/item/clothing/shoes/chameleon/changeling/emp_act(severity, recursive)
|
||||
return
|
||||
/obj/item/clothing/shoes/chameleon/changeling/Initialize(mapload)
|
||||
. = ..()
|
||||
AddElement(/datum/element/empprotection, EMP_PROTECT_SELF)
|
||||
|
||||
/obj/item/clothing/shoes/chameleon/changeling/verb/shred()
|
||||
set name = "Shred Shoes"
|
||||
@@ -128,8 +132,9 @@
|
||||
origin_tech = list()
|
||||
canremove = FALSE
|
||||
|
||||
/obj/item/storage/backpack/chameleon/changeling/emp_act(severity, recursive)
|
||||
return
|
||||
/obj/item/storage/backpack/chameleon/changeling/Initialize(mapload)
|
||||
. = ..()
|
||||
AddElement(/datum/element/empprotection, EMP_PROTECT_SELF)
|
||||
|
||||
/obj/item/storage/backpack/chameleon/changeling/verb/shred()
|
||||
set name = "Shred Backpack"
|
||||
@@ -156,8 +161,9 @@
|
||||
origin_tech = list()
|
||||
canremove = FALSE
|
||||
|
||||
/obj/item/clothing/gloves/chameleon/changeling/emp_act(severity, recursive)
|
||||
return
|
||||
/obj/item/clothing/gloves/chameleon/changeling/Initialize(mapload)
|
||||
. = ..()
|
||||
AddElement(/datum/element/empprotection, EMP_PROTECT_SELF)
|
||||
|
||||
/obj/item/clothing/gloves/chameleon/changeling/verb/shred()
|
||||
set name = "Shred Gloves"
|
||||
@@ -182,8 +188,9 @@
|
||||
origin_tech = list()
|
||||
canremove = FALSE
|
||||
|
||||
/obj/item/clothing/mask/chameleon/changeling/emp_act(severity, recursive)
|
||||
return
|
||||
/obj/item/clothing/mask/chameleon/changeling/Initialize(mapload)
|
||||
. = ..()
|
||||
AddElement(/datum/element/empprotection, EMP_PROTECT_SELF)
|
||||
|
||||
/obj/item/clothing/mask/chameleon/changeling/verb/shred()
|
||||
set name = "Shred Mask"
|
||||
@@ -203,8 +210,9 @@
|
||||
origin_tech = list()
|
||||
canremove = FALSE
|
||||
|
||||
/obj/item/clothing/glasses/chameleon/changeling/emp_act(severity, recursive)
|
||||
return
|
||||
/obj/item/clothing/glasses/chameleon/changeling/Initialize(mapload)
|
||||
. = ..()
|
||||
AddElement(/datum/element/empprotection, EMP_PROTECT_SELF)
|
||||
|
||||
/obj/item/clothing/glasses/chameleon/changeling/verb/shred()
|
||||
set name = "Shred Glasses"
|
||||
@@ -228,8 +236,9 @@
|
||||
origin_tech = list()
|
||||
canremove = FALSE
|
||||
|
||||
/obj/item/storage/belt/chameleon/changeling/emp_act(severity, recursive)
|
||||
return
|
||||
/obj/item/storage/belt/chameleon/changeling/Initialize(mapload)
|
||||
. = ..()
|
||||
AddElement(/datum/element/empprotection, EMP_PROTECT_SELF)
|
||||
|
||||
/obj/item/storage/belt/chameleon/changeling/verb/shred()
|
||||
set name = "Shred Belt"
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/datum/element/empprotection
|
||||
element_flags = ELEMENT_BESPOKE | ELEMENT_DETACH_ON_HOST_DESTROY // Detach for turfs
|
||||
argument_hash_start_idx = 2
|
||||
var/flags = NONE
|
||||
|
||||
/datum/element/empprotection/Attach(datum/target, _flags)
|
||||
. = ..()
|
||||
if(. == ELEMENT_INCOMPATIBLE || !isatom(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
flags = _flags
|
||||
RegisterSignal(target, COMSIG_ATOM_PRE_EMP_ACT, PROC_REF(getEmpFlags))
|
||||
|
||||
/datum/element/empprotection/Detach(atom/target)
|
||||
UnregisterSignal(target, list(COMSIG_ATOM_PRE_EMP_ACT, COMSIG_ATOM_EXAMINE_TAGS))
|
||||
return ..()
|
||||
|
||||
/datum/element/empprotection/proc/getEmpFlags(datum/source, severity)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
return (flags & EMP_PROTECT_ALL)
|
||||
@@ -59,6 +59,3 @@
|
||||
if(WIRE_CAM_ALARM)
|
||||
C.visible_message("[icon2html(C,viewers(holder))] *beep*", "[icon2html(C,viewers(holder))] *beep*")
|
||||
..()
|
||||
|
||||
/datum/wires/camera/proc/CanDeconstruct()
|
||||
return is_all_cut()
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/datum/wires/rnd
|
||||
holder_type = /obj/machinery/rnd
|
||||
proper_name = "R&D Machinery"
|
||||
randomize = TRUE
|
||||
|
||||
/datum/wires/rnd/New(atom/holder)
|
||||
wires = list(
|
||||
WIRE_HACK, WIRE_DISABLE,
|
||||
WIRE_SHOCK
|
||||
)
|
||||
add_duds(5)
|
||||
..()
|
||||
|
||||
/datum/wires/rnd/interactable(mob/user)
|
||||
if(!..())
|
||||
return FALSE
|
||||
var/obj/machinery/rnd/R = holder
|
||||
if(R.panel_open)
|
||||
return TRUE
|
||||
|
||||
/datum/wires/rnd/get_status()
|
||||
var/obj/machinery/rnd/R = holder
|
||||
var/list/status = list()
|
||||
status += "The red light is [R.disabled ? "off" : "on"]."
|
||||
status += "The blue light is [R.hacked ? "off" : "on"]."
|
||||
return status
|
||||
|
||||
/datum/wires/rnd/on_pulse(wire)
|
||||
set waitfor = FALSE
|
||||
var/obj/machinery/rnd/R = holder
|
||||
switch(wire)
|
||||
if(WIRE_HACK)
|
||||
R.hacked = !R.hacked
|
||||
if(WIRE_DISABLE)
|
||||
R.disabled = !R.disabled
|
||||
|
||||
/datum/wires/rnd/on_cut(wire, mend, source)
|
||||
var/obj/machinery/rnd/R = holder
|
||||
switch(wire)
|
||||
if(WIRE_HACK)
|
||||
R.hacked = !mend
|
||||
if(WIRE_DISABLE)
|
||||
R.disabled = !mend
|
||||
@@ -1,3 +1,4 @@
|
||||
#define MAXIMUM_EMP_WIRES 3
|
||||
|
||||
/datum/wires
|
||||
/// TRUE if the wires will be different every time a new wire datum is created.
|
||||
@@ -476,3 +477,16 @@
|
||||
/datum/wires/proc/is_attached(color)
|
||||
if(assemblies[color])
|
||||
return TRUE
|
||||
|
||||
/datum/wires/proc/emp_pulse()
|
||||
var/list/possible_wires = shuffle(wires)
|
||||
var/remaining_pulses = MAXIMUM_EMP_WIRES
|
||||
|
||||
for(var/wire in possible_wires)
|
||||
if(prob(33))
|
||||
pulse(wire)
|
||||
remaining_pulses--
|
||||
if(!remaining_pulses)
|
||||
break
|
||||
|
||||
#undef MAXIMUM_EMP_WIRES
|
||||
|
||||
+17
-5
@@ -63,6 +63,8 @@
|
||||
/// Radiation insulation types
|
||||
var/rad_insulation = RAD_NO_INSULATION
|
||||
|
||||
var/datum/wires/wires = null
|
||||
|
||||
/atom/Destroy()
|
||||
if(reagents)
|
||||
QDEL_NULL(reagents)
|
||||
@@ -142,14 +144,20 @@
|
||||
|
||||
|
||||
/atom/proc/emp_act(severity, recursive)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
recursive++
|
||||
if(recursive > 5) //After a certain depth, we're just going to assume that it's too insulated to be EMP'd.
|
||||
return
|
||||
for(var/atom/A in contents)
|
||||
if(isbelly(A)) //Prey are protected
|
||||
continue
|
||||
A.emp_act(severity, recursive)
|
||||
return
|
||||
var/protection = SEND_SIGNAL(src, COMSIG_ATOM_PRE_EMP_ACT, severity)
|
||||
if(!(protection & EMP_PROTECT_WIRES) && istype(wires))
|
||||
wires.emp_pulse()
|
||||
|
||||
if(!(protection & EMP_PROTECT_CONTENTS))
|
||||
for(var/atom/A in contents)
|
||||
A.emp_act(severity, recursive)
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_EMP_ACT, severity, protection)
|
||||
return protection
|
||||
|
||||
/atom/proc/bullet_act(obj/item/projectile/P, def_zone)
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_BULLET_ACT, P, def_zone) & COMPONENT_CANCEL_ATTACK_CHAIN)
|
||||
@@ -643,3 +651,7 @@ GLOBAL_LIST_EMPTY(icon_dimensions)
|
||||
blood_color = null
|
||||
germ_level = 0
|
||||
fluorescent = 0
|
||||
|
||||
/// Sets the wire datum of an atom
|
||||
/atom/proc/set_wires(datum/wires/new_wires)
|
||||
wires = new_wires
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
if(temp_apc && temp_apc.terminal && temp_apc.terminal.powernet)
|
||||
temp_apc.terminal.powernet.trigger_warning(50) // Long alarm
|
||||
if(temp_apc)
|
||||
temp_apc.emp_act(3) // Such power surges are not good for APC electronics
|
||||
temp_apc.emp_act(EMP_LIGHT) // Such power surges are not good for APC electronics
|
||||
if(temp_apc.cell)
|
||||
temp_apc.cell.maxcharge -= between(0, (temp_apc.cell.maxcharge/2) + 500, temp_apc.cell.maxcharge)
|
||||
if(temp_apc.cell.maxcharge < 100) // That's it, you busted the APC cell completely. Break the APC and completely destroy the cell.
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
safe_blink(src, range = 6)
|
||||
to_chat(src, span_warning("You're teleported against your will!"))
|
||||
if(4)
|
||||
emp_act(3)
|
||||
emp_act(EMP_LIGHT)
|
||||
|
||||
if(51 to 100) //Severe
|
||||
rng = rand(0,3)
|
||||
@@ -137,7 +137,7 @@
|
||||
if(0)
|
||||
electrocute_act(instability * 0.5, "extremely unstable energies", 0.75)
|
||||
if(1)
|
||||
emp_act(2)
|
||||
emp_act(EMP_MEDIUM)
|
||||
if(2)
|
||||
adjustFireLoss(instability * 0.3) //30 burn @ 100 instability
|
||||
to_chat(src, span_danger("Your chassis alerts you to extreme overheating from an unknown external force!"))
|
||||
@@ -151,7 +151,7 @@
|
||||
if(0)
|
||||
electrocute_act(instability, "extremely unstable energies", 0.75)
|
||||
if(1)
|
||||
emp_act(1)
|
||||
emp_act(EMP_HEAVY)
|
||||
if(2)
|
||||
adjustFireLoss(instability * 0.4) //40 burn @ 100 instability
|
||||
to_chat(src, span_danger("Your chassis alerts you to extreme overheating from an unknown external force!"))
|
||||
|
||||
@@ -428,6 +428,10 @@
|
||||
go_out()
|
||||
|
||||
/obj/machinery/sleeper/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
|
||||
if(filtering)
|
||||
toggle_filter()
|
||||
|
||||
@@ -441,7 +445,6 @@
|
||||
if(occupant)
|
||||
go_out()
|
||||
|
||||
..(severity, recursive)
|
||||
/obj/machinery/sleeper/proc/toggle_filter()
|
||||
if(!occupant || !beaker)
|
||||
filtering = 0
|
||||
|
||||
@@ -83,8 +83,6 @@
|
||||
var/shorted = 0
|
||||
circuit = /obj/item/circuitboard/airalarm
|
||||
|
||||
var/datum/wires/alarm/wires
|
||||
|
||||
var/mode = AALARM_MODE_SCRUBBING
|
||||
var/screen = AALARM_SCREEN_MAIN
|
||||
var/area_uid
|
||||
@@ -137,8 +135,7 @@
|
||||
set_frequency(frequency)
|
||||
if(!pixel_x && !pixel_y)
|
||||
offset_airalarm()
|
||||
if(!wires)
|
||||
wires = new(src)
|
||||
set_wires(new /datum/wires/alarm(src))
|
||||
alarm_area.air_alarms += src
|
||||
if(!alarm_area.main_air_alarm_is_operating()) // select main alarm
|
||||
alarm_area.elect_main_air_alarm()
|
||||
|
||||
@@ -131,11 +131,13 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/power/thermoregulator/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(!on)
|
||||
on = TRUE
|
||||
target_temp += rand(0, 1000)
|
||||
update_icon()
|
||||
..(severity, recursive)
|
||||
|
||||
/obj/machinery/power/thermoregulator/overload(var/obj/machinery/power/source)
|
||||
if(!anchored || !powernet)
|
||||
|
||||
@@ -110,14 +110,15 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospheric_field_generator/emp_act(severity, recursive)
|
||||
if(!(stat & EMPED))
|
||||
stat |= EMPED
|
||||
disable_field() //shutting dowwwwwwn
|
||||
spawn(rand(reboot_delay_min,reboot_delay_max))
|
||||
stat &= ~EMPED
|
||||
if(alwaysactive || wasactive) //reboot after a short delay if we were online before
|
||||
generate_field()
|
||||
..()
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || (stat & EMPED))
|
||||
return
|
||||
stat |= EMPED
|
||||
disable_field() //shutting dowwwwwwn
|
||||
spawn(rand(reboot_delay_min,reboot_delay_max))
|
||||
stat &= ~EMPED
|
||||
if(alwaysactive || wasactive) //reboot after a short delay if we were online before
|
||||
generate_field()
|
||||
|
||||
/obj/machinery/atmospheric_field_generator/ex_act(severity)
|
||||
switch(severity)
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
return
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/pump/emp_act(severity, recursive)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
if(prob(50/severity))
|
||||
@@ -62,8 +62,6 @@
|
||||
target_pressure = rand(0,1300)
|
||||
update_icon()
|
||||
|
||||
..(severity, recursive)
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/pump/process()
|
||||
..()
|
||||
var/power_draw = -1
|
||||
|
||||
@@ -27,16 +27,14 @@
|
||||
AddElement(/datum/element/climbable)
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/scrubber/emp_act(severity, recursive)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
if(prob(50/severity))
|
||||
on = !on
|
||||
update_icon()
|
||||
|
||||
..(severity, recursive)
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/scrubber/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
///Are we currently printing something
|
||||
var/busy = FALSE
|
||||
|
||||
var/datum/wires/autolathe/wires = null
|
||||
|
||||
///Coefficient applied to consumed materials. Lower values result in lower material consumption.
|
||||
var/creation_efficiency = 1
|
||||
///modifier for lathe build speed. Lower values are faster.
|
||||
@@ -51,7 +49,7 @@
|
||||
)
|
||||
. = ..()
|
||||
|
||||
wires = new(src)
|
||||
set_wires(new /datum/wires/autolathe(src))
|
||||
|
||||
if(!GLOB.autounlock_techwebs[/datum/techweb/autounlocking/autolathe])
|
||||
GLOB.autounlock_techwebs[/datum/techweb/autounlocking/autolathe] = new /datum/techweb/autounlocking/autolathe
|
||||
|
||||
@@ -20,9 +20,6 @@
|
||||
|
||||
var/toughness = 5 //sorta fragile
|
||||
|
||||
// WIRES
|
||||
var/datum/wires/camera/wires = null // Wires datum
|
||||
|
||||
//OTHER
|
||||
|
||||
var/view_range = 7
|
||||
@@ -41,7 +38,7 @@
|
||||
var/client_huds = null
|
||||
|
||||
/obj/machinery/camera/Initialize(mapload)
|
||||
wires = new(src)
|
||||
set_wires(new /datum/wires/camera(src))
|
||||
assembly = new(src)
|
||||
assembly.state = 4
|
||||
LAZYOR(client_huds, GLOB.global_hud.whitense)
|
||||
@@ -93,6 +90,9 @@
|
||||
return
|
||||
|
||||
/obj/machinery/camera/emp_act(severity, recursive, forced)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(!isEmpProof() && (forced || prob(100/severity)))
|
||||
if(!affected_by_emp_until || (world.time > affected_by_emp_until))
|
||||
affected_by_emp_until = max(affected_by_emp_until, world.time + (90 SECONDS / severity))
|
||||
@@ -173,7 +173,7 @@
|
||||
else if((W.has_tool_quality(TOOL_WIRECUTTER) || istype(W, /obj/item/multitool)) && panel_open)
|
||||
interact(user)
|
||||
|
||||
else if(W.has_tool_quality(TOOL_WELDER) && (wires.CanDeconstruct() || (stat & BROKEN)))
|
||||
else if(W.has_tool_quality(TOOL_WELDER) && (wires.is_all_cut() || (stat & BROKEN)))
|
||||
if(weld(W, user))
|
||||
if(assembly)
|
||||
assembly.loc = src.loc
|
||||
|
||||
@@ -402,8 +402,10 @@
|
||||
go_out()
|
||||
|
||||
/obj/machinery/clonepod/emp_act(severity, recursive)
|
||||
if(prob(100/severity))
|
||||
malfunction()
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || !(prob(100/severity)))
|
||||
return
|
||||
malfunction()
|
||||
..()
|
||||
|
||||
/obj/machinery/clonepod/ex_act(severity)
|
||||
|
||||
@@ -62,8 +62,8 @@
|
||||
|
||||
|
||||
/obj/machinery/computer/arcade/emp_act(severity, recursive)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
..(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || (stat & (NOPOWER|BROKEN)))
|
||||
return
|
||||
var/empprize = null
|
||||
var/num_of_prizes = 0
|
||||
@@ -80,8 +80,6 @@
|
||||
empprize = pickweight(prizes)
|
||||
new empprize(src.loc)
|
||||
|
||||
..(severity, recursive)
|
||||
|
||||
///////////////////
|
||||
// BATTLE HERE //
|
||||
///////////////////
|
||||
|
||||
@@ -30,8 +30,11 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/emp_act(severity, recursive)
|
||||
if(prob(20/severity)) set_broken()
|
||||
..()
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(prob(20/severity))
|
||||
set_broken()
|
||||
|
||||
/obj/machinery/computer/ex_act(severity)
|
||||
switch(severity)
|
||||
|
||||
@@ -479,8 +479,8 @@
|
||||
SStgui.update_uis(src)
|
||||
|
||||
/obj/machinery/computer/med_data/emp_act(severity, recursive)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
for(var/datum/data/record/R in GLOB.data_core.medical)
|
||||
@@ -506,9 +506,6 @@
|
||||
qdel(R)
|
||||
continue
|
||||
|
||||
..(severity, recursive)
|
||||
|
||||
|
||||
/obj/machinery/computer/med_data/laptop //[TO DO] Change name to PCU and update mapdata to include replacement computers
|
||||
name = "\improper Medical Laptop"
|
||||
desc = "A personal computer unit. It seems to have only the medical records program installed."
|
||||
|
||||
@@ -490,8 +490,8 @@
|
||||
return selection.img
|
||||
|
||||
/obj/machinery/computer/secure_data/emp_act(severity, recursive)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF ||stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
for(var/datum/data/record/R in GLOB.data_core.security)
|
||||
@@ -517,8 +517,6 @@
|
||||
qdel(R)
|
||||
continue
|
||||
|
||||
..(severity, recursive)
|
||||
|
||||
/obj/machinery/computer/secure_data/detective_computer
|
||||
icon_state = "forensic"
|
||||
|
||||
|
||||
@@ -367,8 +367,8 @@
|
||||
SStgui.update_uis(src)
|
||||
|
||||
/obj/machinery/computer/skills/emp_act(severity, recursive)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
for(var/datum/data/record/R in GLOB.data_core.security)
|
||||
@@ -394,8 +394,6 @@
|
||||
qdel(R)
|
||||
continue
|
||||
|
||||
..(severity, recursive)
|
||||
|
||||
#undef GENERAL_RECORD_LIST
|
||||
#undef GENERAL_RECORD_MAINT
|
||||
#undef GENERAL_RECORD_DATA
|
||||
|
||||
@@ -98,7 +98,8 @@ Deployable items
|
||||
return
|
||||
|
||||
/obj/machinery/deployable/barrier/emp_act(severity, recursive)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || (stat & (BROKEN|NOPOWER)))
|
||||
return
|
||||
if(prob(50/severity))
|
||||
locked = !locked
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
layer = ABOVE_WINDOW_LAYER
|
||||
flags = WALL_ITEM
|
||||
var/desiredstate = 0
|
||||
var/exposedwires = 0
|
||||
var/wires = 3
|
||||
var/exposedwires_num = 0
|
||||
var/wires_num = 3
|
||||
/*
|
||||
Bitflag, 1=checkID
|
||||
2=Network Access
|
||||
@@ -20,7 +20,7 @@
|
||||
active_power_usage = 4
|
||||
|
||||
/obj/machinery/button/remote/attack_ai(mob/user as mob)
|
||||
if(wires & 2)
|
||||
if(wires_num & 2)
|
||||
return attack_hand(user)
|
||||
else
|
||||
to_chat(user, "Error, no route to host.")
|
||||
@@ -43,7 +43,7 @@
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
if(!allowed(user) && (wires & 1))
|
||||
if(!allowed(user) && (wires_num & 1))
|
||||
to_chat(user, span_warning("Access Denied"))
|
||||
flick("doorctrl-denied",src)
|
||||
return
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
var/hasShocked = 0 //Prevents multiple shocks from happening
|
||||
var/secured_wires = 0
|
||||
var/security_level = 1 //Acts as a multiplier on the time required to hack an airlock with a hacktool
|
||||
var/datum/wires/airlock/wires = null
|
||||
|
||||
var/open_sound_powered = 'sound/machines/door/covert1o.ogg'
|
||||
var/open_sound_unpowered = 'sound/machines/door/airlockforced.ogg'
|
||||
@@ -1195,11 +1194,13 @@ About the new airlock wires panel:
|
||||
electronics.one_access = 1
|
||||
|
||||
/obj/machinery/door/airlock/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(prob(40/severity))
|
||||
var/duration = world.time + ((30 / severity) SECONDS)
|
||||
if(duration > electrified_until)
|
||||
electrify(duration)
|
||||
..()
|
||||
|
||||
/obj/machinery/door/airlock/power_change() //putting this is obj/machinery/door itself makes non-airlock doors turn invisible for some reason
|
||||
..()
|
||||
|
||||
@@ -413,10 +413,11 @@
|
||||
|
||||
|
||||
/obj/machinery/door/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(prob(20/severity) && (istype(src,/obj/machinery/door/airlock) || istype(src,/obj/machinery/door/window)) )
|
||||
open()
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/door/ex_act(severity)
|
||||
switch(severity)
|
||||
|
||||
@@ -89,13 +89,14 @@
|
||||
// Parameters: 1 (severity - how strong the EMP is, with lower numbers being stronger)
|
||||
// Description: Shuts off the machine for awhile if an EMP hits it. Ion anomalies also call this to turn it off.
|
||||
/obj/machinery/exonet_node/emp_act(severity, recursive)
|
||||
if(!(stat & EMPED))
|
||||
stat |= EMPED
|
||||
var/duration = (300 * 10)/severity
|
||||
spawn(rand(duration - 20, duration + 20))
|
||||
stat &= ~EMPED
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || (stat & EMPED))
|
||||
return
|
||||
stat |= EMPED
|
||||
var/duration = (300 * 10)/severity
|
||||
spawn(rand(duration - 20, duration + 20))
|
||||
stat &= ~EMPED
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
// Proc: process()
|
||||
// Parameters: None
|
||||
|
||||
@@ -135,9 +135,11 @@ FIRE ALARM
|
||||
return alarm()
|
||||
|
||||
/obj/machinery/firealarm/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(prob(50 / severity))
|
||||
alarm(rand(30 / severity, 60 / severity))
|
||||
..()
|
||||
|
||||
/obj/machinery/firealarm/attackby(obj/item/W as obj, mob/user as mob)
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -101,12 +101,11 @@
|
||||
O.Weaken(flash_time)
|
||||
|
||||
/obj/machinery/flasher/emp_act(severity, recursive)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
if(prob(75/severity))
|
||||
flash()
|
||||
..(severity, recursive)
|
||||
|
||||
/obj/machinery/flasher/portable/HasProximity(turf/T, datum/weakref/WF, oldloc)
|
||||
if(isnull(WF))
|
||||
|
||||
@@ -112,5 +112,8 @@ GLOBAL_LIST_EMPTY(holoposters)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/holoposter/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || stat & BROKEN)
|
||||
return
|
||||
stat |= BROKEN
|
||||
update_icon()
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
volume = 0.5 //CHOMPEdit
|
||||
|
||||
// Vars for hacking
|
||||
var/datum/wires/jukebox/wires = null
|
||||
var/hacked = 0 // Whether to show the hidden songs or not
|
||||
var/freq = 0 // Currently no effect, will return in phase II of mediamanager.
|
||||
//VOREStation Add
|
||||
@@ -372,7 +371,7 @@
|
||||
/obj/machinery/media/jukebox/ghost/power_change()
|
||||
return
|
||||
/obj/machinery/media/jukebox/ghost/emp_act(severity, recursive)
|
||||
return
|
||||
return ..()
|
||||
/obj/machinery/media/jukebox/ghost/emag_act(remaining_charges, mob/user)
|
||||
return
|
||||
/obj/machinery/media/jukebox/ghost/explode()
|
||||
|
||||
@@ -86,11 +86,10 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/light_switch/emp_act(severity, recursive)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
power_change()
|
||||
..(severity, recursive)
|
||||
|
||||
//Breakers for event maps
|
||||
|
||||
|
||||
@@ -163,6 +163,9 @@ Class Procs:
|
||||
return PROCESS_KILL
|
||||
|
||||
/obj/machinery/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(use_power && stat == 0)
|
||||
use_power(7500/severity)
|
||||
|
||||
@@ -173,7 +176,6 @@ Class Procs:
|
||||
pulse2.anchored = TRUE
|
||||
pulse2.set_dir(pick(GLOB.cardinal))
|
||||
QDEL_IN(pulse2, 1 SECOND)
|
||||
..()
|
||||
|
||||
/obj/machinery/ex_act(severity)
|
||||
switch(severity)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/mass_driver/emp_act(severity, recursive)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
drive()
|
||||
..(severity, recursive)
|
||||
|
||||
@@ -17,7 +17,7 @@ GLOBAL_VAR(bomb_set)
|
||||
var/yes_code = 0.0
|
||||
var/safety = 1.0
|
||||
var/obj/item/disk/nuclear/auth = null
|
||||
var/list/wires = list()
|
||||
var/list/wires_list = list()
|
||||
var/light_wire
|
||||
var/safety_wire
|
||||
var/timing_wire
|
||||
@@ -28,13 +28,13 @@ GLOBAL_VAR(bomb_set)
|
||||
/obj/machinery/nuclearbomb/Initialize(mapload)
|
||||
. = ..()
|
||||
r_code = "[rand(10000, 99999.0)]"//Creates a random code upon object spawn.
|
||||
wires["Red"] = 0
|
||||
wires["Blue"] = 0
|
||||
wires["Green"] = 0
|
||||
wires["Marigold"] = 0
|
||||
wires["Fuschia"] = 0
|
||||
wires["Black"] = 0
|
||||
wires["Pearl"] = 0
|
||||
wires_list["Red"] = 0
|
||||
wires_list["Blue"] = 0
|
||||
wires_list["Green"] = 0
|
||||
wires_list["Marigold"] = 0
|
||||
wires_list["Fuschia"] = 0
|
||||
wires_list["Black"] = 0
|
||||
wires_list["Pearl"] = 0
|
||||
var/list/w = list("Red","Blue","Green","Marigold","Black","Fuschia","Pearl")
|
||||
light_wire = pick(w)
|
||||
w -= light_wire
|
||||
@@ -202,9 +202,9 @@ GLOBAL_VAR(bomb_set)
|
||||
return
|
||||
|
||||
/obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
var/dat = "<TT><B>Nuclear Fission Explosive</B><BR>\nNuclear Device Wires:</A><HR>"
|
||||
for(var/wire in wires)
|
||||
dat += text("[wire] Wire: <A href='byond://?src=\ref[src];wire=[wire];act=wire'>[wires[wire] ? "Mend" : "Cut"]</A> <A href='byond://?src=\ref[src];wire=[wire];act=pulse'>Pulse</A><BR>")
|
||||
var/dat = "<TT><B>Nuclear Fission Explosive</B><BR>\nNuclear Device wires_list:</A><HR>"
|
||||
for(var/wire in wires_list)
|
||||
dat += text("[wire] Wire: <A href='byond://?src=\ref[src];wire=[wire];act=wire'>[wires_list[wire] ? "Mend" : "Cut"]</A> <A href='byond://?src=\ref[src];wire=[wire];act=pulse'>Pulse</A><BR>")
|
||||
dat += text("<HR>The device is [timing ? "shaking!" : "still"]<BR>")
|
||||
dat += text("The device is [safety ? "quiet" : "whirring"].<BR>")
|
||||
dat += text("The lights are [lighthack ? "static" : "functional"].<BR>")
|
||||
@@ -242,7 +242,7 @@ GLOBAL_VAR(bomb_set)
|
||||
if(!istype(usr.get_active_hand(), /obj/item/multitool))
|
||||
to_chat(usr, "You need a multitool!")
|
||||
else
|
||||
if(wires[temp_wire])
|
||||
if(wires_list[temp_wire])
|
||||
to_chat(usr, "You can't pulse a cut wire.")
|
||||
else
|
||||
if(light_wire == temp_wire)
|
||||
@@ -266,7 +266,7 @@ GLOBAL_VAR(bomb_set)
|
||||
if(!I.has_tool_quality(TOOL_WIRECUTTER))
|
||||
to_chat(usr, "You need wirecutters!")
|
||||
else
|
||||
wires[temp_wire] = !wires[temp_wire]
|
||||
wires_list[temp_wire] = !wires_list[temp_wire]
|
||||
if(safety_wire == temp_wire)
|
||||
if(timing)
|
||||
explode()
|
||||
|
||||
@@ -112,10 +112,12 @@
|
||||
update_power()
|
||||
|
||||
/obj/machinery/pda_multicaster/emp_act(severity, recursive)
|
||||
if(!(stat & EMPED))
|
||||
stat |= EMPED
|
||||
var/duration = (300 * 10)/severity
|
||||
spawn(rand(duration - 20, duration + 20))
|
||||
stat &= ~EMPED
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || (stat & EMPED))
|
||||
return
|
||||
stat |= EMPED
|
||||
var/duration = (300 * 10)/severity
|
||||
spawn(rand(duration - 20, duration + 20))
|
||||
stat &= ~EMPED
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
@@ -640,6 +640,9 @@
|
||||
attempt_retaliate(damage)
|
||||
|
||||
/obj/machinery/porta_turret/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(enabled)
|
||||
//if the turret is on, the EMP no matter how severe disables the turret for a while
|
||||
//and scrambles its settings, with a slight chance of having an emag effect
|
||||
@@ -656,15 +659,14 @@
|
||||
if(!enabled)
|
||||
enabled = TRUE
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/porta_turret/ai_defense/emp_act(severity, recursive)
|
||||
if(prob(33)) // One in three chance to resist an EMP. This is significant if an AoE EMP is involved against multiple turrets.
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || prob(33)) // One in three chance to resist an EMP. This is significant if an AoE EMP is involved against multiple turrets.
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/porta_turret/alien/emp_act(severity, recursive) // This is overrided to give an EMP resistance as well as avoid scambling the turret settings.
|
||||
if(prob(75)) // Superior alien technology, I guess.
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || prob(75)) // Superior alien technology, I guess.
|
||||
return
|
||||
enabled = FALSE
|
||||
spawn(rand(1 MINUTE, 2 MINUTES))
|
||||
|
||||
@@ -50,8 +50,6 @@ GLOBAL_LIST_EMPTY(suit_cycler_typecache)
|
||||
var/obj/item/clothing/suit/space/void/suit = null
|
||||
var/obj/item/clothing/head/helmet/space/helmet = null
|
||||
|
||||
var/datum/wires/suit_storage_unit/wires = null
|
||||
|
||||
/obj/machinery/suit_cycler/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -66,7 +64,7 @@ GLOBAL_LIST_EMPTY(suit_cycler_typecache)
|
||||
if(!target_department || !target_species)
|
||||
stat |= BROKEN
|
||||
|
||||
wires = new(src)
|
||||
set_wires(new /datum/wires/suit_storage_unit(src))
|
||||
|
||||
/obj/machinery/suit_cycler/Destroy()
|
||||
qdel(wires)
|
||||
|
||||
@@ -210,6 +210,9 @@
|
||||
traffic -= netspeed
|
||||
|
||||
/obj/machinery/telecomms/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(prob(100/severity))
|
||||
if(!(stat & EMPED))
|
||||
stat |= EMPED
|
||||
@@ -217,7 +220,6 @@
|
||||
var/duration = (300 * 10)/severity
|
||||
spawn(rand(duration - 20, duration + 20)) // Takes a long time for the machines to reboot.
|
||||
stat &= ~EMPED
|
||||
..()
|
||||
|
||||
/obj/machinery/telecomms/proc/checkheat()
|
||||
if(QDELETED(src))
|
||||
|
||||
@@ -225,6 +225,9 @@
|
||||
set_light(1.5, 1,"#003300")
|
||||
|
||||
/obj/machinery/turretid/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(enabled)
|
||||
//if the turret is on, the EMP no matter how severe disables the turret for a while
|
||||
//and scrambles its settings, with a slight chance of having an emag effect
|
||||
@@ -242,5 +245,3 @@
|
||||
if(!enabled)
|
||||
enabled = TRUE
|
||||
updateTurrets()
|
||||
|
||||
..()
|
||||
|
||||
@@ -119,8 +119,8 @@
|
||||
|
||||
|
||||
/obj/machinery/vr_sleeper/emp_act(severity, recursive)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
if(occupant)
|
||||
@@ -134,8 +134,6 @@
|
||||
smoke.start("#202020")
|
||||
perform_exit()
|
||||
|
||||
..(severity, recursive)
|
||||
|
||||
/obj/machinery/vr_sleeper/verb/eject()
|
||||
set src in view(1)
|
||||
set category = "Object"
|
||||
|
||||
@@ -55,8 +55,11 @@
|
||||
|
||||
// Damage code.
|
||||
|
||||
/obj/item/mecha_parts/component/emp_act(severity = 4, recursive)
|
||||
if(severity + emp_resistance > 4)
|
||||
/obj/item/mecha_parts/component/emp_act(severity = EMP_HARMLESS, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(severity + emp_resistance >= EMP_NONE)
|
||||
return
|
||||
|
||||
severity = clamp(severity + emp_resistance, 1, 4)
|
||||
|
||||
@@ -1339,13 +1339,15 @@
|
||||
*/
|
||||
|
||||
/obj/mecha/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(get_charge())
|
||||
use_power((cell.charge/2)/severity)
|
||||
take_damage(50 / severity,"energy")
|
||||
src.mecha_log_message("EMP detected",1)
|
||||
if(prob(80))
|
||||
check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),1)
|
||||
return
|
||||
|
||||
/obj/mecha/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature>src.max_temperature)
|
||||
|
||||
@@ -104,8 +104,10 @@
|
||||
return data
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/ex_act()
|
||||
qdel(src)
|
||||
@@ -119,7 +121,7 @@
|
||||
/obj/item/mecha_parts/mecha_tracking/proc/shock()
|
||||
var/obj/mecha/M = in_mecha()
|
||||
if(M)
|
||||
M.emp_act(4)
|
||||
M.emp_act(EMP_HARMLESS)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/proc/get_mecha_log()
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
var/smoke_strength = 3
|
||||
var/obj/item/mine/mineitemtype = /obj/item/mine
|
||||
var/panel_open = FALSE
|
||||
var/datum/wires/mines/wires = null
|
||||
var/camo_net = FALSE // Will the mine 'cloak' on deployment?
|
||||
|
||||
// The trap item will be triggered in some manner when detonating. Default only checks for grenades.
|
||||
@@ -17,7 +16,7 @@
|
||||
|
||||
/obj/effect/mine/Initialize(mapload)
|
||||
icon_state = "landmine_armed"
|
||||
wires = new(src)
|
||||
set_wires(new /datum/wires/mines(src))
|
||||
. = ..()
|
||||
if(ispath(trap))
|
||||
trap = new trap(src)
|
||||
|
||||
@@ -148,3 +148,13 @@
|
||||
|
||||
/obj/effect/temp_visual/circle_wave/dirt
|
||||
color = COLOR_ASTEROID_ROCK
|
||||
|
||||
/obj/effect/temp_visual/emp
|
||||
name = "emp sparks"
|
||||
icon_state = "empdisable"
|
||||
|
||||
/obj/effect/temp_visual/emp/pulse
|
||||
name = "emp pulse"
|
||||
icon_state = "emppulse"
|
||||
duration = 8
|
||||
randomdir = 0
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
// # define EMPDEBUG 10
|
||||
|
||||
/proc/empulse(turf/epicenter, first_range, second_range, third_range, fourth_range, log=0)
|
||||
if(!epicenter) return
|
||||
if(!epicenter)
|
||||
return
|
||||
|
||||
if(!istype(epicenter, /turf))
|
||||
epicenter = get_turf(epicenter.loc)
|
||||
@@ -15,13 +16,7 @@
|
||||
log_game("EMP with size ([first_range], [second_range], [third_range], [fourth_range]) in area [epicenter.loc.name] ")
|
||||
|
||||
if(first_range > 1)
|
||||
var/obj/effect/overlay/pulse = new /obj/effect/overlay(epicenter)
|
||||
pulse.icon = 'icons/effects/effects.dmi'
|
||||
pulse.icon_state = "emppulse"
|
||||
pulse.name = "emp pulse"
|
||||
pulse.anchored = TRUE
|
||||
spawn(20)
|
||||
qdel(pulse)
|
||||
new /obj/effect/temp_visual/emp/pulse(epicenter)
|
||||
|
||||
if(first_range > second_range)
|
||||
second_range = first_range
|
||||
@@ -31,9 +26,9 @@
|
||||
fourth_range = third_range
|
||||
|
||||
for(var/mob/M in range(first_range, epicenter))
|
||||
M << 'sound/effects/EMPulse.ogg'
|
||||
playsound(epicenter, 'sound/effects/EMPulse.ogg', 100, TRUE)
|
||||
|
||||
for(var/atom/T in range(fourth_range, epicenter))
|
||||
for(var/atom/T in spiral_range_turfs(fourth_range, epicenter))
|
||||
#ifdef EMPDEBUG
|
||||
var/time = world.timeofday
|
||||
#endif
|
||||
@@ -42,33 +37,33 @@
|
||||
distance = 0
|
||||
//Worst effects, really hurts
|
||||
if(distance < first_range)
|
||||
T.emp_act(1)
|
||||
T.emp_act(EMP_HEAVY)
|
||||
else if(distance == first_range)
|
||||
if(prob(50))
|
||||
T.emp_act(1)
|
||||
T.emp_act(EMP_HEAVY)
|
||||
else
|
||||
T.emp_act(2)
|
||||
T.emp_act(EMP_MEDIUM)
|
||||
//Slightly less painful
|
||||
else if(distance <= second_range)
|
||||
T.emp_act(2)
|
||||
T.emp_act(EMP_MEDIUM)
|
||||
else if(distance == second_range)
|
||||
if(prob(50))
|
||||
T.emp_act(2)
|
||||
T.emp_act(EMP_MEDIUM)
|
||||
else
|
||||
T.emp_act(3)
|
||||
T.emp_act(EMP_LIGHT)
|
||||
//Even less slightly less painful
|
||||
else if(distance <= third_range)
|
||||
T.emp_act(3)
|
||||
T.emp_act(EMP_LIGHT)
|
||||
else if(distance == third_range)
|
||||
if(prob(50))
|
||||
T.emp_act(2)
|
||||
T.emp_act(EMP_MEDIUM)
|
||||
else
|
||||
T.emp_act(3)
|
||||
T.emp_act(EMP_LIGHT)
|
||||
//This should be more or less harmless
|
||||
else if(distance <= fourth_range)
|
||||
T.emp_act(4)
|
||||
T.emp_act(EMP_HARMLESS)
|
||||
#ifdef EMPDEBUG
|
||||
if((world.timeofday - time) >= EMPDEBUG)
|
||||
log_and_message_admins("EMPDEBUG: [T.name] - [T.type] - took [world.timeofday - time]ds to process emp_act()!")
|
||||
#endif
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
@@ -235,6 +235,9 @@
|
||||
// Parameters: None
|
||||
// Description: Drops all calls when EMPed, so the holder can then get murdered by the antagonist.
|
||||
/obj/item/communicator/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
close_connection(reason = "Hardware error de%#_^@%-BZZZZZZZT")
|
||||
|
||||
// Proc: add_to_EPv2()
|
||||
|
||||
@@ -516,6 +516,9 @@
|
||||
return 1
|
||||
|
||||
/obj/item/shockpaddles/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
var/new_safety = rand(0, 1)
|
||||
if(safety != new_safety)
|
||||
safety = new_safety
|
||||
@@ -526,7 +529,6 @@
|
||||
make_announcement("beeps, \"Safety protocols disabled!\"", "warning")
|
||||
playsound(src, 'sound/machines/defib_safetyoff.ogg', 50, 0)
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/item/shockpaddles/robot
|
||||
name = "defibrillator paddles"
|
||||
@@ -612,7 +614,9 @@
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/shockpaddles/standalone/emp_act(severity, recursive)
|
||||
..()
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
var/new_fail = 0
|
||||
switch(severity)
|
||||
if(1)
|
||||
|
||||
@@ -292,7 +292,9 @@
|
||||
return
|
||||
|
||||
/obj/item/flash/emp_act(severity, recursive)
|
||||
if(broken) return
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || broken)
|
||||
return
|
||||
flash_recharge()
|
||||
if(!check_capacitor())
|
||||
return
|
||||
|
||||
@@ -167,7 +167,8 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
||||
update_icon()
|
||||
|
||||
/obj/item/gps/emp_act(severity, recursive)
|
||||
if(emped) // Without a fancy callback system, this will have to do.
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || emped)
|
||||
return
|
||||
var/severity_modifier = severity ? severity : 4 // In case emp_act gets called without any arguments.
|
||||
var/duration = 5 MINUTES / severity_modifier
|
||||
|
||||
@@ -375,11 +375,11 @@
|
||||
if(last_notify == 0 || (5 MINUTES <= world.time - last_notify))
|
||||
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, recursive)
|
||||
for(var/mob/M in src)
|
||||
M.emp_act(severity, recursive)
|
||||
|
||||
*/
|
||||
/obj/item/paicard/ex_act(severity)
|
||||
if(pai)
|
||||
pai.ex_act(severity)
|
||||
|
||||
@@ -112,6 +112,9 @@
|
||||
*/
|
||||
|
||||
/obj/item/personal_shield_generator/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(bcell && shield_active)
|
||||
switch(severity)
|
||||
if(1) //Point blank EMP shots have a good chance of burning the cell charge.
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
var/traitor_frequency = 0 //tune to frequency to unlock traitor supplies
|
||||
var/canhear_range = 3 // the range which mobs can hear this radio from
|
||||
var/loudspeaker = TRUE // Allows borgs to disable canhear_range.
|
||||
var/datum/wires/radio/wires = null
|
||||
var/b_stat = 0
|
||||
var/broadcasting = FALSE
|
||||
var/listening = TRUE
|
||||
@@ -64,7 +63,7 @@
|
||||
for (var/ch_name in channels)
|
||||
secure_radio_connections[ch_name] = SSradio.add_object(src, GLOB.radiochannels[ch_name], RADIO_CHAT)
|
||||
|
||||
wires = new(src)
|
||||
set_wires(new /datum/wires/radio(src))
|
||||
internal_channels = GLOB.default_internal_channels.Copy()
|
||||
GLOB.listening_objects += src
|
||||
|
||||
@@ -620,11 +619,13 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
|
||||
else return
|
||||
|
||||
/obj/item/radio/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
broadcasting = FALSE
|
||||
listening = FALSE
|
||||
for (var/ch_name in channels)
|
||||
channels[ch_name] = 0
|
||||
..()
|
||||
|
||||
/obj/item/radio/start_off
|
||||
listening = FALSE
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
desc = "A heavily reinforced case containing cyborg logic boards, with space for a standard power cell."
|
||||
icon_state = "chest"
|
||||
part = list(BP_GROIN,BP_TORSO)
|
||||
var/wires = 0.0
|
||||
var/wires_const = 0.0
|
||||
var/obj/item/cell/cell = null
|
||||
|
||||
/obj/item/robot_parts/head
|
||||
@@ -139,13 +139,13 @@
|
||||
|
||||
if(istype(W, /obj/item/robot_parts/chest))
|
||||
if(src.chest) return
|
||||
if(W:wires && W:cell)
|
||||
if(W:wires_const && W:cell)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
src.chest = W
|
||||
src.update_icon()
|
||||
else if(!W:wires)
|
||||
to_chat(user, span_warning("You need to attach wires to it first!"))
|
||||
else if(!W:wires_const)
|
||||
to_chat(user, span_warning("You need to attach wires_const to it first!"))
|
||||
else
|
||||
to_chat(user, span_warning("You need to attach a cell to it first!"))
|
||||
|
||||
@@ -250,13 +250,13 @@
|
||||
src.cell = W
|
||||
to_chat(user, span_notice("You insert the cell!"))
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
if(src.wires)
|
||||
if(src.wires_const)
|
||||
to_chat(user, span_warning("You have already inserted wire!"))
|
||||
return
|
||||
else
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
coil.use(1)
|
||||
src.wires = 1.0
|
||||
src.wires_const = 1.0
|
||||
to_chat(user, span_notice("You insert the wire!"))
|
||||
return
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
energy = min(energy + amount, max_energy)
|
||||
|
||||
/datum/matter_synth/proc/emp_act(severity, recursive)
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
use_charge(max_energy * 0.1 / severity)
|
||||
|
||||
/datum/matter_synth/medicine
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/secure_closet/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(!broken)
|
||||
if(prob(50/severity))
|
||||
locked = !locked
|
||||
@@ -30,7 +33,6 @@
|
||||
else
|
||||
req_access = list()
|
||||
req_access += pick(SSaccess.get_all_station_access())
|
||||
..()
|
||||
|
||||
/obj/structure/closet/secure_closet/proc/togglelock(mob/user as mob)
|
||||
if(opened)
|
||||
|
||||
@@ -224,6 +224,9 @@
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/crate/secure/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(!broken && !opened && prob(50/severity))
|
||||
if(!locked)
|
||||
locked = TRUE
|
||||
@@ -237,7 +240,6 @@
|
||||
req_access = list()
|
||||
req_access += pick(SSaccess.get_all_station_access())
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/structure/closet/crate/plastic
|
||||
name = "plastic crate"
|
||||
|
||||
@@ -548,7 +548,3 @@
|
||||
expanding_turfs += next_turf
|
||||
|
||||
return expanding_turfs
|
||||
|
||||
// /empulse handles emp acting stuff in range. You can override this to do specialty stuff, but otherwise we don't want it to do a recursive check.
|
||||
/turf/emp_act(severity, recursive)
|
||||
return
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
var/list/attached_overlays = null
|
||||
var/obj/item/assembly_holder/holder = null
|
||||
var/cooldown = FALSE //To prevent spam
|
||||
var/wires = WIRE_RECEIVE | WIRE_PULSE
|
||||
var/wires_type = WIRE_RECEIVE | WIRE_PULSE
|
||||
|
||||
var/const/WIRE_RECEIVE = 1 //Allows Pulsed(0) to call Activate()
|
||||
var/const/WIRE_PULSE = 2 //Allows Pulse(0) to act on the holder
|
||||
@@ -34,16 +34,16 @@
|
||||
return
|
||||
|
||||
/obj/item/assembly/proc/pulsed(var/radio = 0)
|
||||
if(holder && (wires & WIRE_RECEIVE))
|
||||
if(holder && (wires_type & WIRE_RECEIVE))
|
||||
activate()
|
||||
if(radio && (wires & WIRE_RADIO_RECEIVE))
|
||||
if(radio && (wires_type & WIRE_RADIO_RECEIVE))
|
||||
activate()
|
||||
return 1
|
||||
|
||||
/obj/item/assembly/proc/pulse(var/radio = 0)
|
||||
if(holder && (wires & WIRE_PULSE))
|
||||
if(holder && (wires_type & WIRE_PULSE))
|
||||
holder.process_activation(src, 1, 0)
|
||||
if(holder && (wires & WIRE_PULSE_SPECIAL))
|
||||
if(holder && (wires_type & WIRE_PULSE_SPECIAL))
|
||||
holder.process_activation(src, 0, 1)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -82,8 +82,10 @@ GLOBAL_LIST_EMPTY(all_blobs)
|
||||
return ..()
|
||||
|
||||
/obj/structure/blob/emp_act(severity, recursive)
|
||||
if(overmind)
|
||||
overmind.blob_type.on_emp(src, severity)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || !overmind)
|
||||
return
|
||||
overmind.blob_type.on_emp(src, severity)
|
||||
|
||||
/obj/structure/blob/proc/pulsed()
|
||||
if(pulse_timestamp <= world.time)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
empulse(B.loc, 0, 1, 2)
|
||||
|
||||
/datum/blob_type/electromagnetic_web/on_attack(obj/structure/blob/B, mob/living/victim)
|
||||
victim.emp_act(2)
|
||||
victim.emp_act(EMP_MEDIUM)
|
||||
|
||||
/datum/blob_type/electromagnetic_web/on_chunk_tick(obj/item/blobcore_chunk/B)
|
||||
var/turf/T = get_turf(B)
|
||||
|
||||
@@ -49,13 +49,15 @@
|
||||
GLOB.chamelion_jumpsuit_choices = generate_chameleon_choices(/obj/item/clothing/under, blocked)
|
||||
|
||||
/obj/item/clothing/under/chameleon/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
name = "psychedelic"
|
||||
desc = "Groovy!"
|
||||
icon_state = "psyche"
|
||||
LAZYSET(item_state_slots, slot_w_uniform_str, "psyche")
|
||||
update_icon()
|
||||
update_clothing_icon()
|
||||
..()
|
||||
|
||||
/obj/item/clothing/under/chameleon/verb/change(picked in GLOB.chamelion_jumpsuit_choices)
|
||||
set name = "Change Jumpsuit Appearance"
|
||||
@@ -86,12 +88,14 @@
|
||||
GLOB.chamelion_head_choices = generate_chameleon_choices(/obj/item/clothing/head, blocked)
|
||||
|
||||
/obj/item/clothing/head/chameleon/emp_act(severity, recursive) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
name = "grey cap"
|
||||
desc = "It's a baseball hat in a tasteful grey colour."
|
||||
icon_state = "greysoft"
|
||||
update_icon()
|
||||
update_clothing_icon()
|
||||
..()
|
||||
|
||||
/obj/item/clothing/head/chameleon/verb/change(picked in GLOB.chamelion_head_choices)
|
||||
set name = "Change Hat/Helmet Appearance"
|
||||
@@ -121,12 +125,14 @@
|
||||
GLOB.chamelion_suit_choices = generate_chameleon_choices(/obj/item/clothing/suit, blocked)
|
||||
|
||||
/obj/item/clothing/suit/chameleon/emp_act(severity, recursive) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
name = "armor"
|
||||
desc = "An armored vest that protects against some damage."
|
||||
icon_state = "armor"
|
||||
update_icon()
|
||||
update_clothing_icon()
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/chameleon/verb/change(picked in GLOB.chamelion_suit_choices)
|
||||
set name = "Change Oversuit Appearance"
|
||||
@@ -155,12 +161,14 @@
|
||||
GLOB.chamelion_shoe_choices = generate_chameleon_choices(/obj/item/clothing/shoes, blocked)
|
||||
|
||||
/obj/item/clothing/shoes/chameleon/emp_act(severity, recursive) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
name = "black shoes"
|
||||
desc = "A pair of black shoes."
|
||||
icon_state = "black"
|
||||
update_icon()
|
||||
update_clothing_icon()
|
||||
..()
|
||||
|
||||
/obj/item/clothing/shoes/chameleon/verb/change(picked in GLOB.chamelion_shoe_choices)
|
||||
set name = "Change Footwear Appearance"
|
||||
@@ -189,6 +197,9 @@
|
||||
GLOB.chamelion_back_choices = generate_chameleon_choices(/obj/item/storage/backpack, blocked)
|
||||
|
||||
/obj/item/storage/backpack/chameleon/emp_act(severity, recursive) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
name = "backpack"
|
||||
desc = "You wear this on your back and put items into it."
|
||||
icon_state = "backpack"
|
||||
@@ -196,7 +207,6 @@
|
||||
if (ismob(src.loc))
|
||||
var/mob/M = src.loc
|
||||
M.update_inv_back()
|
||||
..()
|
||||
|
||||
/obj/item/storage/backpack/chameleon/verb/change(picked in GLOB.chamelion_back_choices)
|
||||
set name = "Change Backpack Appearance"
|
||||
@@ -241,12 +251,14 @@
|
||||
GLOB.chamelion_glove_choices = generate_chameleon_choices(/obj/item/clothing/gloves, list(src.type))
|
||||
|
||||
/obj/item/clothing/gloves/chameleon/emp_act(severity, recursive) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
name = "black gloves"
|
||||
desc = "It looks like a pair of gloves, but it seems to have a small dial inside."
|
||||
icon_state = "black"
|
||||
update_icon()
|
||||
update_clothing_icon()
|
||||
..()
|
||||
|
||||
/obj/item/clothing/gloves/chameleon/verb/change(picked in GLOB.chamelion_glove_choices)
|
||||
set name = "Change Gloves Appearance"
|
||||
@@ -275,12 +287,14 @@
|
||||
GLOB.chamelion_mask_choices = generate_chameleon_choices(/obj/item/clothing/mask, list(src.type))
|
||||
|
||||
/obj/item/clothing/mask/chameleon/emp_act(severity, recursive) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
name = "gas mask"
|
||||
desc = "It's a gas mask."
|
||||
icon_state = "gas_alt" //ChompEdit: file change
|
||||
update_icon()
|
||||
update_clothing_icon()
|
||||
..()
|
||||
|
||||
/obj/item/clothing/mask/chameleon/verb/change(picked in GLOB.chamelion_mask_choices)
|
||||
set name = "Change Mask Appearance"
|
||||
@@ -311,12 +325,14 @@
|
||||
clothing_choices = generate_chameleon_choices(/obj/item/clothing/glasses, list(src.type))
|
||||
|
||||
/obj/item/clothing/glasses/chameleon/emp_act(severity, recursive) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
name = "Optical Meson Scanner"
|
||||
desc = "It's a set of mesons."
|
||||
icon_state = "meson"
|
||||
update_icon()
|
||||
update_clothing_icon()
|
||||
..()
|
||||
|
||||
/obj/item/clothing/glasses/chameleon/verb/change(picked in clothing_choices)
|
||||
set name = "Change Glasses Appearance"
|
||||
@@ -345,6 +361,9 @@
|
||||
GLOB.chamelion_belt_choices = generate_chameleon_choices(/obj/item/storage/belt, list(src.type))
|
||||
|
||||
/obj/item/storage/belt/chameleon/emp_act(severity, recursive) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
name = "belt"
|
||||
desc = "Can hold various things."
|
||||
icon_state = "utilitybelt"
|
||||
@@ -352,7 +371,6 @@
|
||||
if(ismob(src.loc))
|
||||
var/mob/M = src.loc
|
||||
M.update_inv_belt()
|
||||
..()
|
||||
|
||||
/obj/item/storage/belt/chameleon/verb/change(picked in GLOB.chamelion_belt_choices)
|
||||
set name = "Change Belt Appearance"
|
||||
@@ -386,12 +404,14 @@
|
||||
GLOB.chamelion_accessory_choices = generate_chameleon_choices(/obj/item/clothing/accessory, blocked)
|
||||
|
||||
/obj/item/clothing/accessory/chameleon/emp_act(severity, recursive) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
name = "black tie"
|
||||
desc = "Looks like a black tie, but his one also has a dial inside."
|
||||
icon_state = "blacktie"
|
||||
update_icon()
|
||||
update_clothing_icon()
|
||||
..()
|
||||
|
||||
/obj/item/clothing/accessory/chameleon/verb/change(picked in GLOB.chamelion_accessory_choices)
|
||||
set name = "Change Accessory Appearance"
|
||||
@@ -447,6 +467,9 @@
|
||||
return P
|
||||
|
||||
/obj/item/gun/energy/chameleon/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
name = "desert eagle"
|
||||
desc = "It's a desert eagle."
|
||||
icon_state = "deagle"
|
||||
@@ -455,7 +478,6 @@
|
||||
var/mob/M = src.loc
|
||||
M.update_inv_r_hand()
|
||||
M.update_inv_l_hand()
|
||||
..()
|
||||
|
||||
/obj/item/gun/energy/chameleon/disguise(var/newtype)
|
||||
var/obj/item/gun/copy = ..()
|
||||
|
||||
@@ -560,6 +560,9 @@ BLIND // can't see anything
|
||||
flash_protection = FLASH_PROTECTION_REDUCED
|
||||
|
||||
/obj/item/clothing/glasses/thermal/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(ishuman(src.loc))
|
||||
var/mob/living/carbon/human/M = src.loc
|
||||
to_chat(M, span_red("The Optical Thermal Scanner overloads and blinds you!"))
|
||||
@@ -571,7 +574,6 @@ BLIND // can't see anything
|
||||
M.disabilities |= NEARSIGHTED
|
||||
spawn(100)
|
||||
M.disabilities &= ~NEARSIGHTED
|
||||
..()
|
||||
|
||||
/obj/item/clothing/glasses/thermal/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -101,6 +101,9 @@
|
||||
|
||||
|
||||
/obj/item/clothing/glasses/omnihud/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(tgarscreen)
|
||||
SStgui.close_uis(src)
|
||||
var/disconnect_tgar = tgarscreen
|
||||
@@ -113,7 +116,6 @@
|
||||
icon_state = "3d"
|
||||
if(ishuman(loc))
|
||||
to_chat(loc, span_warning("The lenses of your [src.name] malfunction!"))
|
||||
..()
|
||||
|
||||
/obj/item/clothing/glasses/omnihud/proc/flashed()
|
||||
if(flash_prot && ishuman(loc))
|
||||
|
||||
@@ -95,8 +95,6 @@
|
||||
var/emp_protection = 0
|
||||
item_flags = PHORONGUARD //VOREStation add
|
||||
|
||||
// Wiring! How exciting.
|
||||
var/datum/wires/rig/wires
|
||||
var/datum/effect/effect/system/spark_spread/spark_system
|
||||
var/datum/mini_hud/rig/minihud
|
||||
|
||||
@@ -113,7 +111,7 @@
|
||||
|
||||
suit_state = icon_state
|
||||
item_state = icon_state
|
||||
wires = new(src)
|
||||
set_wires(new /datum/wires/rig(src))
|
||||
|
||||
if(!LAZYLEN(req_access) && !LAZYLEN(req_one_access))
|
||||
locked = 0
|
||||
@@ -819,6 +817,9 @@
|
||||
return 0
|
||||
|
||||
/obj/item/rig/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
//set malfunctioning
|
||||
if(emp_protection < 30) //for ninjas, really.
|
||||
malfunctioning += 10
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
/obj/item/clothing/suit/armor/reactive/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if(bad_effect || !active)
|
||||
if (. & EMP_PROTECT_SELF || bad_effect || !active)
|
||||
return
|
||||
visible_message(emp_message)
|
||||
bad_effect = TRUE
|
||||
|
||||
@@ -73,7 +73,6 @@
|
||||
|
||||
var/scan_id = 1
|
||||
var/obj/item/coin/coin
|
||||
var/datum/wires/vending/wires = null
|
||||
|
||||
var/list/log = list()
|
||||
var/req_log_access = ACCESS_CARGO //default access for checking logs is cargo
|
||||
@@ -83,7 +82,7 @@
|
||||
|
||||
/obj/machinery/vending/Initialize(mapload)
|
||||
. = ..()
|
||||
wires = new(src)
|
||||
set_wires(new /datum/wires/vending(src))
|
||||
if(product_slogans)
|
||||
slogan_list += splittext(product_slogans, ";")
|
||||
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
to_chat(A, span_boldwarning("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT"))
|
||||
to_chat(A, span_boldwarning("<br>"))
|
||||
for(var/obj/machinery/telecomms/T in GLOB.telecomms_list)
|
||||
T.emp_act(1)
|
||||
T.emp_act(EMP_HEAVY)
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
|
||||
/datum/event/communications_blackout/start()
|
||||
for(var/obj/machinery/telecomms/T in GLOB.telecomms_list)
|
||||
T.emp_act(1)
|
||||
T.emp_act(EMP_HEAVY)
|
||||
for(var/obj/machinery/exonet_node/N in GLOB.machines)
|
||||
N.emp_act(1)
|
||||
N.emp_act(EMP_HEAVY)
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
var/scan_id = 1
|
||||
var/is_secure = 0
|
||||
var/wrenchable = 0
|
||||
var/datum/wires/smartfridge/wires = null
|
||||
var/persistent = null // Path of persistence datum used to track contents
|
||||
circuit = /obj/item/circuitboard/smartfridge //This one is meant to be uncraftable, however.
|
||||
|
||||
@@ -36,9 +35,9 @@
|
||||
if(persistent)
|
||||
SSpersistence.track_value(src, persistent)
|
||||
if(is_secure)
|
||||
wires = new/datum/wires/smartfridge/secure(src)
|
||||
set_wires(new /datum/wires/smartfridge/secure(src))
|
||||
else
|
||||
wires = new/datum/wires/smartfridge(src)
|
||||
set_wires(new /datum/wires/smartfridge(src))
|
||||
|
||||
soundloop = new(list(src), FALSE) // CHOMPEdit: Fridge hum!
|
||||
update_icon()
|
||||
|
||||
@@ -37,11 +37,10 @@
|
||||
var/smart = 0 //Used for hacking. Overrides the scanner.
|
||||
var/hacked = 0
|
||||
var/lockdown = 0
|
||||
var/datum/wires/seedstorage/wires = null
|
||||
|
||||
/obj/machinery/seed_storage/Initialize(mapload)
|
||||
. = ..()
|
||||
wires = new(src)
|
||||
set_wires(new /datum/wires/seedstorage(src))
|
||||
if(!contraband_seeds.len)
|
||||
contraband_seeds = pick( /// Some form of ambrosia in all lists.
|
||||
prob(30);list( /// General produce
|
||||
|
||||
@@ -53,6 +53,9 @@ a creative player the means to solve many problems. Circuits are held inside an
|
||||
. = ..()
|
||||
|
||||
/obj/item/integrated_circuit/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
for(var/datum/integrated_io/io in inputs + outputs + activators)
|
||||
io.scramble()
|
||||
|
||||
|
||||
@@ -268,10 +268,11 @@
|
||||
/obj/item/integrated_electronics/detailer, //CHOMP Edit,
|
||||
)
|
||||
|
||||
//CHOMPAdd, this whole proc. Emp'ing this one bag causes a recursion loop of over 700 emp_act's,
|
||||
//Emp'ing this one bag causes a recursion loop of over 700 emp_act's,
|
||||
//Which is enough to trigger byond's recursion level protection
|
||||
/obj/item/storage/bag/circuits/emp_act()
|
||||
return //No
|
||||
/obj/item/storage/bag/circuits/basic/Initialize(mapload)
|
||||
AddElement(/datum/element/empprotection, EMP_PROTECT_SELF)
|
||||
. = ..()
|
||||
|
||||
/obj/item/storage/bag/circuits/basic/Initialize(mapload)
|
||||
new /obj/item/storage/bag/circuits/mini/arithmetic(src)
|
||||
|
||||
@@ -85,11 +85,11 @@
|
||||
/obj/item/integrated_circuit/memory/constant/do_work()
|
||||
var/datum/integrated_io/O = outputs[1]
|
||||
O.push_data()
|
||||
|
||||
/*
|
||||
/obj/item/integrated_circuit/memory/constant/emp_act(severity, recursive)
|
||||
// Prevents default EMP behavior for single-slot constants memory.
|
||||
return
|
||||
|
||||
*/
|
||||
/obj/item/integrated_circuit/memory/constant/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
|
||||
@@ -173,19 +173,18 @@
|
||||
origin_tech = list(TECH_BIO = 4)
|
||||
|
||||
/obj/item/mmi/emp_act(severity, recursive)
|
||||
if(!brainmob)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || !brainmob)
|
||||
return
|
||||
else
|
||||
switch(severity)
|
||||
if(1)
|
||||
brainmob.emp_damage += rand(20,30)
|
||||
if(2)
|
||||
brainmob.emp_damage += rand(10,20)
|
||||
if(3)
|
||||
brainmob.emp_damage += rand(5,10)
|
||||
if(4)
|
||||
brainmob.emp_damage += rand(0,5)
|
||||
..()
|
||||
switch(severity)
|
||||
if(EMP_HEAVY)
|
||||
brainmob.emp_damage += rand(20,30)
|
||||
if(EMP_MEDIUM)
|
||||
brainmob.emp_damage += rand(10,20)
|
||||
if(EMP_LIGHT)
|
||||
brainmob.emp_damage += rand(5,10)
|
||||
if(EMP_HARMLESS)
|
||||
brainmob.emp_damage += rand(0,5)
|
||||
|
||||
/obj/item/mmi/digital
|
||||
var/searching = 0
|
||||
|
||||
@@ -30,9 +30,6 @@
|
||||
qdel(dna)
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/brain/emp_act(severity, recursive) //Brains can't be EMP'd...
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/say_understands(var/other)//Goddamn is this hackish, but this say code is so odd
|
||||
if(istype(container, /obj/item/mmi))
|
||||
if(issilicon(other))
|
||||
|
||||
@@ -90,19 +90,18 @@
|
||||
playsound(src, 'sound/misc/buzzbeep.ogg', 50, 1)
|
||||
|
||||
/obj/item/mmi/digital/posibrain/emp_act(severity, recursive)
|
||||
if(!src.brainmob)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || !brainmob)
|
||||
return
|
||||
else
|
||||
switch(severity)
|
||||
if(1)
|
||||
src.brainmob.emp_damage += rand(20,30)
|
||||
if(2)
|
||||
src.brainmob.emp_damage += rand(10,20)
|
||||
if(3)
|
||||
src.brainmob.emp_damage += rand(5,10)
|
||||
if(4)
|
||||
src.brainmob.emp_damage += rand(0,5)
|
||||
..()
|
||||
switch(severity)
|
||||
if(EMP_HEAVY)
|
||||
src.brainmob.emp_damage += rand(20,30)
|
||||
if(EMP_MEDIUM)
|
||||
src.brainmob.emp_damage += rand(10,20)
|
||||
if(EMP_LIGHT)
|
||||
src.brainmob.emp_damage += rand(5,10)
|
||||
if(EMP_HARMLESS)
|
||||
src.brainmob.emp_damage += rand(0,5)
|
||||
|
||||
/obj/item/mmi/digital/posibrain/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -80,6 +80,9 @@
|
||||
//higher sensitivity values incur additional effects, starting with confusion/blinding/knockdown and ending with increasing amounts of damage
|
||||
//the degree of damage and duration of effects can be tweaked up or down based on the species emp_dmg_mod and emp_stun_mod vars (default 1) on top of tuning the random ranges
|
||||
/mob/living/carbon/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || !species)
|
||||
return
|
||||
//pregen our stunning stuff, had to do this seperately or else byond complained. remember that severity falls off with distance based on the source, so we don't need to do any extra distance calcs here.
|
||||
var/agony_str = ((rand(4,6)*15)-(15*severity))*species.emp_stun_mod //big ouchies at high severity, causes 0-75 halloss/agony; shotgun beanbags and revolver rubbers do 60
|
||||
var/deafen_dur = (rand(9,16)-severity)*species.emp_stun_mod //5-15 deafen, on par with a flashbang
|
||||
@@ -89,13 +92,13 @@
|
||||
if(species.emp_sensitivity) //receive warning message and basic effects
|
||||
to_chat(src, span_bolddanger("*BZZZT*"))
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(EMP_HEAVY)
|
||||
to_chat(src, span_danger("DANGER: Extreme EM flux detected!"))
|
||||
if(2)
|
||||
if(EMP_MEDIUM)
|
||||
to_chat(src, span_danger("Danger: High EM flux detected!"))
|
||||
if(3)
|
||||
if(EMP_LIGHT)
|
||||
to_chat(src, span_danger("Warning: Moderate EM flux detected!"))
|
||||
if(4)
|
||||
if(EMP_HARMLESS)
|
||||
to_chat(src, span_danger("Warning: Minor EM flux detected!"))
|
||||
if(prob(90-(10*severity))) //50-80% chance to fire an emote. most are harmless, but vomit might reduce your nutrition level which could suck (so the whole thing is padded out with extras)
|
||||
src.emote(pick("twitch", "twitch_v", "choke", "pale", "blink", "blink_r", "shiver", "sneeze", "vomit", "gasp", "cough", "drool"))
|
||||
@@ -128,7 +131,6 @@
|
||||
src.adjustToxLoss(rand(25-(severity*5),35-(severity*5)) * species.emp_dmg_mod)
|
||||
if(species.emp_sensitivity & EMP_OXY_DMG)
|
||||
src.adjustOxyLoss(rand(25-(severity*5),35-(severity*5)) * species.emp_dmg_mod)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0, var/def_zone = null, var/stun = 1)
|
||||
if(SEND_SIGNAL(src, COMSIG_BEING_ELECTROCUTED, shock_damage, source, siemens_coeff, def_zone, stun) & COMPONENT_CARBON_CANCEL_ELECTROCUTE)
|
||||
|
||||
@@ -298,10 +298,11 @@
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_mob/protean_blob/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(humanform)
|
||||
return humanform.emp_act(severity, recursive)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_mob/protean_blob/ex_act(severity)
|
||||
if(humanform)
|
||||
|
||||
@@ -422,10 +422,10 @@
|
||||
|
||||
/obj/item/rig/protean/take_hit(damage, source, is_emp=0)
|
||||
return //We don't do that here
|
||||
|
||||
/*
|
||||
/obj/item/rig/protean/emp_act(severity, recursive)
|
||||
return //Same here
|
||||
|
||||
*/
|
||||
/obj/item/rig/protean/cut_suit()
|
||||
return //nope
|
||||
|
||||
|
||||
@@ -95,28 +95,28 @@
|
||||
damage = damage * blocked
|
||||
switch(round(damage))
|
||||
if(91 to INFINITY)
|
||||
emp_act(1)
|
||||
emp_act(EMP_HEAVY)
|
||||
if(76 to 90)
|
||||
if(prob(50))
|
||||
emp_act(1)
|
||||
emp_act(EMP_HEAVY)
|
||||
else
|
||||
emp_act(2)
|
||||
emp_act(EMP_MEDIUM)
|
||||
if(61 to 75)
|
||||
emp_act(2)
|
||||
emp_act(EMP_MEDIUM)
|
||||
if(46 to 60)
|
||||
if(prob(50))
|
||||
emp_act(2)
|
||||
emp_act(EMP_MEDIUM)
|
||||
else
|
||||
emp_act(3)
|
||||
emp_act(EMP_LIGHT)
|
||||
if(31 to 45)
|
||||
emp_act(3)
|
||||
emp_act(EMP_LIGHT)
|
||||
if(16 to 30)
|
||||
if(prob(50))
|
||||
emp_act(3)
|
||||
emp_act(EMP_LIGHT)
|
||||
else
|
||||
emp_act(4)
|
||||
emp_act(EMP_HARMLESS)
|
||||
if(0 to 15)
|
||||
emp_act(4)
|
||||
emp_act(EMP_HARMLESS)
|
||||
flash_weak_pain()
|
||||
updatehealth()
|
||||
SEND_SIGNAL(src, COMSIG_MOB_AFTER_APPLY_DAMAGE, damage, damagetype, def_zone, blocked, sharp, edge, used_weapon, projectile)
|
||||
|
||||
@@ -157,7 +157,8 @@
|
||||
return 0 //only carbon liveforms have this proc
|
||||
|
||||
/mob/living/emp_act(severity, recursive)
|
||||
if(is_incorporeal()) // Can't emp shadekin in phase
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || is_incorporeal()) // Can't emp shadekin in phase
|
||||
return
|
||||
|
||||
if(LAZYLEN(modifiers))
|
||||
@@ -393,7 +394,7 @@
|
||||
Sleeping(5)
|
||||
stuttering += 20
|
||||
make_jittery(150)
|
||||
emp_act(1)
|
||||
emp_act(EMP_HEAVY)
|
||||
to_chat(src, span_critical("You've been struck by lightning!"))
|
||||
|
||||
// Called when touching a lava tile.
|
||||
|
||||
@@ -432,6 +432,9 @@
|
||||
..()
|
||||
|
||||
/mob/living/silicon/pai/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
// Silence for 2 minutes
|
||||
// 20% chance to damage critical components
|
||||
// 50% chance to damage a non critical component
|
||||
|
||||
@@ -124,6 +124,9 @@
|
||||
pulse_delay = 2 SECONDS
|
||||
|
||||
/obj/effect/temporary_effect/pulse/disintegrate/emp_act(severity, recursive)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
visible_message(span_warning("\The [src] flickers, before dispersing energetically."))
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
var/integrated_light_power = 6
|
||||
var/list/robotdecal_on = list()
|
||||
var/glowy_enabled = FALSE
|
||||
var/datum/wires/robot/wires
|
||||
|
||||
can_be_antagged = TRUE
|
||||
|
||||
@@ -153,7 +152,7 @@
|
||||
add_language(LANGUAGE_GALCOM, 1)
|
||||
add_language(LANGUAGE_EAL, 1)
|
||||
|
||||
wires = new(src)
|
||||
set_wires(new /datum/wires/robot(src))
|
||||
|
||||
robot_modules_background = new()
|
||||
robot_modules_background.icon_state = "block"
|
||||
|
||||
@@ -157,7 +157,8 @@
|
||||
parts -= picked
|
||||
|
||||
/mob/living/silicon/robot/emp_act(severity, recursive)
|
||||
if(SEND_SIGNAL(src, COMSIG_ROBOT_EMP_ACT, severity) & COMPONENT_BLOCK_EMP)
|
||||
return // Cancelled by a component
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF || SEND_SIGNAL(src, COMSIG_ROBOT_EMP_ACT, severity) & COMPONENT_BLOCK_EMP) // Cancelled by a component
|
||||
return
|
||||
uneq_all()
|
||||
..() //Damage is handled at /silicon/ level.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user