/* * Absorbs /obj/item/secstorage. * Reimplements it only slightly to use existing storage functionality. * * Contains: * Secure Briefcase * Wall Safe */ // ----------------------------- // Generic Item // ----------------------------- /obj/item/storage/secure name = "secstorage" var/icon_locking = "secureb" var/icon_sparking = "securespark" var/icon_opened = "secure0" var/code = "" var/l_code = null var/l_set = 0 var/l_setshort = 0 var/l_hacking = 0 var/open = FALSE w_class = WEIGHT_CLASS_NORMAL desc = "This shouldn't exist. If it does, create an issue report." /obj/item/storage/secure/ComponentInitialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_SMALL STR.max_combined_w_class = 14 /obj/item/storage/secure/examine(mob/user) . = ..() . += "The service panel is currently [open ? "unscrewed" : "screwed shut"]." /obj/item/storage/secure/attackby(obj/item/W, mob/user, params) if(SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)) if (istype(W, /obj/item/screwdriver)) if (W.use_tool(src, user, 20)) open =! open to_chat(user, "You [open ? "open" : "close"] the service panel.") return if (istype(W, /obj/item/wirecutters)) to_chat(user, "[src] is protected from this sort of tampering, yet it appears the internal memory wires can still be pulsed.") if ((istype(W, /obj/item/multitool)) && (!l_hacking)) if(open == 1) to_chat(user, "Now attempting to reset internal memory, please hold.") l_hacking = 1 if (W.use_tool(src, user, 400)) to_chat(user, "Internal memory reset - lock has been disengaged.") l_set = 0 l_hacking = 0 else l_hacking = 0 else to_chat(user, "You must unscrew the service panel before you can pulse the wiring.") return //At this point you have exhausted all the special things to do when locked // ... but it's still locked. return // -> storage/attackby() what with handle insertion, etc return ..() /obj/item/storage/secure/attack_self(mob/user) var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED) user.set_machine(src) var/dat = text("[]
\n\nLock Status: []",src, (locked ? "LOCKED" : "UNLOCKED")) var/message = "Code" if ((l_set == 0) && (!l_setshort)) dat += text("

\n5-DIGIT PASSCODE NOT SET.
ENTER NEW PASSCODE.
") if (l_setshort) dat += text("

\nALERT: MEMORY SYSTEM ERROR - 6040 201") message = text("[]", code) if (!locked) message = "*****" dat += text("


\n>[]
\n1-2-3
\n4-5-6
\n7-8-9
\nR-0-E
\n
", message) user << browse(dat, "window=caselock;size=300x280") /obj/item/storage/secure/Topic(href, href_list) ..() if ((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1)) return if (href_list["type"]) if (href_list["type"] == "E") if ((l_set == 0) && (length(code) == 5) && (!l_setshort) && (code != "ERROR")) l_code = code l_set = 1 else if ((code == l_code) && (l_set == 1)) SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, FALSE) cut_overlays() add_overlay(icon_opened) code = null else code = "ERROR" else if ((href_list["type"] == "R") && (!l_setshort)) SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, TRUE) cut_overlays() code = null SEND_SIGNAL(src, COMSIG_TRY_STORAGE_HIDE_FROM, usr) else code += text("[]", sanitize_text(href_list["type"])) if (length(code) > 5) code = "ERROR" add_fingerprint(usr) attack_self(usr) return // ----------------------------- // Secure Briefcase // ----------------------------- /obj/item/storage/secure/briefcase name = "secure briefcase" icon = 'icons/obj/storage.dmi' icon_state = "secure" item_state = "sec-case" lefthand_file = 'icons/mob/inhands/equipment/briefcase_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/briefcase_righthand.dmi' desc = "A large briefcase with a digital locking system." force = 8 hitsound = "swing_hit" throw_speed = 2 throw_range = 4 w_class = WEIGHT_CLASS_BULKY attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") /obj/item/storage/secure/briefcase/PopulateContents() new /obj/item/paper(src) new /obj/item/pen(src) /obj/item/storage/secure/briefcase/ComponentInitialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 21 STR.max_w_class = WEIGHT_CLASS_NORMAL //Syndie variant of Secure Briefcase. Contains space cash, slightly more robust. /obj/item/storage/secure/briefcase/syndie force = 15 /obj/item/storage/secure/briefcase/syndie/PopulateContents() ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) for(var/i = 0, i < STR.max_items - 2, i++) new /obj/item/stack/spacecash/c1000(src) /obj/item/storage/secure/briefcase/mws_pack name = "\improper \'MWS\' gun kit" desc = "A storage case for a multi-purpose handgun. Variety hour!" /obj/item/storage/secure/briefcase/mws_pack/PopulateContents() new /obj/item/gun/ballistic/revolver/mws(src) new /obj/item/ammo_box/magazine/mws_mag(src) for(var/path in subtypesof(/obj/item/ammo_casing/mws_batt)) new path(src) /obj/item/storage/secure/briefcase/hos/mws_pack_hos name = "\improper \'MWS\' gun kit" desc = "A storage case for a multi-purpose handgun. Variety hour!" /obj/item/storage/secure/briefcase/hos/mws_pack_hos/PopulateContents() new /obj/item/gun/ballistic/revolver/mws(src) new /obj/item/ammo_box/magazine/mws_mag(src) new /obj/item/ammo_casing/mws_batt/lethal(src) new /obj/item/ammo_casing/mws_batt/lethal(src) new /obj/item/ammo_casing/mws_batt/stun(src) new /obj/item/ammo_casing/mws_batt/stun(src) new /obj/item/ammo_casing/mws_batt/ion(src) /obj/item/storage/secure/briefcase/hos/multiphase_box name = "\improper X-01 Multiphase energy gun box" desc = "A storage case for a high-tech energy firearm." /obj/item/storage/secure/briefcase/hos/multiphase_box/PopulateContents() new /obj/item/gun/energy/e_gun/hos(src) // ----------------------------- // Secure Safe // ----------------------------- /obj/item/storage/secure/safe name = "secure safe" icon = 'icons/obj/storage.dmi' plane = ABOVE_WALL_PLANE icon_state = "safe" icon_opened = "safe0" icon_locking = "safeb" icon_sparking = "safespark" desc = "Excellent for securing things away from grubby hands." force = 8 w_class = WEIGHT_CLASS_GIGANTIC anchored = TRUE density = FALSE /obj/item/storage/secure/safe/ComponentInitialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.cant_hold = typecacheof(list(/obj/item/storage/secure/briefcase)) STR.max_w_class = 8 //?? /obj/item/storage/secure/safe/PopulateContents() new /obj/item/paper(src) new /obj/item/pen(src) /obj/item/storage/secure/safe/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) return attack_self(user) /obj/item/storage/secure/safe/HoS name = "head of security's safe"