mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
Ghost in the Closet update:
- Contents of un-worn backpacks no longer immune to EMP blasts. - EMP'ed closets and crates have their contents EMP'ed as well. Secure versions (ie, ones you can lock and unlock) also have a chance of locking themselves, unlocking themselves, and/or opening themselves. - Fixed a bug that (hopefully) no one noticed. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1031 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -79,6 +79,20 @@
|
||||
return src.close()
|
||||
return src.open()
|
||||
|
||||
/obj/secure_closet/emp_act(severity)
|
||||
for(var/obj/O in src)
|
||||
O.emp_act(severity)
|
||||
if(!broken)
|
||||
if(prob(50/severity))
|
||||
src.locked = !src.locked
|
||||
if(prob(20/severity) && !opened)
|
||||
if(!locked)
|
||||
open()
|
||||
else
|
||||
src.req_access = list()
|
||||
src.req_access += pick(get_all_accesses())
|
||||
..()
|
||||
|
||||
/obj/secure_closet/ex_act(severity)
|
||||
switch(severity)
|
||||
if (1)
|
||||
|
||||
@@ -257,6 +257,30 @@
|
||||
W.loc = src.loc
|
||||
else return attack_hand(user)
|
||||
|
||||
/obj/crate/secure/emp_act(severity)
|
||||
for(var/obj/O in src)
|
||||
O.emp_act(severity)
|
||||
if(!broken && !opened && prob(50/severity))
|
||||
if(!locked)
|
||||
src.locked = 1
|
||||
overlays = null
|
||||
overlays += redlight
|
||||
else
|
||||
overlays = null
|
||||
overlays += emag
|
||||
overlays += sparks
|
||||
spawn(6) overlays -= sparks //Tried lots of stuff but nothing works right. so i have to use this *sadface*
|
||||
playsound(src.loc, 'sparks4.ogg', 75, 1)
|
||||
src.locked = 0
|
||||
if(!opened && prob(20/severity))
|
||||
if(!locked)
|
||||
open()
|
||||
else
|
||||
src.req_access = list()
|
||||
src.req_access += pick(get_all_accesses())
|
||||
..()
|
||||
|
||||
|
||||
/obj/crate/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
|
||||
@@ -157,6 +157,12 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/emp_act(severity)
|
||||
if(!istype(src.loc, /mob/living))
|
||||
for(var/obj/O in contents)
|
||||
O.emp_act(severity)
|
||||
..()
|
||||
|
||||
/obj/screen/storage/attackby(W, mob/user as mob)
|
||||
src.master.attackby(W, user)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user