Merge remote-tracking branch 'upstream/master' into cash

This commit is contained in:
Hubblenaut
2016-02-21 17:48:19 +01:00
19 changed files with 151 additions and 68 deletions
@@ -93,6 +93,20 @@
brightness_on = 2
w_class = 1
/obj/item/device/flashlight/maglight
name = "maglight"
desc = "A very, very heavy duty flashlight."
icon_state = "maglight"
item_state = "maglight"
force = 10
flags = CONDUCT
brightness_on = 4
slot_flags = SLOT_BELT
w_class = 2
attack_verb = list ("smacked", "thwacked", "thunked")
matter = list(DEFAULT_WALL_MATERIAL = 200,"glass" = 50)
hitsound = "swing_hit"
/obj/item/device/flashlight/drone
name = "low-power flashlight"
desc = "A miniature lamp, that might be used by small robots."
@@ -195,6 +195,14 @@ CIGARETTE PACKETS ARE IN FANCY.DM
text = replacetext(text, "FLAME", "[W.name]")
light(text)
/obj/item/clothing/mask/smokable/attack(var/mob/living/M, var/mob/living/user, def_zone)
if(istype(M) && M.on_fire)
user.do_attack_animation(M)
light("<span class='notice'>[user] coldly lights the [name] with the burning body of [M].</span>")
return 1
else
return ..()
/obj/item/clothing/mask/smokable/cigarette
name = "cigarette"
desc = "A roll of tobacco and nicotine."
@@ -53,7 +53,8 @@
/obj/item/weapon/material/minihoe,
/obj/item/weapon/material/hatchet,
/obj/item/device/analyzer/plant_analyzer,
/obj/item/weapon/extinguisher/mini
/obj/item/weapon/extinguisher/mini,
/obj/item/device/flashlight/maglight
)
@@ -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