mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-03 14:04:41 +00:00
Merge remote-tracking branch 'upstream/master' into cash
This commit is contained in:
@@ -317,8 +317,6 @@
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/req_breakout()
|
||||
if(breakout)
|
||||
return 0 //Already breaking out.
|
||||
if(opened)
|
||||
return 0 //Door's open... wait, why are you in it's contents then?
|
||||
if(!welded)
|
||||
@@ -328,10 +326,7 @@
|
||||
/obj/structure/closet/proc/mob_breakout(var/mob/living/escapee)
|
||||
var/breakout_time = 2 //2 minutes by default
|
||||
|
||||
if(!req_breakout())
|
||||
return
|
||||
|
||||
if(!escapee.canClick())
|
||||
if(breakout || !req_breakout())
|
||||
return
|
||||
|
||||
escapee.setClickCooldown(100)
|
||||
@@ -339,17 +334,14 @@
|
||||
//okay, so the closet is either welded or locked... resist!!!
|
||||
escapee << "<span class='warning'>You lean on the back of \the [src] and start pushing the door open. (this will take about [breakout_time] minutes)</span>"
|
||||
|
||||
visible_message("<span class='danger'>The [src] begins to shake violently!</span>")
|
||||
visible_message("<span class='danger'>\The [src] begins to shake violently!</span>")
|
||||
|
||||
breakout = 1 //can't think of a better way to do this right now.
|
||||
for(var/i in 1 to (6*breakout_time * 2)) //minutes * 6 * 5seconds * 2
|
||||
playsound(src.loc, 'sound/effects/grillehit.ogg', 100, 1)
|
||||
animate_shake()
|
||||
|
||||
if(!do_after(escapee, 50)) //5 seconds
|
||||
breakout = 0
|
||||
return
|
||||
if(!escapee || escapee.stat || escapee.loc != src)
|
||||
if(!escapee || escapee.incapacitated() || escapee.loc != src)
|
||||
breakout = 0
|
||||
return //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
|
||||
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
|
||||
@@ -357,10 +349,14 @@
|
||||
breakout = 0
|
||||
return
|
||||
|
||||
playsound(src.loc, 'sound/effects/grillehit.ogg', 100, 1)
|
||||
animate_shake()
|
||||
add_fingerprint(escapee)
|
||||
|
||||
//Well then break it!
|
||||
breakout = 0
|
||||
escapee << "<span class='warning'>You successfully break out!</span>"
|
||||
visible_message("<span class='danger'>\the [escapee] successfully broke out of \the [src]!</span>")
|
||||
visible_message("<span class='danger'>\The [escapee] successfully broke out of \the [src]!</span>")
|
||||
playsound(src.loc, 'sound/effects/grillehit.ogg', 100, 1)
|
||||
break_open()
|
||||
animate_shake()
|
||||
|
||||
@@ -129,8 +129,11 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/update_icon()//Putting the welded stuff in updateicon() so it's easy to overwrite for special cases (Fridges, cabinets, and whatnot)
|
||||
overlays.Cut()
|
||||
|
||||
if(!opened)
|
||||
if(locked)
|
||||
if(broken)
|
||||
icon_state = icon_off
|
||||
else if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
@@ -139,24 +142,12 @@
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/req_breakout()
|
||||
if(!opened && locked) return 1
|
||||
return ..() //It's a secure closet, but isn't locked.
|
||||
|
||||
/obj/structure/closet/secure_closet/break_open()
|
||||
desc += " It appears to be broken."
|
||||
icon_state = icon_off
|
||||
spawn()
|
||||
flick(icon_broken, src)
|
||||
sleep(10)
|
||||
flick(icon_broken, src)
|
||||
sleep(10)
|
||||
broken = 1
|
||||
locked = 0
|
||||
update_icon()
|
||||
//Do this to prevent contents from being opened into nullspace (read: bluespace)
|
||||
if(istype(loc, /obj/structure/bigDelivery))
|
||||
var/obj/structure/bigDelivery/BD = loc
|
||||
BD.unwrap()
|
||||
open()
|
||||
..()
|
||||
|
||||
@@ -136,6 +136,7 @@
|
||||
new /obj/item/weapon/melee/telebaton(src)
|
||||
new /obj/item/clothing/head/beret/sec/corporate/hos(src)
|
||||
new /obj/item/clothing/suit/storage/hooded/wintercoat/security(src)
|
||||
new /obj/item/device/flashlight/maglight(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -179,6 +180,7 @@
|
||||
new /obj/item/weapon/storage/box/holobadge(src)
|
||||
new /obj/item/clothing/head/beret/sec/corporate/warden(src)
|
||||
new /obj/item/clothing/suit/storage/hooded/wintercoat/security(src)
|
||||
new /obj/item/device/flashlight/maglight(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -221,6 +223,7 @@
|
||||
new /obj/item/ammo_magazine/c45m/rubber(src)
|
||||
new /obj/item/weapon/gun/energy/taser(src)
|
||||
new /obj/item/clothing/suit/storage/hooded/wintercoat/security(src)
|
||||
new /obj/item/device/flashlight/maglight(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user