constructible showers, loom, sinks & barrels now deconstruct

Deconstruction:
Loom - Screwdriver
Wooden Barrel - Screwdriver
Sink - Wrench
Shower - Screwdriver > Wrench

Securing:
Loom - Wrench
Wooden Barrel - Wrench
Shower - Screwdriver

Adds showers as craftable objects when using metal sheets. Also organizes some things in the metal sheet crafting menu
This commit is contained in:
DragonTrance
2020-12-25 13:22:21 -07:00
parent e6a7a295d2
commit 162ae674c6
4 changed files with 213 additions and 69 deletions
+34 -3
View File
@@ -38,8 +38,10 @@
playsound(src, 'sound/effects/bubbles.ogg', 50, TRUE)
/obj/structure/fermenting_barrel/attackby(obj/item/I, mob/user, params)
var/obj/item/reagent_containers/food/snacks/grown/fruit = I
if(istype(fruit))
if (user.a_intent != INTENT_HELP)
return ..()
if (istype(I, /obj/item/reagent_containers/food/snacks/grown))
var/obj/item/reagent_containers/food/snacks/grown/fruit = I
if(!fruit.can_distill)
to_chat(user, "<span class='warning'>You can't distill this into anything...</span>")
return TRUE
@@ -50,7 +52,32 @@
addtimer(CALLBACK(src, .proc/makeWine, fruit), rand(80, 120) * speed_multiplier)
return TRUE
else
return ..()
switch (I.tool_behaviour)
if (TOOL_SCREWDRIVER)
user.visible_message("<span class='info'>[user] starts disassembling [src]...</span>",
"<span class='info'>You start disassembling [src]...</span>")
var/reagent_calculation = 1
if (reagents.total_volume)
user.visible_message("<span class='warning'>Liquid starts pouring out [src] as [user] starts disassembling it!</span>",
"<span class='warning'>Liquid starts pouring out [src], maybe you should think about this...</span>")
reagent_calculation += 2+round(reagents.total_volume/100)/2
I.play_tool_sound(src)
if(I.use_tool(src, user, 30*reagent_calculation))
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, TRUE)
if (reagents.total_volume)
chem_splash(loc, round(reagent_calculation*0.75), list(reagents))
deconstruct(TRUE)
else if (reagents.total_volume)
visible_message("<span class='info'>[user] stops disassembling [src].</span>")
if (TOOL_WRENCH)
if (anchored) //Imaginary bolts on the ground, just like anything else that can get wrenched
to_chat(user, "<span class='notice'>You unsecure [src].</span>")
I.play_tool_sound(src)
anchored = FALSE
else
to_chat(user, "<span class='notice'>You secure [src].</span>")
I.play_tool_sound(src)
anchored = TRUE
/obj/structure/fermenting_barrel/attack_hand(mob/user)
open = !open
@@ -69,3 +96,7 @@
icon_state = "barrel_open"
else
icon_state = "barrel"
/obj/structure/fermenting_barrel/deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/mineral/wood (get_turf(src), 10)
qdel(src)