Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DYESTATION, also lowers the sewing level of dresses. NO CONFLICTS NOW #805

Merged
merged 7 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 148 additions & 0 deletions code/game/objects/structures/dystation.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
/obj/machinery/gear_painter
name = "Dye bin"
desc = "A station to give your apparel a fresh new color! Recommended to use with white items for best results."
icon = 'icons/roguetown/misc/structure.dmi'
icon_state = "dye_bin_full"
density = TRUE
anchored = TRUE
var/atom/movable/inserted
var/activecolor = "#FFFFFF"
/// Allow holder'd mobs
var/allow_mobs = TRUE
var/list/allowed_types = list(
/obj/item/clothing/suit/roguetown/shirt/robe,
/obj/item/clothing/suit/roguetown/shirt/dress,
/obj/item/clothing/suit/roguetown/shirt/undershirt,
/obj/item/clothing/suit/roguetown/shirt/shortshirt,
/obj/item/clothing/under/roguetown/tights,
/obj/item/clothing/cloak/raincloak,
/obj/item/clothing/cloak/cape,
/obj/item/clothing/cloak/half,
/obj/item/clothing/head/roguetown/roguehood,
/obj/item/clothing/head/roguetown/headband,
/obj/item/clothing/head/roguetown/armingcap,
/obj/item/clothing/head/roguetown/chaperon,
/obj/item/storage/belt/rogue/leather/rope,
/obj/item/storage/belt/rogue/leather/cloth,
/obj/item/clothing/shoes/roguetown/simpleshoes,
/obj/item/clothing/suit/roguetown/armor/gambeson,
/obj/item/clothing/suit/roguetown/armor/gambeson/light,
/obj/item/clothing/suit/roguetown/armor/gambeson/heavy
)
var/static/list/selectable_colors = list(
"White" = "#ffffff",
"Black" = "#414143",
"Light Grey" = "#999999",
"Mage Grey" = "#6c6c6c",
"Mage Red" = "#b8252c",
"Mage Blue" = "#4756d8",
"Mage Yellow" = "#c1b144",
"Mage Green" = "#759259",
"Chalk White" = "#f4ecde",
"Dunked in Water" = "#bbbbbb",
"Cream" = "#fffdd0",
"Orange" = "#bd6606",
"Gold" = "#f9a602",
"Yarrow" = "#f0cb76",
"Yellow Weld" = "#f4c430",
"Yellow Ochre" = "#cb9d06",
"Baby Puke" = "#b5b004",
"Olive" = "#98bf64",
"Green" = "#428138",
"Dark Green" = "#264d26",
"Teal" = "#249589",
"Periwinkle Blue" = "#8f99fb",
"Woad Blue" = "#597fb9",
"Royal Purple" = "#8747b1",
"Magenta" = "#962e5c",
"Orchil" = "#66023C",
"Red Ochre" = "#913831",
"Red" = "#a32121",
"Maroon" = "#550000",
"Peasant Brown" = "#685542",
"Dirt" = "#7c6d5c",
"Chestnut" = "#613613",
"Russet" = "#7f461b"
)
/obj/machinery/gear_painter/Destroy()
inserted.forceMove(drop_location())
return ..()

/obj/machinery/gear_painter/attackby(obj/item/I, mob/living/user)
if(allow_mobs && istype(I, /obj/item/clothing/head/mob_holder))
var/obj/item/clothing/head/mob_holder/H = I
if(!user.transferItemToLoc(I, src))
to_chat(user, "<span class='warning'>[I] is stuck to your hand!</span>")
return
if(!QDELETED(H))
H.release()

if(is_type_in_list(I, allowed_types) && is_operational())
if(!user.transferItemToLoc(I, src))
to_chat(user, "<span class='warning'>[I] is stuck to your hand!</span>")
return
user.visible_message("<span class='notice'>[user] inserts [I] into [src]'s receptable.</span>")

inserted = I
else
return ..()

/obj/machinery/gear_painter/AllowDrop()
return FALSE

