mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 07:27:57 +01:00
Y2K update:
- New "empulse" proc. Works similarly to "explode" proc. It triggers the "emp_act" proc on everything within range. emp_act are effects similar or identical to the effects of the emp grenade. Any major changes to emp effects listed below. Note: EMPs now affect items in your backpack. - New admin right-click command: EM Pulse. You can create an empulse at the desired location with a size you choose. Similar to Explosion command. - disable device spell, emp grenade, and disable tech rune all use empulse now. - New "disable device" spell datum added. - EMP'ed gas canisters no longer drain the station of power. - When a borg is EMP'ed, all objects in their module get their emp_act proc triggered. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1018 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -105,3 +105,7 @@
|
||||
safety = 1
|
||||
if (!( safety ))
|
||||
flick("flash", M.flash)
|
||||
|
||||
/obj/item/device/flash/emp_act(severity)
|
||||
src.attack_self()
|
||||
..()
|
||||
|
||||
@@ -19,4 +19,9 @@
|
||||
user << "\blue The cloaking device is now inactive."
|
||||
src.icon_state = "shield0"
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/cloaking_device/emp_act(severity)
|
||||
active = 0
|
||||
icon_state = "shield0"
|
||||
..()
|
||||
@@ -0,0 +1,34 @@
|
||||
proc/empulse(turf/epicenter, heavy_range, light_range)
|
||||
if(!epicenter) return
|
||||
message_admins("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] ")
|
||||
|
||||
if (!istype(epicenter, /turf))
|
||||
epicenter = epicenter.loc
|
||||
return empulse(epicenter, heavy_range, light_range)
|
||||
|
||||
if(heavy_range > 1)
|
||||
var/obj/overlay/pulse = new/obj/overlay ( epicenter )
|
||||
pulse.icon = 'effects.dmi'
|
||||
pulse.icon_state = "emppulse"
|
||||
pulse.name = "emp pulse"
|
||||
pulse.anchored = 1
|
||||
spawn(20)
|
||||
del(pulse)
|
||||
|
||||
if(heavy_range > light_range)
|
||||
light_range = heavy_range
|
||||
|
||||
for(var/atom/T in range(light_range, epicenter))
|
||||
var/distance = get_dist(epicenter, T)
|
||||
if(distance < 0)
|
||||
distance = 0
|
||||
if(distance < heavy_range)
|
||||
T.emp_act(1)
|
||||
else if(distance == heavy_range)
|
||||
if(prob(50))
|
||||
T.emp_act(1)
|
||||
else
|
||||
T.emp_act(2)
|
||||
else if(distance <= light_range)
|
||||
T.emp_act(2)
|
||||
return 1
|
||||
@@ -7,6 +7,7 @@ SUNGLASSES
|
||||
SWAT SUIT
|
||||
CHAMELEON JUMPSUIT
|
||||
DEATH COMMANDO GAS MASK
|
||||
THERMAL GLASSES
|
||||
|
||||
*/
|
||||
|
||||
@@ -159,6 +160,18 @@ DEATH COMMANDO GAS MASK
|
||||
item_state = A.item_state
|
||||
color = A.color
|
||||
|
||||
/obj/item/clothing/under/chameleon/emp_act(severity)
|
||||
name = "psychedelic"
|
||||
desc = "Groovy!"
|
||||
icon_state = "psyche"
|
||||
color = "psyche"
|
||||
spawn(200)
|
||||
name = "Black Jumpsuit"
|
||||
icon_state = "bl_suit"
|
||||
color = "black"
|
||||
desc = null
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/swat_suit/death_commando
|
||||
name = "Death Commando Suit"
|
||||
icon_state = "death_commando_suit"
|
||||
@@ -241,4 +254,17 @@ DEATH COMMANDO GAS MASK
|
||||
else
|
||||
src.icon_state = "ushankadown"
|
||||
src.item_state = "ushankadown"
|
||||
user << "You lower the ear flaps on the ushanka."
|
||||
user << "You lower the ear flaps on the ushanka."
|
||||
|
||||
|
||||
/obj/item/clothing/glasses/thermal/emp_act(severity)
|
||||
if(istype(src.loc, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/M = src.loc
|
||||
M << "\red The Optical Thermal Scanner overloads and blinds you!"
|
||||
if(M.glasses == src)
|
||||
M.eye_blind = 3
|
||||
M.eye_blurry = 5
|
||||
M.disabilities |= 1
|
||||
spawn(100)
|
||||
M.disabilities &= ~1
|
||||
..()
|
||||
@@ -37,186 +37,7 @@ FLASHBANG
|
||||
T.hotspot_expose(700,125)
|
||||
|
||||
var/grenade = src // detaching the proc - in theory
|
||||
src = null
|
||||
|
||||
var/obj/overlay/pulse = new/obj/overlay ( T )
|
||||
pulse.icon = 'effects.dmi'
|
||||
pulse.icon_state = "emppulse"
|
||||
pulse.name = "emp pulse"
|
||||
pulse.anchored = 1
|
||||
spawn(20)
|
||||
del(pulse)
|
||||
|
||||
for(var/obj/item/weapon/W in range(world.view-1, T))
|
||||
|
||||
if (istype(W, /obj/item/assembly/m_i_ptank) || istype(W, /obj/item/assembly/r_i_ptank) || istype(W, /obj/item/assembly/t_i_ptank))
|
||||
|
||||
var/fuckthis
|
||||
if(istype(W:part1,/obj/item/weapon/tank/plasma))
|
||||
fuckthis = W:part1
|
||||
fuckthis:ignite()
|
||||
if(istype(W:part2,/obj/item/weapon/tank/plasma))
|
||||
fuckthis = W:part2
|
||||
fuckthis:ignite()
|
||||
if(istype(W:part3,/obj/item/weapon/tank/plasma))
|
||||
fuckthis = W:part3
|
||||
fuckthis:ignite()
|
||||
|
||||
|
||||
for(var/mob/living/M in viewers(world.view-1, T))
|
||||
|
||||
if(!istype(M, /mob/living)) continue
|
||||
|
||||
if (istype(M, /mob/living/silicon))
|
||||
M.fireloss += 25
|
||||
flick("noise", M:flash)
|
||||
M << "\red <B>*BZZZT*</B>"
|
||||
M << "\red Warning: Electromagnetic pulse detected."
|
||||
if(istype(M, /mob/living/silicon/ai))
|
||||
if (prob(30))
|
||||
switch(pick(1,2,3)) //Add Random laws.
|
||||
if(1)
|
||||
M:cancel_camera()
|
||||
if(2)
|
||||
M:lockdown()
|
||||
if(3)
|
||||
M:ai_call_shuttle()
|
||||
continue
|
||||
|
||||
|
||||
M << "\red <B>Your equipment malfunctions.</B>" //Yeah, i realise that this WILL
|
||||
//show if theyre not carrying anything
|
||||
//that is affected. lazy.
|
||||
if (locate(/obj/item/weapon/cloaking_device, M))
|
||||
for(var/obj/item/weapon/cloaking_device/S in M)
|
||||
S.active = 0
|
||||
S.icon_state = "shield0"
|
||||
|
||||
if (locate(/obj/item/weapon/gun/energy, M))
|
||||
for(var/obj/item/weapon/gun/energy/G in M)
|
||||
G.charges = 0
|
||||
G.update_icon()
|
||||
|
||||
if ((istype(M, /mob/living/carbon/human)) && (istype(M:glasses, /obj/item/clothing/glasses/thermal)))
|
||||
M << "\red <B>Your thermals malfunction.</B>"
|
||||
M.eye_blind = 3
|
||||
M.eye_blurry = 5
|
||||
M.disabilities |= 1
|
||||
spawn(100)
|
||||
M.disabilities &= ~1
|
||||
|
||||
if (locate(/obj/item/device/radio, M))
|
||||
for(var/obj/item/device/radio/R in M) //Add something for the intercoms.
|
||||
R.broadcasting = 0
|
||||
R.listening = 0
|
||||
|
||||
if (locate(/obj/item/device/flash, M))
|
||||
for(var/obj/item/device/flash/F in M) //Add something for the intercoms.
|
||||
F.attack_self()
|
||||
|
||||
if (locate(/obj/item/weapon/baton, M))
|
||||
for(var/obj/item/weapon/baton/B in M) //Add something for the intercoms.
|
||||
B.charges = 0
|
||||
|
||||
if(locate(/obj/item/clothing/under/chameleon, M))
|
||||
for(var/obj/item/clothing/under/chameleon/C in M) //Add something for the intercoms.
|
||||
M << "\red <B>Your jumpsuit malfunctions</B>"
|
||||
C.name = "psychedelic"
|
||||
C.desc = "Groovy!"
|
||||
C.icon_state = "psyche"
|
||||
C.color = "psyche"
|
||||
spawn(200)
|
||||
C.name = "Black Jumpsuit"
|
||||
C.icon_state = "bl_suit"
|
||||
C.color = "black"
|
||||
C.desc = null
|
||||
|
||||
M << "\red <B>BZZZT</B>"
|
||||
|
||||
|
||||
for(var/obj/machinery/A in range(world.view-1, T))
|
||||
A.use_power(7500)
|
||||
|
||||
var/obj/overlay/pulse2 = new/obj/overlay ( A.loc )
|
||||
pulse2.icon = 'effects.dmi'
|
||||
pulse2.icon_state = "empdisable"
|
||||
pulse2.name = "emp sparks"
|
||||
pulse2.anchored = 1
|
||||
pulse2.dir = pick(cardinal)
|
||||
|
||||
spawn(10)
|
||||
del(pulse2)
|
||||
|
||||
if(istype(A, /obj/machinery/turret))
|
||||
A:enabled = 0
|
||||
A:lasers = 0
|
||||
A:power_change()
|
||||
|
||||
if(istype(A, /obj/machinery/computer) && prob(20))
|
||||
A:set_broken()
|
||||
|
||||
if(istype(A, /obj/machinery/firealarm) && prob(50))
|
||||
A:alarm()
|
||||
|
||||
if(istype(A, /obj/machinery/power/smes))
|
||||
A:online = 0
|
||||
A:charging = 0
|
||||
A:output = 0
|
||||
A:charge -= 1e6
|
||||
if (A:charge < 0)
|
||||
A:charge = 0
|
||||
spawn(100)
|
||||
A:output = initial(A:output)
|
||||
A:charging = initial(A:charging)
|
||||
A:online = initial(A:online)
|
||||
|
||||
if(istype(A, /obj/machinery/door))
|
||||
if(prob(20) && (istype(A,/obj/machinery/door/airlock) || istype(A,/obj/machinery/door/window)) )
|
||||
A:open()
|
||||
if(prob(40))
|
||||
if(A:secondsElectrified != 0) continue
|
||||
A:secondsElectrified = -1
|
||||
spawn(300)
|
||||
A:secondsElectrified = 0
|
||||
|
||||
if(istype(A, /obj/machinery/power/apc))
|
||||
if(A:cell)
|
||||
A:cell:charge -= 1000
|
||||
if (A:cell:charge < 0)
|
||||
A:cell:charge = 0
|
||||
A:lighting = 0
|
||||
A:equipment = 0
|
||||
A:environ = 0
|
||||
spawn(600)
|
||||
A:equipment = 3
|
||||
A:environ = 3
|
||||
|
||||
if(istype(A, /obj/machinery/camera))
|
||||
A.icon_state = "cameraemp"
|
||||
A:network = null //Not the best way but it will do. I think.
|
||||
spawn(900)
|
||||
A:network = initial(A:network)
|
||||
A:icon_state = initial(A:icon_state)
|
||||
for(var/mob/living/silicon/ai/O in world)
|
||||
if (O.current == A)
|
||||
O.cancel_camera()
|
||||
O << "Your connection to the camera has been lost."
|
||||
for(var/mob/O in world)
|
||||
if (istype(O.machine, /obj/machinery/computer/security))
|
||||
var/obj/machinery/computer/security/S = O.machine
|
||||
if (S.current == A)
|
||||
O.machine = null
|
||||
S.current = null
|
||||
O.reset_view(null)
|
||||
O << "The screen bursts into static."
|
||||
|
||||
if(istype(A, /obj/machinery/clonepod))
|
||||
A:malfunction()
|
||||
|
||||
for(var/obj/mecha/M in range(world.view-1, T))
|
||||
M.cell.charge = 0
|
||||
M.health -= 100
|
||||
M.update_health()
|
||||
empulse(src, 5, 7)
|
||||
|
||||
del(grenade)
|
||||
|
||||
|
||||
@@ -548,7 +548,10 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
src.icon_state = text("gun[]", ratio)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/emp_act(severity)
|
||||
charges = 0
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
|
||||
// LASER GUN
|
||||
|
||||
@@ -177,6 +177,13 @@ STUN BATON
|
||||
for(var/mob/O in viewers(M))
|
||||
if (O.client) O.show_message("\red <B>[M] has been stunned with the stun baton by [user]!</B>", 1, "\red You hear someone fall", 2)
|
||||
|
||||
/obj/item/weapon/baton/emp_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
src.charges = 0
|
||||
if(2)
|
||||
charges -= 5
|
||||
|
||||
/obj/item/weapon/classic_baton/attack(mob/M as mob, mob/user as mob)
|
||||
if ((usr.mutations & 16) && prob(50))
|
||||
usr << "\red You club yourself over the head."
|
||||
|
||||
@@ -285,3 +285,8 @@ Frequency:
|
||||
//Foreach goto(83)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/device/radio/emp_act(severity)
|
||||
broadcasting = 0
|
||||
listening = 0
|
||||
..()
|
||||
|
||||
@@ -705,6 +705,12 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/item/assembly/m_i_ptank/emp_act(severity)
|
||||
|
||||
if(istype(part3,/obj/item/weapon/tank/plasma) && prob(100/severity))
|
||||
part3.ignite()
|
||||
..()
|
||||
|
||||
//*****RM
|
||||
|
||||
/obj/item/assembly/t_i_ptank/c_state(n)
|
||||
@@ -800,6 +806,11 @@
|
||||
src.part3.release()
|
||||
return
|
||||
|
||||
/obj/item/assembly/t_i_ptank/emp_act(severity)
|
||||
if(istype(part3,/obj/item/weapon/tank/plasma) && prob(100/severity))
|
||||
part3.ignite()
|
||||
..()
|
||||
|
||||
/obj/item/assembly/r_i_ptank/examine()
|
||||
..()
|
||||
src.part3.examine()
|
||||
@@ -864,6 +875,13 @@
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/assembly/r_i_ptank/emp_act(severity)
|
||||
if(istype(part3,/obj/item/weapon/tank/plasma) && prob(100/severity))
|
||||
part3.ignite()
|
||||
..()
|
||||
|
||||
//*****RM
|
||||
|
||||
/obj/item/clothing/suit/armor/a_i_a_ptank/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/device/analyzer))
|
||||
src.part4.attackby(W, user)
|
||||
|
||||
Reference in New Issue
Block a user