diff --git a/mojave/__DEFINES/do_afters.dm b/mojave/__DEFINES/do_afters.dm index 56a2fb3c4a7..7e0992263e1 100644 --- a/mojave/__DEFINES/do_afters.dm +++ b/mojave/__DEFINES/do_afters.dm @@ -2,6 +2,7 @@ #define DOAFTER_SOURCE_FISHING "doafter_fishing" #define DOAFTER_SOURCE_BREAKICE "doafter_breakice" #define DOAFTER_SOURCE_DOORS "doafter_doors" +#define DOAFTER_SOURCE_LOCKS "doafter_doors" #define DOAFTER_SOURCE_TELESCOPICROD "doafter_telescopicrod" #define DOAFTER_SOURCE_CRATEOPEN "doafter_crateopen" #define DOAFTER_SOURCE_CHOPTREE "doafter_choptree" diff --git a/mojave/__DEFINES/tools.dm b/mojave/__DEFINES/tools.dm index ef3ce781cbf..893ad6b6abd 100644 --- a/mojave/__DEFINES/tools.dm +++ b/mojave/__DEFINES/tools.dm @@ -1,3 +1,6 @@ // Defines for tools #define TOOL_FISHINGROD "fishingrod" +#define TOOL_PLIERS "pliers" +#define TOOL_RULER "ruler" +#define TOOL_LENS "lens" diff --git a/mojave/code/modules/locks/keys.dm b/mojave/code/modules/locks/keys.dm index 59848a0c1c4..930d51f6b7a 100644 --- a/mojave/code/modules/locks/keys.dm +++ b/mojave/code/modules/locks/keys.dm @@ -11,12 +11,14 @@ worn_icon_state = "empty_placeholder" w_class = WEIGHT_CLASS_SMALL ms13_flags_1 = KEY_ITEM + obj_flags = UNIQUE_RENAME | UNIQUE_RENAME_NO_DESCRIPTION //so you can keep track of yo keys grid_width = 32 grid_height = 32 drop_sound = 'mojave/sound/ms13effects/keydrop.ogg' pickup_sound = 'mojave/sound/ms13effects/keygrab.ogg' //Custom key shape for corresponding with the identical lock type pins //Bitts seperated into sloppy seperates so players can edit them and interaction with keys + var/bitt_amount = 6 var/bitt_1 var/bitt_2 var/bitt_3 @@ -31,12 +33,18 @@ /obj/item/ms13/key/proc/generate_key_order() var/static/list/bitting_levels = list("A","B","C","D","E","F") - bitt_1 = pick(bitting_levels) - bitt_2 = pick(bitting_levels) - bitt_3 = pick(bitting_levels) - bitt_4 = pick(bitting_levels) - bitt_5 = pick(bitting_levels) - bitt_6 = pick(bitting_levels) + if(bitt_amount == 6) + bitt_1 = pick(bitting_levels) + bitt_2 = pick(bitting_levels) + bitt_3 = pick(bitting_levels) + bitt_4 = pick(bitting_levels) + bitt_5 = pick(bitting_levels) + bitt_6 = pick(bitting_levels) + if(bitt_amount == 4) + bitt_1 = pick(bitting_levels) + bitt_2 = pick(bitting_levels) + bitt_3 = pick(bitting_levels) + bitt_4 = pick(bitting_levels) /obj/item/ms13/key/test diff --git a/mojave/code/modules/locks/keys/key_crafting.dm b/mojave/code/modules/locks/keys/key_crafting.dm new file mode 100644 index 00000000000..e69de29bb2d diff --git a/mojave/code/modules/locks/keys/key_types.dm b/mojave/code/modules/locks/keys/key_types.dm new file mode 100644 index 00000000000..e9377b86290 --- /dev/null +++ b/mojave/code/modules/locks/keys/key_types.dm @@ -0,0 +1,12 @@ +/obj/item/ms13/key/brass + name = "brass key" + desc = "A simple brass key, dont lose it." + icon_state = "brass" + inhand_icon_state = "brass_key" + +/obj/item/ms13/key/scrap + name = "makeshift key" + desc = "A crude piece of metal with a jagged protusion, looks like a key." + icon_state = "scrap" + inhand_icon_state = "scrap_key" + bitt_amount = 4 diff --git a/mojave/code/modules/locks/lock/lock_crafting.dm b/mojave/code/modules/locks/lock/lock_crafting.dm new file mode 100644 index 00000000000..e69de29bb2d diff --git a/mojave/code/modules/locks/lock/lock_types.dm b/mojave/code/modules/locks/lock/lock_types.dm new file mode 100644 index 00000000000..18def6f532a --- /dev/null +++ b/mojave/code/modules/locks/lock/lock_types.dm @@ -0,0 +1,30 @@ +/obj/item/ms13/lock/scrap + name = "makeshift lock" + desc = "A crude and makeshift scrap lock, enough to keep people out of your stuff." + icon_state = "scrap" + inhand_icon_state = "scrap_lock" + lock_difficulty = 12 + pin_amount = 4 + +/obj/item/ms13/lock/scrap/unlocked + pre_locked = FALSE + +/obj/item/ms13/lock/brass + name = "brass lock" + desc = "A refined and intricate brass lock, keeps people out." + icon_state = "brass" + inhand_icon_state = "brass_lock" + lock_difficulty = 3 + +/obj/item/ms13/lock/brass/unlocked + pre_locked = FALSE + +/obj/item/ms13/lock/advanced + name = "advanced lock" + desc = "A high tech and experimental piece of locking technology, impervious to lockpicking." + icon_state = "advanced" + inhand_icon_state = "advanced_lock" + can_be_lockpicked = FALSE + +/obj/item/ms13/lock/advanced/unlocked + pre_locked = FALSE diff --git a/mojave/code/modules/locks/locks.dm b/mojave/code/modules/locks/locks.dm index 1ac2189e46e..091cd74c0cb 100644 --- a/mojave/code/modules/locks/locks.dm +++ b/mojave/code/modules/locks/locks.dm @@ -23,6 +23,7 @@ var/lock_difficulty = 10 //Custom pin shapes for corresponding with the identical key type bitts //Pins seperated into sloppy seperates so players can edit them and interaction with locks + var/pin_amount = 6 var/pin_1 var/pin_2 var/pin_3 @@ -31,11 +32,15 @@ var/pin_6 //is the lock pre_locked on spawn - randomise on init var/pre_locked = TRUE + //if the lock can be lockpicked after being placed + var/can_be_lockpicked = TRUE /obj/item/ms13/lock/Initialize() . = ..() if(pre_locked) item_lock_locked = TRUE + if(can_be_lockpicked & pre_locked) + AddComponent(/datum/component/lockpickable, difficulty = lock_difficulty) AddElement(/datum/element/world_icon, null, icon, 'mojave/icons/objects/tools/locks_inventory.dmi') generate_pin_order() @@ -45,12 +50,18 @@ /obj/item/ms13/lock/proc/generate_pin_order() var/static/list/pin_lengths = list("A","B","C","D","E","F") - pin_1 = pick(pin_lengths) - pin_2 = pick(pin_lengths) - pin_3 = pick(pin_lengths) - pin_4 = pick(pin_lengths) - pin_5 = pick(pin_lengths) - pin_6 = pick(pin_lengths) + if(pin_amount == 6) + pin_1 = pick(pin_lengths) + pin_2 = pick(pin_lengths) + pin_3 = pick(pin_lengths) + pin_4 = pick(pin_lengths) + pin_5 = pick(pin_lengths) + pin_6 = pick(pin_lengths) + if(pin_amount == 4) // change to some sort of for thing in the future idc rn + pin_1 = pick(pin_lengths) + pin_2 = pick(pin_lengths) + pin_3 = pick(pin_lengths) + pin_4 = pick(pin_lengths) /obj/item/ms13/lock/attack_self(mob/user, list/modifiers) . = ..() @@ -69,6 +80,8 @@ icon_state = initial(icon_state) lock_open = FALSE item_lock_locked = TRUE + if(can_be_lockpicked & pre_locked) + AddComponent(/datum/component/lockpickable, difficulty = lock_difficulty) to_chat(user, span_notice("You clasp the [name] shut.")) playsound(src, 'mojave/sound/ms13effects/lock_clasp.ogg', 50, TRUE) return @@ -104,31 +117,51 @@ if(!item_lock_locked) to_chat(user, span_notice("The [name] is not shut, clasp it closed to lock.")) return - if(key.bitt_1 != pin_1) - playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) - to_chat(user, span_notice("The key dosen't turn in [name].")) - return - if(key.bitt_2 != pin_2) - playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) - to_chat(user, span_notice("The key dosen't turn in [name].")) - return - if(key.bitt_3 != pin_3) - playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) - to_chat(user, span_notice("The key dosen't turn in [name].")) - return - if(key.bitt_4 != pin_4) - playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) - to_chat(user, span_notice("The key dosen't turn in [name].")) - return - if(key.bitt_5 != pin_5) - playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) - to_chat(user, span_notice("The key dosen't turn in [name].")) - return - if(key.bitt_6 != pin_6) - playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) - to_chat(user, span_notice("The key dosen't turn in [name].")) - return + if(pin_amount == 6) + if(key.bitt_1 != pin_1) + playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) + to_chat(user, span_notice("The key dosen't turn in [name].")) + return + if(key.bitt_2 != pin_2) + playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) + to_chat(user, span_notice("The key dosen't turn in [name].")) + return + if(key.bitt_3 != pin_3) + playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) + to_chat(user, span_notice("The key dosen't turn in [name].")) + return + if(key.bitt_4 != pin_4) + playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) + to_chat(user, span_notice("The key dosen't turn in [name].")) + return + if(key.bitt_5 != pin_5) + playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) + to_chat(user, span_notice("The key dosen't turn in [name].")) + return + if(key.bitt_6 != pin_6) + playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) + to_chat(user, span_notice("The key dosen't turn in [name].")) + return + if(pin_amount == 4) + if(key.bitt_1 != pin_1) + playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) + to_chat(user, span_notice("The key dosen't turn in [name].")) + return + if(key.bitt_2 != pin_2) + playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) + to_chat(user, span_notice("The key dosen't turn in [name].")) + return + if(key.bitt_3 != pin_3) + playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) + to_chat(user, span_notice("The key dosen't turn in [name].")) + return + if(key.bitt_4 != pin_4) + playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) + to_chat(user, span_notice("The key dosen't turn in [name].")) + return if(item_lock_locked) + var/datum/component/lockpickable/lockpickable = GetComponent(/datum/component/lockpickable) + qdel(lockpickable) playsound(src, 'mojave/sound/ms13effects/key_unlock.ogg', 50, TRUE) to_chat(user, span_notice("You unlock the [name]. It pops open.")) item_lock_locked = FALSE diff --git a/mojave/code/modules/locks/obj_defines.dm b/mojave/code/modules/locks/obj_defines.dm index 9d96d717969..4918e9e1a96 100644 --- a/mojave/code/modules/locks/obj_defines.dm +++ b/mojave/code/modules/locks/obj_defines.dm @@ -53,51 +53,71 @@ /obj/attackby(obj/item/I, mob/living/user, params) //good lordy this is some bad code, didnt know much back in 2022 and I can confirm this is levels of slopitude that I didnt know possible from me, but hell it works //key interactions if(I.ms13_flags_1 & KEY_ITEM || LOCKING_ITEM && ms13_flags_1 & LOCKABLE_1) //lil more soul for yah - if(I.ms13_flags_1 & LOCKING_ITEM && lock) - if(I == src) - return //don't do an animation if attacking self - var/pixel_x_diff = 0 - var/pixel_y_diff = 0 - - var/direction = get_dir(user, src) - if(direction & NORTH) - pixel_y_diff = 8 - else if(direction & SOUTH) - pixel_y_diff = -8 - - if(direction & EAST) - pixel_x_diff = 8 - else if(direction & WEST) - pixel_x_diff = -8 - animate(user, pixel_x = user.pixel_x + pixel_x_diff, pixel_y = user.pixel_y + pixel_y_diff, time = 1, easing=BACK_EASING|EASE_IN, flags = ANIMATION_PARALLEL) - animate(user, pixel_x = user.pixel_x - pixel_x_diff, pixel_y = user.pixel_y - pixel_y_diff, time = 2, easing=SINE_EASING, flags = ANIMATION_PARALLEL) if(I.ms13_flags_1 & KEY_ITEM && lock) var/obj/item/ms13/key/key = I + if(lock_locked) + if(!do_after(user, 0.5 SECONDS, interaction_key = DOAFTER_SOURCE_LOCKS)) + return + if(I == src) + return //don't do an animation if attacking self + var/pixel_x_diff = 0 + var/pixel_y_diff = 0 + + var/direction = get_dir(user, src) + if(direction & NORTH) + pixel_y_diff = 8 + else if(direction & SOUTH) + pixel_y_diff = -8 + + if(direction & EAST) + pixel_x_diff = 8 + else if(direction & WEST) + pixel_x_diff = -8 + animate(user, pixel_x = user.pixel_x + pixel_x_diff, pixel_y = user.pixel_y + pixel_y_diff, time = 1, easing=BACK_EASING|EASE_IN, flags = ANIMATION_PARALLEL) + animate(user, pixel_x = user.pixel_x - pixel_x_diff, pixel_y = user.pixel_y - pixel_y_diff, time = 2, easing=SINE_EASING, flags = ANIMATION_PARALLEL) //alignment checks - if(key.bitt_1 != lock.pin_1) - playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) - to_chat(user, span_notice("The key dosen't turn in [name].")) - return - if(key.bitt_2 != lock.pin_2) - playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) - to_chat(user, span_notice("The key dosen't turn in [name].")) - return - if(key.bitt_3 != lock.pin_3) - playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) - to_chat(user, span_notice("The key dosen't turn in [name].")) - return - if(key.bitt_4 != lock.pin_4) - playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) - to_chat(user, span_notice("The key dosen't turn in [name].")) - return - if(key.bitt_5 != lock.pin_5) - playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) - to_chat(user, span_notice("The key dosen't turn in [name].")) - return - if(key.bitt_6 != lock.pin_6) - playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) - to_chat(user, span_notice("The key dosen't turn in [name].")) - return + if(lock.pin_amount == 6) + if(key.bitt_1 != lock.pin_1) + playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) + to_chat(user, span_notice("The key dosen't turn in [name].")) + return + if(key.bitt_2 != lock.pin_2) + playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) + to_chat(user, span_notice("The key dosen't turn in [name].")) + return + if(key.bitt_3 != lock.pin_3) + playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) + to_chat(user, span_notice("The key dosen't turn in [name].")) + return + if(key.bitt_4 != lock.pin_4) + playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) + to_chat(user, span_notice("The key dosen't turn in [name].")) + return + if(key.bitt_5 != lock.pin_5) + playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) + to_chat(user, span_notice("The key dosen't turn in [name].")) + return + if(key.bitt_6 != lock.pin_6) + playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) + to_chat(user, span_notice("The key dosen't turn in [name].")) + return + if(lock.pin_amount == 4) + if(key.bitt_1 != lock.pin_1) + playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) + to_chat(user, span_notice("The key dosen't turn in [name].")) + return + if(key.bitt_2 != lock.pin_2) + playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) + to_chat(user, span_notice("The key dosen't turn in [name].")) + return + if(key.bitt_3 != lock.pin_3) + playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) + to_chat(user, span_notice("The key dosen't turn in [name].")) + return + if(key.bitt_4 != lock.pin_4) + playsound(src, 'mojave/sound/ms13effects/lockpicking/lockpick_tension_11.ogg', 50, TRUE) + to_chat(user, span_notice("The key dosen't turn in [name].")) + return if(!lock.item_lock_locked) playsound(src, 'mojave/sound/ms13effects/key_lock.ogg', 50, TRUE) to_chat(user, span_notice("You lock the [name].")) @@ -143,10 +163,28 @@ to_chat(user, span_warning("The [name] is open, close it first.")) return if(!potential_lock.item_lock_locked && potential_lock.lock_open) - if(!do_after(user, 0.5 SECONDS, src)) + if(!do_after(user, 1 SECONDS, src)) return if(!user.transferItemToLoc(potential_lock, src)) return + if(I == src) + return //don't do an animation if attacking self + var/pixel_x_diff = 0 + var/pixel_y_diff = 0 + + var/direction = get_dir(user, src) + if(direction & NORTH) + pixel_y_diff = 8 + else if(direction & SOUTH) + pixel_y_diff = -8 + + if(direction & EAST) + pixel_x_diff = 8 + else if(direction & WEST) + pixel_x_diff = -8 + animate(user, pixel_x = user.pixel_x + pixel_x_diff, pixel_y = user.pixel_y + pixel_y_diff, time = 1, easing=BACK_EASING|EASE_IN, flags = ANIMATION_PARALLEL) + animate(user, pixel_x = user.pixel_x - pixel_x_diff, pixel_y = user.pixel_y - pixel_y_diff, time = 2, easing=SINE_EASING, flags = ANIMATION_PARALLEL) + lock = potential_lock can_be_picked = TRUE lock.item_lock_locked = TRUE diff --git a/mojave/effects/spawners/lootdrop/guarenteed/miscloot.dm b/mojave/effects/spawners/lootdrop/guarenteed/miscloot.dm index 0f667217d92..4d5f059ab66 100644 --- a/mojave/effects/spawners/lootdrop/guarenteed/miscloot.dm +++ b/mojave/effects/spawners/lootdrop/guarenteed/miscloot.dm @@ -41,6 +41,7 @@ /obj/item/shovel/ms13/rake, /obj/item/ms13/brick, /obj/item/knife/ms13/scissors, + /obj/item/ms13/ruler, /obj/item/lighter/ms13/zippo, /obj/item/reagent_containers/ms13/lighterfluid, /obj/item/storage/box/matches/ms13, diff --git a/mojave/effects/spawners/lootdrop/miscloot.dm b/mojave/effects/spawners/lootdrop/miscloot.dm index 07f95df658f..5280079bf01 100644 --- a/mojave/effects/spawners/lootdrop/miscloot.dm +++ b/mojave/effects/spawners/lootdrop/miscloot.dm @@ -43,6 +43,7 @@ /obj/item/shovel/ms13/rake, /obj/item/ms13/brick, /obj/item/knife/ms13/scissors, + /obj/item/ms13/ruler, /obj/item/lighter/ms13/zippo, /obj/item/reagent_containers/ms13/lighterfluid, /obj/item/storage/box/matches/ms13, diff --git a/mojave/icons/objects/crafting/materials_world.dmi b/mojave/icons/objects/crafting/materials_world.dmi index f91c0445d0b..5483f61431b 100644 Binary files a/mojave/icons/objects/crafting/materials_world.dmi and b/mojave/icons/objects/crafting/materials_world.dmi differ diff --git a/mojave/items/crafting/materials.dm b/mojave/items/crafting/materials.dm index 1edbc2c6d6c..5b562831394 100644 --- a/mojave/items/crafting/materials.dm +++ b/mojave/items/crafting/materials.dm @@ -164,6 +164,25 @@ after_eat = CALLBACK(src, .proc/on_bite), \ volume = INFINITY) +/obj/item/stack/sheet/ms13/lens + name = "lenses" + desc = "A a small stack of lenses, perfect for magnification." + singular_name = "lens" + icon_state = "lens" + merge_type = /obj/item/stack/sheet/ms13/lens + amount = 1 + max_amount = 5 + grid_width = 32 + grid_height = 32 + tool_behaviour = TOOL_LENS + w_class = WEIGHT_CLASS_TINY + +/obj/item/stack/sheet/ms13/thread/two + amount = 2 + +/obj/item/stack/sheet/ms13/thread/six + amount = 6 + /// Called when someone bites this food, subtract one from our stack /obj/item/stack/sheet/ms13/glass/proc/on_bite(mob/eater) use(1) diff --git a/mojave/items/misc/fluff.dm b/mojave/items/misc/fluff.dm index 6398aa765b5..90ac1865a5e 100644 --- a/mojave/items/misc/fluff.dm +++ b/mojave/items/misc/fluff.dm @@ -81,9 +81,10 @@ if(do_after(user, 8 SECONDS, target = src, interaction_key = DOAFTER_SOURCE_DECON)) var/drop_location = user.drop_location() user.show_message(span_notice("You disassemble \the [src] into scrap and parts."), MSG_VISUAL) - new /obj/item/stack/sheet/ms13/glass(drop_location, 3) - new /obj/item/stack/sheet/ms13/scrap(drop_location, 2) - new /obj/item/stack/sheet/ms13/scrap_electronics(drop_location, 2) + new /obj/item/stack/sheet/ms13/glass(loc, 3) + new /obj/item/stack/sheet/ms13/scrap(loc, 2) + new /obj/item/stack/sheet/ms13/scrap_electronics(loc, 2) + new /obj/item/stack/sheet/ms13/lens(loc, 1) qdel(src) /obj/item/ms13/fluff/microscope/examine(mob/user) diff --git a/mojave/items/tools/tools.dm b/mojave/items/tools/tools.dm index e247e3ebbdb..01a6ac6d7ae 100644 --- a/mojave/items/tools/tools.dm +++ b/mojave/items/tools/tools.dm @@ -232,6 +232,7 @@ sharpness = SHARP_POINTY wound_bonus = CANT_WOUND w_class = WEIGHT_CLASS_TINY + tool_behaviour = TOOL_PLIERS random_color = FALSE log_pickup_and_drop = TRUE grid_width = 32 @@ -408,6 +409,37 @@ . = ..() AddElement(/datum/element/world_icon, null, icon, 'mojave/icons/objects/tools/tools_inventory.dmi') +/obj/item/ms13/ruler + name = "ruler" + desc = "A basic ruler, allows for precise measurements on a small scale." + icon = 'mojave/icons/objects/tools/tools_world.dmi' + lefthand_file = 'mojave/icons/mob/inhands/items_lefthand.dmi' + righthand_file = 'mojave/icons/mob/inhands/items_righthand.dmi' + worn_icon = 'mojave/icons/mob/worn_melee.dmi' + worn_icon_state = "empty_placeholder" + icon_state = "ruler" + inhand_icon_state = "ruler" + hitsound = 'mojave/sound/ms13weapons/meleesounds/ruler_slap.ogg' + pickup_sound = 'mojave/sound/ms13weapons/meleesounds/knife_pickup.ogg' + attack_verb_continuous = list("smacks", "hits", "thwaps") + attack_verb_simple = list("smack", "hits", "thwap") + force = 5 + throwforce = 2 + wound_bonus = 0 + sharpness = NONE + w_class = WEIGHT_CLASS_SMALL + max_integrity = 200 + armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 100, ACID = 50) + resistance_flags = FIRE_PROOF + tool_behaviour = TOOL_RULER + slot_flags = ITEM_SLOT_BELT + grid_width = 64 + grid_height = 32 + +/obj/item/ms13/ruler/Initialize() + . = ..() + AddElement(/datum/element/world_icon, null, icon, 'mojave/icons/objects/tools/tools_inventory.dmi') + /obj/item/ms13/brick name = "brick" desc = "A literal brick. Nothing more." diff --git a/mojave/modules/crafting/recipes/recipes.dm b/mojave/modules/crafting/recipes/recipes.dm index 68cb91ad1dc..3a197fc30e5 100644 --- a/mojave/modules/crafting/recipes/recipes.dm +++ b/mojave/modules/crafting/recipes/recipes.dm @@ -17,10 +17,67 @@ time = 6 SECONDS tool_behaviors = list() tool_paths = list() - reqs = list(/obj/item/stack/sheet/ms13/scrap = 3) + reqs = list(/obj/item/stack/sheet/ms13/scrap_brass = 3) category = CAT_UTILITY crafting_interface = CRAFTING_BENCH_GENERAL +/datum/crafting_recipe/key + name = "brass key" + result = /obj/item/ms13/key/brass + time = 20 SECONDS + tool_behaviors = list(TOOL_SAW, TOOL_DRILL, TOOL_RULER) + tool_paths = list(/obj/item/ms13/hammer) + reqs = list(/obj/item/stack/sheet/ms13/refined_brass = 1) + category = CAT_UTILITY + crafting_interface = CRAFTING_BENCH_GENERAL + +/datum/crafting_recipe/scrapkey + name = "scrap key" + result = /obj/item/ms13/key/scrap + time = 12 SECONDS + tool_behaviors = list(TOOL_SAW) + tool_paths = list(/obj/item/ms13/hammer) + reqs = list(/obj/item/stack/sheet/ms13/scrap = 4) + category = CAT_UTILITY + crafting_interface = CRAFTING_BENCH_GENERAL + +/datum/crafting_recipe/scraplock + name = "scrap lock" + result = /obj/item/ms13/lock/scrap/unlocked + time = 15 SECONDS + tool_behaviors = list(TOOL_SAW) + tool_paths = list(/obj/item/ms13/hammer) + reqs = list(/obj/item/stack/sheet/ms13/scrap = 5, + /obj/item/stack/sheet/ms13/scrap_parts = 1, + /obj/item/stack/sheet/ms13/refined_lead = 1) + category = CAT_UTILITY + crafting_interface = CRAFTING_BENCH_GENERAL + +/datum/crafting_recipe/brasslock + name = "brass lock" + result = /obj/item/ms13/lock/brass/unlocked + time = 30 SECONDS + tool_behaviors = list(TOOL_SAW, TOOL_DRILL, TOOL_SCREWDRIVER) + tool_paths = list(/obj/item/ms13/hammer) + reqs = list(/obj/item/stack/sheet/ms13/refined_brass = 2, + /obj/item/stack/sheet/ms13/scrap_parts = 3, + /obj/item/stack/sheet/ms13/refined_steel = 1,) + category = CAT_UTILITY + crafting_interface = CRAFTING_BENCH_GENERAL + +/datum/crafting_recipe/advancedlock + name = "advanced lock" + result = /obj/item/ms13/lock/advanced/unlocked + time = 25 SECONDS + tool_behaviors = list(TOOL_SAW, TOOL_PLIERS, TOOL_LENS, TOOL_SCREWDRIVER) + tool_paths = list() + reqs = list(/obj/item/ms13/lock/brass = 1, + /obj/item/stack/sheet/ms13/circuits = 3, + /obj/item/ms13/component/plasma_battery = 1, + /obj/item/stack/sheet/ms13/refined_alu = 2) + category = CAT_UTILITY + crafting_interface = CRAFTING_BENCH_ELECTRIC + /datum/crafting_recipe/fishing_rod name = "wooden fishing rod" result = /obj/item/ms13/tools/fishing_rod/basic diff --git a/mojave/sound/ms13effects/keydrop.ogg b/mojave/sound/ms13effects/keydrop.ogg new file mode 100644 index 00000000000..66087449df8 Binary files /dev/null and b/mojave/sound/ms13effects/keydrop.ogg differ diff --git a/mojave/sound/ms13effects/keygrab.ogg b/mojave/sound/ms13effects/keygrab.ogg new file mode 100644 index 00000000000..697728d28d0 Binary files /dev/null and b/mojave/sound/ms13effects/keygrab.ogg differ diff --git a/mojave/sound/ms13effects/lock_clasp.ogg b/mojave/sound/ms13effects/lock_clasp.ogg new file mode 100644 index 00000000000..e18dbe0ece2 Binary files /dev/null and b/mojave/sound/ms13effects/lock_clasp.ogg differ diff --git a/mojave/sound/ms13effects/lockdrop.ogg b/mojave/sound/ms13effects/lockdrop.ogg new file mode 100644 index 00000000000..bc20686176b Binary files /dev/null and b/mojave/sound/ms13effects/lockdrop.ogg differ diff --git a/mojave/sound/ms13effects/lockgrab.ogg b/mojave/sound/ms13effects/lockgrab.ogg new file mode 100644 index 00000000000..243fb73f203 Binary files /dev/null and b/mojave/sound/ms13effects/lockgrab.ogg differ diff --git a/mojave/sound/ms13weapons/meleesounds/ruler_slap.ogg b/mojave/sound/ms13weapons/meleesounds/ruler_slap.ogg new file mode 100644 index 00000000000..593bce46fc8 Binary files /dev/null and b/mojave/sound/ms13weapons/meleesounds/ruler_slap.ogg differ diff --git a/tgstation.dme b/tgstation.dme index a22ec96f49b..e7d0074d6f3 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -4495,12 +4495,15 @@ #include "mojave\code\modules\jobs\job_types\town_drought\town_enforcer.dm" #include "mojave\code\modules\jobs\job_types\wasteland\_wasteland.dm" #include "mojave\code\modules\jobs\job_types\wasteland\wastelander.dm" -#include "mojave\code\modules\locks\atoms_moveable.dm" #include "mojave\code\modules\locks\keys.dm" #include "mojave\code\modules\locks\lockpicking.dm" #include "mojave\code\modules\locks\lockpicks.dm" #include "mojave\code\modules\locks\locks.dm" #include "mojave\code\modules\locks\obj_defines.dm" +#include "mojave\code\modules\locks\keys\key_crafting.dm" +#include "mojave\code\modules\locks\keys\key_types.dm" +#include "mojave\code\modules\locks\lock\lock_crafting.dm" +#include "mojave\code\modules\locks\lock\lock_types.dm" #include "mojave\code\modules\mapping\helpers.dm" #include "mojave\code\modules\mapping\checks\stack_checks.dm" #include "mojave\code\modules\mapping\checks\wall_checks.dm"