/obj/machinery/gear_painter/ui_interact(mob/user)
if(!is_operational())
return
user.set_machine(src)
var/list/dat = list("<TITLE>Dye Station Control Panel</TITLE><BR>")
if(!inserted)
dat += "No item inserted."
else
dat += "Item inserted: [inserted]<HR>"
dat += "<A href='?src=\ref[src];select=1'>Select new color.</A><BR>"
dat += "Color: <font color='[activecolor]'>&#9899;</font>"
dat += "<A href='?src=\ref[src];paint=1'>Apply new dye.</A><BR><BR>"
dat += "<A href='?src=\ref[src];clear=1'>Bleach out the color.</A><BR><BR>"
dat += "<A href='?src=\ref[src];eject=1'>Remove item.</A><BR><BR>"

var/datum/browser/menu = new(user, "colormate","Dye Station", 400, 400, src)
menu.set_content(dat.Join(""))
menu.open()

/obj/machinery/gear_painter/Topic(href, href_list)
if((. = ..()))
return

add_fingerprint(usr)

if(href_list["close"])
usr << browse(null, "window=colormate")
return

if(href_list["select"])
var/choice = input(usr,"Choose your dye:","Dyes",null) as null|anything in selectable_colors
if(!choice)
return
activecolor = selectable_colors[choice]
updateUsrDialog()

if(href_list["paint"])
if(!inserted)
return
inserted.add_atom_colour(activecolor, FIXED_COLOUR_PRIORITY)
playsound(src, "bubbles", 50, 1)
updateUsrDialog()

if(href_list["clear"])
if(!inserted)
return
inserted.remove_atom_colour(FIXED_COLOUR_PRIORITY)
playsound(src, "bubbles", 50, 1)
updateUsrDialog()

if(href_list["eject"])
if(!inserted)
return
inserted.forceMove(drop_location())
inserted = null
updateUsrDialog()
6 changes: 3 additions & 3 deletions code/modules/roguetown/roguecrafting/sewing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -173,21 +173,21 @@
result = list(/obj/item/clothing/suit/roguetown/shirt/dress/gen/black)
reqs = list(/obj/item/natural/cloth = 3,
/obj/item/natural/fibers = 1)
craftdiff = 4
craftdiff = 2

/datum/crafting_recipe/roguetown/sewing/Bludress
name = "blue dress"
result = list(/obj/item/clothing/suit/roguetown/shirt/dress/gen/blue)
reqs = list(/obj/item/natural/cloth = 3,
/obj/item/natural/fibers = 1)
craftdiff = 4
craftdiff = 2

/datum/crafting_recipe/roguetown/sewing/Purdress
name = "purple dress"
result = list(/obj/item/clothing/suit/roguetown/shirt/dress/gen/purple)
reqs = list(/obj/item/natural/cloth = 3,
/obj/item/natural/fibers = 1)
craftdiff = 4
craftdiff = 2

/datum/crafting_recipe/roguetown/sewing/fancyhat
name = "fancy hat"
Expand Down
10 changes: 10 additions & 0 deletions code/modules/roguetown/roguecrafting/structure.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@
skillcraft = /datum/skill/craft/carpentry
craftdiff = 0

/datum/crafting_recipe/roguetown/structure/dye_bin
name = "dye bin"
result = /obj/machinery/gear_painter
reqs = list(/obj/item/grown/log/tree/small = 1)
verbage = "construct"
verbage_tp = "carpents"
craftsound = 'sound/foley/Building-01.ogg'
skillcraft = /datum/skill/craft/carpentry
craftdiff = 0

/datum/crafting_recipe/roguetown/structure/chair
name = "wooden chair"
result = /obj/item/chair/rogue/crafted
Expand Down
Binary file modified icons/roguetown/misc/structure.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions stonekeep.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,7 @@
#include "code\game\objects\structures\door_assembly.dm"
#include "code\game\objects\structures\door_assembly_types.dm"
#include "code\game\objects\structures\dresser.dm"
#include "code\game\objects\structures\dystation.dm"
#include "code\game\objects\structures\electricchair.dm"
#include "code\game\objects\structures\extinguisher.dm"
#include "code\game\objects\structures\false_walls.dm"
Expand Down
Loading