Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
@@ -21,9 +21,10 @@
var/l_set = 0
var/l_setshort = 0
var/l_hacking = 0
var/emagged = 0
var/open = 0
w_class = WEIGHT_CLASS_NORMAL
max_w_class = WEIGHT_CLASS_SMALL
w_class = 3
max_w_class = 2
max_combined_w_class = 14
/obj/item/weapon/storage/secure/examine(mob/user)
@@ -33,15 +34,15 @@
/obj/item/weapon/storage/secure/attackby(obj/item/weapon/W, mob/user, params)
if(locked)
if (istype(W, /obj/item/weapon/screwdriver))
if (do_after(user, 20*W.toolspeed, target = src))
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)
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))
if (do_after(usr, 100/W.toolspeed, target = src))
if (prob(40))
src.l_setshort = 1
src.l_set = 0
user.show_message("<span class='danger'>Internal memory reset. Please give it a few seconds to reinitialize.</span>", 1)
@@ -61,6 +62,17 @@
// -> storage/attackby() what with handle insertion, etc
return ..()
/obj/item/weapon/storage/secure/emag_act(mob/user)
if(locked)
if(!emagged)
emagged = 1
src.add_overlay(image('icons/obj/storage.dmi', icon_sparking))
sleep(6)
src.overlays = null
add_overlay(image('icons/obj/storage.dmi', icon_locking))
locked = 0
user << "<span class='notice'>You short out the lock on [src].</span>"
/obj/item/weapon/storage/secure/MouseDrop(over_object, src_location, over_location)
if (locked)
src.add_fingerprint(usr)
@@ -72,8 +84,10 @@
user.set_machine(src)
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED"))
var/message = "Code"
if ((src.l_set == 0) && (!src.l_setshort))
if ((src.l_set == 0) && (!src.emagged) && (!src.l_setshort))
dat += text("<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>")
if (src.emagged)
dat += text("<p>\n<font color=red><b>LOCKING SYSTEM ERROR - 1701</b></font>")
if (src.l_setshort)
dat += text("<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>")
message = text("[]", src.code)
@@ -91,7 +105,7 @@
if ((src.l_set == 0) && (length(src.code) == 5) && (!src.l_setshort) && (src.code != "ERROR"))
src.l_code = src.code
src.l_set = 1
else if ((src.code == src.l_code) && (src.l_set == 1))
else if ((src.code == src.l_code) && (src.emagged == 0) && (src.l_set == 1))
src.locked = 0
src.overlays = null
add_overlay(image('icons/obj/storage.dmi', icon_opened))
@@ -99,13 +113,13 @@
else
src.code = "ERROR"
else
if ((href_list["type"] == "R") && (!src.l_setshort))
if ((href_list["type"] == "R") && (src.emagged == 0) && (!src.l_setshort))
src.locked = 1
src.overlays = null
src.code = null
src.close(usr)
else
src.code += text("[]", sanitize_text(href_list["type"]))
src.code += text("[]", href_list["type"])
if (length(src.code) > 5)
src.code = "ERROR"
src.add_fingerprint(usr)
@@ -140,8 +154,8 @@
hitsound = "swing_hit"
throw_speed = 2
throw_range = 4
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_NORMAL
w_class = 4
max_w_class = 3
max_combined_w_class = 21
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
@@ -153,9 +167,19 @@
/obj/item/weapon/storage/secure/briefcase/attack_hand(mob/user)
if ((src.loc == user) && (src.locked == 1))
usr << "<span class='warning'>[src] is locked and cannot be opened!</span>"
add_fingerprint(user)
else if ((src.loc == user) && (!src.locked))
playsound(src.loc, "rustle", 50, 1, -5)
if (user.s_active)
user.s_active.close(user) //Close and re-open
src.show_to(user)
else
..()
for(var/mob/M in range(1))
if (M.s_active == src)
src.close(M)
src.orient2hud(user)
src.add_fingerprint(user)
return
//Syndie variant of Secure Briefcase. Contains space cash, slightly more robust.
/obj/item/weapon/storage/secure/briefcase/syndie
@@ -179,7 +203,7 @@
icon_locking = "safeb"
icon_sparking = "safespark"
force = 8
w_class = WEIGHT_CLASS_GIGANTIC
w_class = 8
max_w_class = 8
anchored = 1
density = 0
@@ -195,4 +219,4 @@
/obj/item/weapon/storage/secure/safe/HoS/New()
..()
//new /obj/item/weapon/storage/lockbox/clusterbang(src) This item is currently broken... and probably shouldnt exist to begin with (even though it's cool)
//new /obj/item/weapon/storage/lockbox/clusterbang(src) This item is currently broken... and probably shouldnt exist to begin with (even though it's cool)