mirror of
https://github.com/KabKebab/GS13.git
synced 2026-08-30 16:38:30 +01:00
Scale Start
Scale is now: -craftable -able to be disasembled
This commit is contained in:
@@ -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)
|
||||
. = ..()
|
||||
. += "<span class='notice'>It's held together by a couple of <b>bolts</b>.</span>"
|
||||
if(!has_buckled_mobs())
|
||||
. += "<span class='notice'>Drag your sprite to weigh yourself.</span>"
|
||||
|
||||
Reference in New Issue
Block a user