This commit is contained in:
NanakoAC
2016-08-02 19:46:57 +01:00
committed by skull132
parent 83ed43896e
commit eba855d423
3 changed files with 61 additions and 11 deletions
@@ -343,28 +343,33 @@
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)
return 0 //closed but not welded...
return 1
if(welded)
return 1 //closed but not welded...
if(breakout)
return -1 //Already breaking out.
return 0
/obj/structure/closet/proc/mob_breakout(var/mob/living/escapee)
var/breakout_time = 2 //2 minutes by default
if(!req_breakout())
//Improved by nanako
//Now it actually works, also locker breakout time stacks with locking and welding
//This means secure lockers are more useful for imprisoning people
var/breakout_time = 1.5 * req_breakout()//1.5 minutes if locked or welded, 3 minutes if both
if(breakout_time <= 0)
return
//okay, so the closet is either welded or locked... resist!!!
escapee.next_move = world.time + 100
escapee.last_special = world.time + 100
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>")
breakout = 1 //can't think of a better way to do this right now.
breakout = 1
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()
@@ -118,6 +118,8 @@
if(ishuman(usr))
src.add_fingerprint(usr)
src.togglelock(usr)
else if(istype(usr, /mob/living/silicon/robot) && Adjacent(usr))
src.togglelock(usr)
else
usr << "<span class='warning'>This mob type can't use this verb.</span>"
@@ -135,8 +137,13 @@
/obj/structure/closet/secure_closet/req_breakout()
if(!opened && locked) return 1
return ..() //It's a secure closet, but isn't locked.
if(!opened && locked)
if (welded)
return 2
else
return 1
else
return ..() //It's a secure closet, but isn't locked.
/obj/structure/closet/secure_closet/break_open()
desc += " It appears to be broken."
@@ -147,6 +154,7 @@
flick(icon_broken, src)
sleep(10)
broken = 1
welded = 0
locked = 0
update_icon()
//Do this to prevent contents from being opened into nullspace (read: bluespace)
+37
View File
@@ -0,0 +1,37 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
#################################
# Your name.
author: Nanako
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- bugfix: "Resisting out of lockers now works properly"
- tweak: "Breaking out of a locker which is welded AND locked takes longer than if it's only one of those two."