diff --git a/GainStation13/code/obj/structure/scale.dm b/GainStation13/code/obj/structure/scale.dm new file mode 100644 index 00000000..a196b159 --- /dev/null +++ b/GainStation13/code/obj/structure/scale.dm @@ -0,0 +1,44 @@ +/obj/structure/scale + name = "weighing scale" + desc = "You can weigh yourself with this" + icon = 'GainStation13/icons/obj/scale.dmi' + icon_state = "scale" + anchored = TRUE + resistance_flags = NONE + max_integrity = 250 + integrity_failure = 25 + var/buildstacktype = /obj/item/stack/sheet/metal + var/buildstackamount = 3 + layer = OBJ_LAYER + var/lastreading = 0 + +/obj/structure/scale/deconstruct() + // If we have materials, and don't have the NOCONSTRUCT flag + if(buildstacktype && (!(flags_1 & NODECONSTRUCT_1))) + new buildstacktype(loc,buildstackamount) + ..() + +/obj/structure/scale/attackby(obj/item/W, mob/user, params) + if(istype(W, /obj/item/wrench) && !(flags_1&NODECONSTRUCT_1)) + W.play_tool_sound(src) + deconstruct() + else if(istype(W, /obj/item/assembly/shock_kit)) + if(!user.temporarilyRemoveItemFromInventory(W)) + return + var/obj/item/assembly/shock_kit/SK = W + var/obj/structure/chair/e_chair/E = new /obj/structure/chair/e_chair(src.loc) + playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1) + E.setDir(dir) + E.part = SK + SK.forceMove(E) + SK.master = E + qdel(src) + else + return ..() + +/obj/structure/chair/examine(mob/user) + . = ..() + . += "It's held together by a couple of bolts." + if(!has_buckled_mobs()) + . += "Drag your sprite to weigh yourself." + diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 076afb97..c2683d7b 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -53,6 +53,7 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \ null, \ //add this when I can find a way to make them easily constructible > new/datum/stack_recipe("sink", /obj/structure/sink, 2, one_per_turf = TRUE, on_floor = TRUE), new/datum/stack_recipe("shower", /obj/machinery/shower/crafted, 2, one_per_turf = TRUE, on_floor = TRUE), \ + new/datum/stack_recipe("scale", /obj/structure/scale, 3, one_per_turf = TRUE, on_floor = TRUE), \ null, \ new/datum/stack_recipe("rack parts", /obj/item/rack_parts), \ new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = TRUE, on_floor = TRUE), \ diff --git a/tgstation.dme b/tgstation.dme index c3a9558e..6f1afdd7 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3072,6 +3072,7 @@ #include "GainStation13\code\modules\reagents\chemistry\recipes\fatchem.dm" #include "GainStation13\code\modules\vending\mealdor.dm" #include "GainStation13\code\obj\fatray.dm" +#include "GainStation13\code\obj\structure\scale.dm" #include "hyperstation\code\__DEFINES\economy.dm" #include "hyperstation\code\__DEFINES\wendigo.dm" #include "hyperstation\code\controllers\subsystem\economy.dm"