diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index fd7d10c6612..bfac425ebd9 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -154,6 +154,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list( new /datum/stack_recipe("wooden chair", /obj/structure/stool/bed/chair/wood/normal, 3, time = 10, one_per_turf = 1, on_floor = 1), new /datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), new /datum/stack_recipe("bookcase", /obj/structure/bookcase, 5, time = 50, one_per_turf = 1, on_floor = 1), + new /datum/stack_recipe("dresser", /obj/structure/dresser, 30, time = 50, one_per_turf = 1, on_floor = 1), new /datum/stack_recipe("drying rack", /obj/machinery/smartfridge/drying_rack, 10, time = 15, one_per_turf = 1, on_floor = 1), new /datum/stack_recipe("dog bed", /obj/structure/stool/bed/dogbed, 10, time = 10, one_per_turf = 1, on_floor = 1), \ new /datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40), diff --git a/code/game/objects/structures/dresser.dm b/code/game/objects/structures/dresser.dm index a711e6c2049..e8d72b600fe 100644 --- a/code/game/objects/structures/dresser.dm +++ b/code/game/objects/structures/dresser.dm @@ -11,7 +11,7 @@ /obj/structure/dresser/attack_hand(mob/user as mob) if(!Adjacent(user))//no tele-grooming return - if(ishuman(user)) + if(ishuman(user) && anchored) var/mob/living/carbon/human/H = user var/choice = input(user, "Underwear, Undershirt, or Socks?", "Changing") as null|anything in list("Underwear","Undershirt","Socks") @@ -53,4 +53,33 @@ H.socks = new_socks add_fingerprint(H) - H.update_body() \ No newline at end of file + H.update_body() + +/obj/structure/dresser/attackby(obj/item/weapon/W, mob/living/user, params) + add_fingerprint(user) + user.changeNext_move(CLICK_CD_MELEE) + if(iswrench(W)) + if(anchored) + playsound(loc, W.usesound, 100, 1) + user.visible_message("[user] is loosening the [name]'s bolts.", \ + "You are loosening the [name]'s bolts...") + if(do_after(user, 40 * W.toolspeed, target = src)) + if(!loc || !anchored) + return + user.visible_message("[user] loosened the [name]'s bolts!", \ + "You loosen the [name]'s bolts!") + anchored = 0 + else + if(!isfloorturf(loc)) + user.visible_message("A floor must be present to secure the [name]!") + return + playsound(loc, W.usesound, 100, 1) + user.visible_message("[user] is securing the [name]'s bolts...", \ + "You are securing the [name]'s bolts...") + if(do_after(user, 40 * W.toolspeed, target = src)) + if(!loc || anchored) + return + user.visible_message("[user] has secured the [name]'s bolts.", \ + "You have secured the [name]'s bolts.") + anchored = 1 +// return ..() \ No newline at end of file