From 130e066372104590fb7d618c80ce2155c9e4fef3 Mon Sep 17 00:00:00 2001 From: zxaber <37497534+zxaber@users.noreply.github.com> Date: Fri, 31 May 2019 04:10:27 -0700 Subject: [PATCH] Allows unanchoring and deconstructing of linen bins (#44171) * linen bins, your time has come * update * update --- code/game/objects/items/stacks/rods.dm | 1 + code/game/objects/structures/bedsheet_bin.dm | 22 +++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index 2a54764024d..2c8c9157f74 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -2,6 +2,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \ new/datum/stack_recipe("grille", /obj/structure/grille, 2, time = 10, one_per_turf = TRUE, on_floor = FALSE), \ new/datum/stack_recipe("table frame", /obj/structure/table_frame, 2, time = 10, one_per_turf = 1, on_floor = 1), \ new/datum/stack_recipe("scooter frame", /obj/item/scooter_frame, 10, time = 25, one_per_turf = 0), \ + new/datum/stack_recipe("linen bin", /obj/structure/bedsheetbin/empty, 2, time = 5, one_per_turf = 0), \ )) /obj/item/stack/rods diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index a23ce32842d..4b1db6900ca 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -257,7 +257,7 @@ LINEN BINS var/type = pickweight(list("Colors" = 80, "Special" = 20)) switch(type) if("Colors") - type = pick(list(/obj/item/bedsheet, + type = pick(list(/obj/item/bedsheet, /obj/item/bedsheet/blue, /obj/item/bedsheet/green, /obj/item/bedsheet/grey, @@ -288,6 +288,11 @@ LINEN BINS var/list/sheets = list() var/obj/item/hidden = null +/obj/structure/bedsheetbin/empty + amount = 0 + icon_state = "linenbin-empty" + anchored = FALSE + /obj/structure/bedsheetbin/examine(mob/user) ..() @@ -322,6 +327,21 @@ LINEN BINS amount++ to_chat(user, "You put [I] in [src].") update_icon() + + else if(default_unfasten_wrench(user, I, 5)) + return + + else if(I.tool_behaviour == TOOL_SCREWDRIVER) + if(flags_1 & NODECONSTRUCT_1) + return + if(amount) + to_chat(user, "The [src] must be empty first!") + return + if(I.use_tool(src, user, 5, volume=50)) + to_chat(user, "You disassemble the [src].") + new /obj/item/stack/rods(loc, 2) + qdel(src) + else if(amount && !hidden && I.w_class < WEIGHT_CLASS_BULKY) //make sure there's sheets to hide it among, make sure nothing else is hidden in there. if(!user.transferItemToLoc(I, src)) to_chat(user, "\The [I] is stuck to your hand, you cannot hide it among the sheets!")