diff --git a/code/game/objects/items/lockpicks.dm b/code/game/objects/items/lockpicks.dm new file mode 100644 index 00000000000..0af583a1736 --- /dev/null +++ b/code/game/objects/items/lockpicks.dm @@ -0,0 +1,54 @@ +//For bypassing locked /obj/structure/simple_doors + +/obj/item/lockpick + name = "set of lockpicks" + desc = "A set of picks and tension wrenches, ideal for picking old-style mechanical locks... not that any of those exist on most NT facilities these days. Still, it might be useful elsewhere?" + icon = 'icons/obj/lockpicks.dmi' + icon_state = "lockpicks" + w_class = ITEMSIZE_SMALL + var/pick_type = "simple" + var/pick_time = 10 SECONDS + var/pick_verb = "pick" + +/obj/item/lockpick/afterattack(atom/A, mob/user) + if(!user.IsAdvancedToolUser()) //no lockpicking for monkeys + return + if(istype(A, /obj/structure/simple_door)) + var/obj/structure/simple_door/D = A + if(!D.locked) //you can pick your nose, but you can't pick an unlocked door + to_chat(user, span_notice("\The [D] isn't locked.")) + return + else if(D.lock_type != pick_type) //make sure our types match + to_chat(user, span_warning("\The [src] can't pick \the [D]. Another tool might work?")) + return + else if(!D.can_pick) //make sure we're actually allowed to bypass it at all + to_chat(user, span_warning("\The [D] can't be [pick_verb]ed.")) + return + else //finally, we can assume that they do match + to_chat(user, span_notice("You start to [pick_verb] the lock on \the [D]...")) + playsound(src, D.keysound,100, 1) + if(do_after(user, pick_time * D.lock_difficulty)) + to_chat(user, span_notice("Success!")) + D.locked = FALSE + else if(istype(A,/mob/living/carbon/human)) //you can pick your friends, and you can pick your nose, but you can't pick your friend's nose + var/mob/living/carbon/human/H = A + if(user.zone_sel.selecting == BP_HEAD) + if(H == user) + to_chat(user, span_notice("Your nose isn't locked. If you're feeling stuffy, maybe you should talk to a doctor..?")) + else + user.visible_message(span_notice("[user] tries to [pick_verb] [H]'s nose with \the [src]! They don't seem to be having much success."),span_notice("You try to [pick_verb] [H]'s nose. It doesn't seem to be working.")) + return + +/obj/item/lockpick/pick_gun + name = "pick gun" + desc = "A more sophisticated and automated alternative to traditional lockpicking methods. Contains a dazzling array of tools in a simple-to-use housing: just press the face plate against the lock face and hold the trigger down until it goes click." + icon_state = "pick_gun" + pick_time = 3 SECONDS + +/obj/item/lockpick/mag_sequencer + name = "magnetic sequencer" + desc = "A deceptively simple gadget that brute-forces magnetic locks using a small electromagnet. A predecessor to the cryptographic sequencer, a more complicated device that is considered contraband in most jurisdictions. Not that these aren't illegal either, mind you!" + icon_state = "mag_sequencer" + pick_type = "maglock" + pick_time = 5 SECONDS + pick_verb = "bypass" diff --git a/code/game/objects/structures/simple_doors.dm b/code/game/objects/structures/simple_doors.dm index db06f7fea8e..c68d08208bf 100644 --- a/code/game/objects/structures/simple_doors.dm +++ b/code/game/objects/structures/simple_doors.dm @@ -18,6 +18,9 @@ var/locked = FALSE //has the door been locked? var/lock_id = null //does the door have an associated key? + var/lock_type = "simple" //string matched to "pick_type" on /obj/item/lockpick + var/can_pick = TRUE //can it be picked/bypassed? + var/lock_difficulty = 1 //multiplier to picking/bypassing time var/keysound = 'sound/items/toolbelt_equip.ogg' /obj/structure/simple_door/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) diff --git a/icons/obj/lockpicks.dmi b/icons/obj/lockpicks.dmi new file mode 100644 index 00000000000..11880cd0f52 Binary files /dev/null and b/icons/obj/lockpicks.dmi differ diff --git a/vorestation.dme b/vorestation.dme index 6edc0211680..07be19acdd6 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1292,6 +1292,7 @@ #include "code\game\objects\items\gunbox.dm" #include "code\game\objects\items\gunbox_vr.dm" #include "code\game\objects\items\latexballoon.dm" +#include "code\game\objects\items\lockpicks.dm" #include "code\game\objects\items\magazine.dm" #include "code\game\objects\items\paintkit.dm" #include "code\game\objects\items\pizza_voucher_vr.dm"