Merge pull request #897 from Dahlular/ikeacargo

Carpentry Part 1
This commit is contained in:
Dahlular
2021-01-17 04:17:39 -07:00
committed by GitHub
11 changed files with 368 additions and 0 deletions
@@ -0,0 +1,4 @@
/datum/export/sweatshop
cost = 850
unit_name = "custom furniture"
export_types = list(/obj/item/processed/wood/stool)
@@ -0,0 +1,6 @@
/obj/item/processed/metal
name = "Heated Metal"
desc = "A malleable metal, able to be cut into nails."
icon = 'hyperstation/icons/obj/cargo/sweatshop/metal.dmi'
icon_state = "metal"
sharpness = TRUE
@@ -0,0 +1,219 @@
//THE TOOLS
/obj/item/handsaw
name = "handsaw"
desc = "A shoddy tool used to process wood into smaller segments."
icon = 'hyperstation/icons/obj/cargo/sweatshop/sweatshop.dmi'
icon_state = "handsaw"
slot_flags = ITEM_SLOT_BACK
force = 8
sharpness = TRUE
w_class = WEIGHT_CLASS_HUGE
materials = list(MAT_METAL=50)
attack_verb = list("slashed", "sawed")
/obj/item/hammer
name = "hammer"
desc = "A tool used to manually bash nails into place."
icon = 'hyperstation/icons/obj/cargo/sweatshop/sweatshop.dmi'
icon_state = "hammer"
slot_flags = ITEM_SLOT_BELT
force = 7
sharpness = FALSE
w_class = WEIGHT_CLASS_NORMAL
materials = list(MAT_METAL=100)
attack_verb = list("bonked", "nailed")
/obj/item/glue
name = "glue"
desc = "Used to haphazardly stick things together; secured by the toughest Monkey Glue(TM)."
icon = 'hyperstation/icons/obj/cargo/sweatshop/sweatshop.dmi'
icon_state = "glue"
force = 0
sharpness = FALSE
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_PLASTIC=25)
attack_verb = list("glued", "coughed")
/obj/item/borer
name = "manual borer"
desc = "An incredibly awful tool used to manually drill holes into something... Surely there's a better option."
icon = 'hyperstation/icons/obj/cargo/sweatshop/sweatshop.dmi'
icon_state = "borer"
force = 3
sharpness = TRUE
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=25)
attack_verb = list("bored", "drilled")
/obj/item/sandpaper
name = "sandpaper strip"
desc = "A strip of sandpaper, commonly used for sanding down rough surfaces into a more smooth shape."
icon = 'hyperstation/icons/obj/cargo/sweatshop/sweatshop.dmi'
icon_state = "sandpaper"
force = 1
sharpness = FALSE
w_class = WEIGHT_CLASS_TINY
materials = list(MAT_GLASS=1) //lmao
attack_verb = list("sanded", "licked")
/obj/item/nails
name = "metal nails"
desc = "A bunch of nails, used for hammering into things."
icon = 'hyperstation/icons/obj/cargo/sweatshop/sweatshop.dmi'
icon_state = "nails"
force = 0
sharpness = TRUE
w_class = WEIGHT_CLASS_TINY
materials = list(MAT_METAL=10)
attack_verb = list("nailed", "screwed")
/obj/item/processed
name = "Generic Processed Item"
desc = "You shouldn't see this!"
icon = 'hyperstation/icons/obj/cargo/sweatshop/sweatshop.dmi'
//BASIC RECIPES - To do, add sound. As well as refactor everything in a more smart way so we can add the possibility of multiple wood types in the future.
/obj/item/processed/wood/plank/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/handsaw))
to_chat(user,"<span class='notice'> You begin to saw [src] in half...</span>")
if(do_after(user, 40))
new /obj/item/processed/wood/platform(loc)
new /obj/item/processed/wood/platform(loc) //send help i dont know how to make two in the same line lmfao
to_chat(user, "<span class='notice'> You saw [src] in half.</span>")
qdel(src)
else
to_chat(user, "<span class='warning'>You need to hold still to saw [src]!</span>")
else
..()
/obj/item/processed/wood/platform/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/handsaw))
to_chat(user,"<span class='notice'> You begin cut [src] into smaller pieces...</span>")
if(do_after(user, 20))
new /obj/item/processed/wood/block(loc)
new /obj/item/processed/wood/block(loc)
new /obj/item/processed/wood/block(loc)
new /obj/item/processed/wood/block(loc)
to_chat(user, "<span class='notice'> You cut [src] into four pieces.</span>")
qdel(src)
else
to_chat(user, "<span class='warning'>You need to hold still to saw [src]!</span>")
else
..()
/obj/item/processed/wood/block/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/sandpaper))
to_chat(user,"<span class='notice'> You carefully begin to sand down [src]...</span>")
if(do_after(user, 50))
new /obj/item/processed/wood/peg(loc)
to_chat(user, "<span class='notice'> You smooth [src] into a peg.</span>")
qdel(src)
else
to_chat(user, "<span class='warning'>You need to hold still to sand [src]!</span>")
else
..()
/obj/item/processed/metal/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/wirecutters))
to_chat(user,"<span class='notice'> You tediously begin to cut [src] into several nails...</span>")
if(do_after(user, 80))
new /obj/item/nails(loc)
to_chat(user, "<span class='notice'> You make some crude metal nails.</span>")
qdel(src)
else
to_chat(user, "<span class='warning'>You need to hold still to process [src]!</span>")
else
..()
//Covered in glue
/obj/item/processed/wood/block/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/glue))
to_chat(user,"<span class='notice'> You begin to glue down one end of the [src]...</span>")
if(do_after(user, 10))
new /obj/item/processed/wood/glueblock(loc)
to_chat(user, "<span class='notice'> You slap some glue onto [src].</span>")
qdel(src)
else
to_chat(user, "<span class='warning'>You need to hold still to glue [src]!</span>")
else
..()
/obj/item/processed/wood/peg/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/glue))
to_chat(user,"<span class='notice'> You begin to glue down one end of the [src]...</span>")
if(do_after(user, 10))
new /obj/item/processed/wood/gluepeg(loc)
to_chat(user, "<span class='notice'> You slap some glue onto [src].</span>")
qdel(src)
else
to_chat(user, "<span class='warning'>You need to hold still to glue [src]!</span>")
else
..()
//Seats
/obj/item/processed/wood/platform/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/borer))
to_chat(user,"<span class='notice'> You begin to cut four holes into [src]...</span>")
if(do_after(user, 40))
new /obj/item/processed/wood/seat(loc)
to_chat(user, "<span class='notice'> You drill four holes into [src].</span>")
qdel(src)
else
to_chat(user, "<span class='warning'>You need to hold still to refine [src]!</span>")
else
..()
//Stools - Further crafting
/obj/item/processed/wood/stool1/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/nails))
to_chat(user,"<span class='notice'> You place nails into [src]...</span>")
if(do_after(user, 20))
new /obj/item/processed/wood/stool2(loc)
to_chat(user, "<span class='notice'> The nails are ready to be hammered.</span>")
qdel(src)
qdel(I)
else
to_chat(user, "<span class='warning'>You need to hold still to refine [src]!</span>")
else
..()
/obj/item/processed/wood/stool2/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/hammer))
to_chat(user,"<span class='notice'> You begin to hammer the [src]...</span>")
if(do_after(user, 30))
new /obj/item/processed/wood/stool3(loc)
to_chat(user, "<span class='notice'> The nails are hammered into place.</span>")
qdel(src)
else
to_chat(user, "<span class='warning'>You need to hold still to refine [src]!</span>")
else
..()
/obj/item/processed/wood/stool3/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/sandpaper))
to_chat(user,"<span class='notice'> You begin to sand the [src]...</span>")
if(do_after(user, 30))
new /obj/item/processed/wood/stool4(loc)
to_chat(user, "<span class='notice'> You sand down the [src].</span>")
qdel(src)
else
to_chat(user, "<span class='warning'>You need to hold still to refine [src]!</span>")
else
..()
/obj/item/processed/wood/stool4/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/processed/wood/glueblock))
to_chat(user,"<span class='notice'> You add some finishing touches to the [src]...</span>")
if(do_after(user, 30))
new /obj/item/processed/wood/stool(loc)
to_chat(user, "<span class='notice'> You complete the [src].</span>")
qdel(src)
qdel(I)
else
to_chat(user, "<span class='warning'>You need to hold still to refine [src]!</span>")
else
..()
@@ -0,0 +1,102 @@
//WOODEN COMPONENTS. honestly i need to move some shit around to allow for easier material swapping, but that's for a later date.
/obj/item/processed/wood
name = "Wooden Processed Item"
desc = "You shouldn't see this!"
icon = 'hyperstation/icons/obj/cargo/sweatshop/wooden.dmi'
sharpness = FALSE
/obj/item/processed/wood/plank
name = "processable wooden plank"
desc = "A somewhat sturdy refined plank. This can be used in various applications."
icon_state = "plank"
sharpness = FALSE
/obj/item/processed/wood/platform
name = "wood platform"
desc = "A somewhat sturdy cropping of a plank. This one is an alright foundation for chairs and stools."
icon_state = "platform"
force = 3
w_class = WEIGHT_CLASS_NORMAL
attack_verb = list("slapped", "thunked")
/obj/item/processed/wood/block
name = "wood block"
desc = "A chopped platform into a wooden block. This one can be used for sanded into pegs, or used as a base on it's own."
icon_state = "block"
force = 2
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("slapped", "thunked")
/obj/item/processed/wood/peg
name = "wood peg"
desc = "A wooden peg. Useful for fitting into holes."
icon_state = "peg"
force = 1
w_class = WEIGHT_CLASS_TINY
attack_verb = list("donked", "thunked")
//glue
/obj/item/processed/wood/gluepeg
name = "glued wood peg"
desc = "A wooden peg. With a bunch of glue used for securing."
icon_state = "gluepeg"
force = 1
w_class = WEIGHT_CLASS_TINY
attack_verb = list("pegged", "thunked")
/obj/item/processed/wood/glueblock
name = "glued wood block"
desc = "A wooden block. With a bunch of glue used for securing."
icon_state = "glueblock"
force = 2
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("blocked", "thunked")
//seat
/obj/item/processed/wood/seat
name = "wood seat"
desc = "A baseline for crafting seats. Not exactly that comfortable to sit on..."
icon_state = "seat"
force = 2
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("slapped", "thunked")
//Stool steps. There's probably an easier way to do this, but I cannot be assed rn, I'll refine after PR
/obj/item/processed/wood/stool1
name = "stool base"
desc = "A haphazardly made base for a stool. It's not even secured with any nails."
icon_state = "stool1"
force = 4
w_class = WEIGHT_CLASS_BULKY
/obj/item/processed/wood/stool2
name = "nailed stool base"
desc = "Nails are in position"
icon_state = "stool2"
force = 4
w_class = WEIGHT_CLASS_BULKY
/obj/item/processed/wood/stool3
name = "hammered stool base"
desc = "A vaguely stool-shaped... Thing. Could use some sandpaper."
icon_state = "stool3"
force = 4
w_class = WEIGHT_CLASS_BULKY
/obj/item/processed/wood/stool4
name = "bland stool"
desc = "A rather bland stool."
icon_state = "stool4"
force = 4
w_class = WEIGHT_CLASS_BULKY
//The finished product
/obj/item/processed/wood/stool
name = "custom stool"
desc = "An intricite, custom stool."
icon_state = "stool"
force = 4
w_class = WEIGHT_CLASS_BULKY
@@ -9,3 +9,24 @@
name = "Penis Milking Machine"
reqs = list(/obj/item/stack/cable_coil = 5, /obj/item/stack/rods = 1, /obj/item/stack/sheet/cardboard = 1, /obj/item/reagent_containers/glass/beaker/large = 1, /obj/item/stock_parts/manipulator = 1)
result = /obj/item/milking_machine/penis
//to do: put carpentry in it's own crafting tab
/datum/crafting_recipe/weak_metal
name = "Heated Metal"
reqs = list(/obj/item/stack/sheet/metal = 5)
tools = list(TOOL_WELDER)
category = CAT_MISC
result = /obj/item/processed/metal
/datum/crafting_recipe/processed_wood
name = "Processable Wood"
reqs = list(/obj/item/stack/sheet/mineral/wood = 5)
tools = list(TOOL_WIRECUTTER, TOOL_WELDER)
category = CAT_MISC
result = /obj/item/processed/wood/plank
/datum/crafting_recipe/stool_base
name = "Stool Base"
reqs = list(/obj/item/processed/wood/seat = 1, /obj/item/processed/wood/gluepeg = 4)
category = CAT_MISC
result = /obj/item/processed/wood/stool1