Code Cleanup + Cushions

This commit is contained in:
Dahlular
2021-01-18 01:14:58 -07:00
parent 659550ff25
commit 9f0b22fa95
11 changed files with 169 additions and 64 deletions
@@ -1,4 +1,24 @@
/datum/export/sweatshop
/datum/export/sweatshop/stool
cost = 850
unit_name = "custom furniture"
unit_name = "custom stool"
export_types = list(/obj/item/processed/wood/stool)
/datum/export/sweatshop/cushion
cost = 300
unit_name = "cloth cushion"
export_types = list(/obj/item/cushion)
/datum/export/sweatshop/cushionsilk
cost = 500
unit_name = "silk cushion"
export_types = list(/obj/item/cushion)
/datum/export/sweatshop/stool/cushioncloth
cost = 1800
unit_name = "cushioned stool (cloth)"
export_types = list(/obj/item/processed/wood/stoolcloth)
/datum/export/sweatshop/stool/cushionsilk
cost = 2400
unit_name = "cushioned stool (cloth)"
export_types = list(/obj/item/processed/wood/stoolsilk)
@@ -1,9 +1,13 @@
//THE TOOLS
/obj/item/carpentry
name = "carpentry"
desc = "You shouldn't be seeing this!"
icon = 'hyperstation/icons/obj/cargo/sweatshop/sweatshop.dmi'
usesound = list('sound/effects/picaxe1.ogg', 'sound/effects/picaxe2.ogg', 'sound/effects/picaxe3.ogg')
/obj/item/handsaw
/obj/item/carpentry/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
@@ -12,10 +16,9 @@
materials = list(MAT_METAL=50)
attack_verb = list("slashed", "sawed")
/obj/item/hammer
/obj/item/carpentry/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
@@ -24,10 +27,9 @@
materials = list(MAT_METAL=100)
attack_verb = list("bonked", "nailed")
/obj/item/glue
/obj/item/carpentry/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
@@ -35,10 +37,9 @@
materials = list(MAT_PLASTIC=25)
attack_verb = list("glued", "coughed")
/obj/item/borer
/obj/item/carpentry/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
@@ -46,10 +47,9 @@
materials = list(MAT_METAL=25)
attack_verb = list("bored", "drilled")
/obj/item/sandpaper
/obj/item/carpentry/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
@@ -68,57 +68,68 @@
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'
/obj/item/cushion
name = "basic cushion"
desc = "Beats sitting on the floor."
icon = 'hyperstation/icons/obj/cargo/sweatshop/cloth.dmi'
icon_state = "clothcushion"
force = 0
sharpness = FALSE
w_class = WEIGHT_CLASS_NORMAL
attack_verb = list("thomped", "thwacked")
/obj/item/cushion/silk
name = "silk cushion"
desc = "How'd it turn red?!"
icon_state = "silkcushion"
//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.
//saw a plank into two platforms
/obj/item/processed/wood/plank/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/handsaw))
if(istype(I, /obj/item/carpentry/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
if(do_after(user, 40) && isturf(loc))
new src.sawobj(loc)
new src.sawobj(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
..()
//saw a platform into four blocks
/obj/item/processed/wood/platform/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/handsaw))
if(istype(I, /obj/item/carpentry/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)
if(do_after(user, 20) && isturf(loc))
new src.sawobj(loc)
new src.sawobj(loc)
new src.sawobj(loc)
new src.sawobj(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
..()
//sand a block into a peg
/obj/item/processed/wood/block/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/sandpaper))
if(istype(I, /obj/item/carpentry/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)
if(do_after(user, 50) && isturf(loc))
new src.sandobj(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
..()
//cut heated metal into nails
/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))
if(do_after(user, 80) && isturf(loc))
new /obj/item/nails(loc)
new /obj/item/nails(loc)
to_chat(user, "<span class='notice'> You make some crude metal nails.</span>")
qdel(src)
@@ -128,24 +139,24 @@
..()
//Covered in glue
//cover a wooden block 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)
if(istype(I, /obj/item/carpentry/glue))
to_chat(user,"<span class='notice'> You begin to glue down one end of [src]...</span>")
if(do_after(user, 10) && isturf(loc))
new src.glueobj(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
..()
//cover a wooden peg in glue
/obj/item/processed/wood/peg/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/glue))
if(istype(I, /obj/item/carpentry/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)
if(do_after(user, 10) && isturf(loc))
new src.glueobj(loc)
to_chat(user, "<span class='notice'> You slap some glue onto [src].</span>")
qdel(src)
else
@@ -154,12 +165,12 @@
..()
//Seats
//bore a platform into a seat
/obj/item/processed/wood/platform/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/borer))
if(istype(I, /obj/item/carpentry/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)
if(do_after(user, 40) && isturf(loc))
new src.boreobj(loc)
to_chat(user, "<span class='notice'> You drill four holes into [src].</span>")
qdel(src)
else
@@ -171,7 +182,7 @@
/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))
if(do_after(user, 20) && isturf(loc))
new /obj/item/processed/wood/stool2(loc)
to_chat(user, "<span class='notice'> The nails are ready to be hammered.</span>")
qdel(src)
@@ -182,9 +193,9 @@
..()
/obj/item/processed/wood/stool2/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/hammer))
if(istype(I, /obj/item/carpentry/hammer))
to_chat(user,"<span class='notice'> You begin to hammer the [src]...</span>")
if(do_after(user, 30))
if(do_after(user, 30) && isturf(loc))
new /obj/item/processed/wood/stool3(loc)
to_chat(user, "<span class='notice'> The nails are hammered into place.</span>")
qdel(src)
@@ -194,9 +205,9 @@
..()
/obj/item/processed/wood/stool3/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/sandpaper))
if(istype(I, /obj/item/carpentry/sandpaper))
to_chat(user,"<span class='notice'> You begin to sand the [src]...</span>")
if(do_after(user, 30))
if(do_after(user, 30) && isturf(loc))
new /obj/item/processed/wood/stool4(loc)
to_chat(user, "<span class='notice'> You sand down the [src].</span>")
qdel(src)
@@ -208,7 +219,7 @@
/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))
if(do_after(user, 30) && isturf(loc))
new /obj/item/processed/wood/stool(loc)
to_chat(user, "<span class='notice'> You complete the [src].</span>")
qdel(src)
@@ -217,3 +228,29 @@
to_chat(user, "<span class='warning'>You need to hold still to refine [src]!</span>")
else
..()
/obj/item/processed/wood/stool/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/cushion))
to_chat(user,"<span class='notice'> You secure a cloth cushion to [src]...</span>")
if(do_after(user, 30) && isturf(loc))
new /obj/item/processed/wood/stoolcloth(loc)
to_chat(user, "<span class='notice'> You add a cushion to [src].</span>")
qdel(src)
qdel(I)
else
to_chat(user, "<span class='warning'>You need to hold still to detail [src]!</span>")
else
..()
/obj/item/processed/wood/stool/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/cushion/silk))
to_chat(user,"<span class='notice'> You secure a silk cushion to [src]...</span>")
if(do_after(user, 30) && isturf(loc))
new /obj/item/processed/wood/stoolsilk(loc)
to_chat(user, "<span class='notice'> You add a cushion to [src].</span>")
qdel(src)
qdel(I)
else
to_chat(user, "<span class='warning'>You need to hold still to detail [src]!</span>")
else
..()
@@ -5,12 +5,19 @@
desc = "You shouldn't see this!"
icon = 'hyperstation/icons/obj/cargo/sweatshop/wooden.dmi'
sharpness = FALSE
attack_verb = list("slapped", "thunked")
var/sawobj = /obj/item/condom
var/glueobj = /obj/item/dildo
var/sandobj = /obj/item/carpentry/sandpaper
var/boreobj = /obj/item/carpentry/borer
/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
force = 3
w_class = WEIGHT_CLASS_HUGE
sawobj = /obj/item/processed/wood/platform
/obj/item/processed/wood/platform
name = "wood platform"
@@ -18,7 +25,8 @@
icon_state = "platform"
force = 3
w_class = WEIGHT_CLASS_NORMAL
attack_verb = list("slapped", "thunked")
sawobj = /obj/item/processed/wood/block
boreobj = /obj/item/processed/wood/seat
/obj/item/processed/wood/block
name = "wood block"
@@ -26,7 +34,8 @@
icon_state = "block"
force = 2
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("slapped", "thunked")
sandobj = /obj/item/processed/wood/peg
glueobj = /obj/item/processed/wood/glueblock
/obj/item/processed/wood/peg
name = "wood peg"
@@ -35,6 +44,7 @@
force = 1
w_class = WEIGHT_CLASS_TINY
attack_verb = list("donked", "thunked")
glueobj = /obj/item/processed/wood/gluepeg
//glue
@@ -98,5 +108,21 @@
name = "custom stool"
desc = "An intricite, custom stool."
icon_state = "stool"
force = 4
force = 10
w_class = WEIGHT_CLASS_BULKY
//Let's make it soft and more expensive
/obj/item/processed/wood/stoolcloth
name = "cloth-cushioned stool"
desc = "A custom stool with a cloth cushion."
icon_state = "stoolcloth"
force = 10
w_class = WEIGHT_CLASS_BULKY
/obj/item/processed/wood/stoolsilk
name = "cloth-cushioned stool"
desc = "A custom stool with a silk cushion."
icon_state = "stoolsilk"
force = 11 //lol
w_class = WEIGHT_CLASS_BULKY
@@ -30,3 +30,17 @@
reqs = list(/obj/item/processed/wood/seat = 1, /obj/item/processed/wood/gluepeg = 4)
category = CAT_MISC
result = /obj/item/processed/wood/stool1
/datum/crafting_recipe/clothcushion
name = "Cloth Cushion"
reqs = list(/obj/item/stack/sheet/cloth = 2, /obj/item/stack/sheet/cotton = 5)
tools = list(TOOL_WIRECUTTER)
category = CAT_MISC
result = /obj/item/cushion
/datum/crafting_recipe/silkcushion
name = "Silk Cushion"
reqs = list(/obj/item/stack/sheet/silk = 2, /obj/item/stack/sheet/cotton = 5)
tools = list(TOOL_WIRECUTTER)
category = CAT_MISC
result = /obj/item/cushion/silk