Merge branch 'master' into upstream-merge-29741

This commit is contained in:
LetterJay
2017-09-30 13:35:47 -04:00
committed by GitHub
251 changed files with 4917 additions and 2764 deletions
+13 -5
View File
@@ -125,13 +125,21 @@
icon_type = "cigarette"
spawn_type = /obj/item/clothing/mask/cigarette/space_cigarette
/obj/item/storage/fancy/cigarettes/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to extract contents.</span>")
/obj/item/storage/fancy/cigarettes/AltClick(mob/user)
if(user.get_active_held_item())
if(user.stat || user.restrained())
return
for(var/obj/item/lighter/lighter in src)
remove_from_storage(lighter, user.loc)
user.put_in_active_hand(lighter)
break
var/obj/item/clothing/mask/cigarette/W = locate(/obj/item/clothing/mask/cigarette) in contents
if(W && contents.len > 0)
remove_from_storage(W, user)
user.put_in_hands(W)
contents -= W
to_chat(user, "<span class='notice'>You take a [icon_type] out of the pack.</span>")
else
to_chat(user, "<span class='notice'>There are no [icon_type]s left in the pack.</span>")
/obj/item/storage/fancy/cigarettes/update_icon()
if(fancy_open || !contents.len)
+6 -1
View File
@@ -123,6 +123,11 @@
icon_broken = "medalbox+b"
can_hold = list(/obj/item/clothing/accessory/medal)
/obj/item/storage/lockbox/medal/examine(mob/user)
..()
if(!locked)
to_chat(user, "<span class='notice'>Alt-click to [open ? "close":"open"] it.</span>")
/obj/item/storage/lockbox/medal/AltClick()
if(!locked)
open = (open ? FALSE : TRUE)
@@ -179,4 +184,4 @@
/obj/item/storage/lockbox/medal/sci/PopulateContents()
for(var/i in 1 to 3)
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
+13 -15
View File
@@ -28,31 +28,29 @@
/obj/item/storage/secure/examine(mob/user)
..()
to_chat(user, text("The service panel is [src.open ? "open" : "closed"]."))
to_chat(user, text("The service panel is currently <b>[open ? "unscrewed" : "screwed shut"]</b>."))
/obj/item/storage/secure/attackby(obj/item/W, mob/user, params)
if(locked)
if (istype(W, /obj/item/screwdriver))
if (do_after(user, 20*W.toolspeed, target = src))
src.open =! src.open
user.show_message("<span class='notice'>You [open ? "open" : "close"] the service panel.</span>", 1)
if (do_after(user, 20*W.toolspeed, target = user))
open =! open
to_chat(user, "<span class='notice'>You [open ? "open" : "close"] the service panel.</span>")
return
if ((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking))
user.show_message("<span class='danger'>Now attempting to reset internal memory, please hold.</span>", 1)
src.l_hacking = 1
if (do_after(usr, 100*W.toolspeed, target = src))
if (prob(33))
src.l_setshort = 1
if (istype(W, /obj/item/wirecutters) || istype(W, /obj/item/card/emag))
to_chat(user, "<span class='danger'>[src] is protected from this sort of tampering, yet it appears the internal memory wires can still be <b>pulsed</b>.</span>")
if ((istype(W, /obj/item/device/multitool)) && (!l_hacking))
if(src.open == 1)
to_chat(user, "<span class='danger'>Now attempting to reset internal memory, please hold.</span>")
src.l_hacking = 1
if (do_after(usr, 400*W.toolspeed, target = user))
to_chat(user, "<span class='danger'>Internal memory reset - lock has been disengaged.</span>")
src.l_set = 0
user.show_message("<span class='danger'>Internal memory reset. Please give it a few seconds to reinitialize.</span>", 1)
sleep(80)
src.l_setshort = 0
src.l_hacking = 0
else
user.show_message("<span class='danger'>Unable to reset internal memory.</span>", 1)
src.l_hacking = 0
else
src.l_hacking = 0
to_chat(user, "<span class='notice'>You must <b>unscrew</b> the service panel before you can pulse the wiring.</span>")
return
//At this point you have exhausted all the special things to do when locked
// ... but it's still locked.