From 76cab90ae7f84f3c6989f1df930250972bf5bc31 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Mon, 5 Jul 2021 12:00:22 -0400 Subject: [PATCH] Add paintbrush, palette, painting supplies crate --- code/datums/supplypacks/hospitality.dm | 17 ++++++ code/game/objects/structures/artstuff.dm | 69 ++++++++++++++++++++++- icons/obj/artstuff.dmi | Bin 1030 -> 2662 bytes 3 files changed, 85 insertions(+), 1 deletion(-) diff --git a/code/datums/supplypacks/hospitality.dm b/code/datums/supplypacks/hospitality.dm index 1ca6aee6209..bcf472a0b91 100644 --- a/code/datums/supplypacks/hospitality.dm +++ b/code/datums/supplypacks/hospitality.dm @@ -79,6 +79,23 @@ containertype = /obj/structure/closet/crate/allico containername = "crate of gifts" +/datum/supply_pack/hospitality/painting + name = "Painting equipment" + contains = list( + /obj/item/paint_brush = 2, + /obj/item/paint_palette = 2, + /obj/item/weapon/reagent_containers/glass/rag = 2, + /obj/structure/easel = 1, // How does that even fit + /obj/item/canvas = 1, + /obj/item/canvas/nineteen_nineteen = 1, + /obj/item/canvas/twentyfour_twentyfour = 1, + /obj/item/canvas/twentythree_nineteen = 1, + /obj/item/canvas/twentythree_twentythree = 1 + ) + cost = 20 + containertype = /obj/structure/closet/crate/centauri + containername = "Painting equipment" + /datum/supply_pack/randomised/hospitality/ group = "Hospitality" diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm index 5873d395fcf..5324e215766 100644 --- a/code/game/objects/structures/artstuff.dm +++ b/code/game/objects/structures/artstuff.dm @@ -101,6 +101,18 @@ ui.open() /obj/item/canvas/attackby(obj/item/I, mob/living/user, params) + if(istype(I, /obj/item/paint_palette)) + var/choice = tgui_alert(user, "Adjusting the base color of this canvas will replace ALL pixels with the selected color. Are you sure?", "Confirm Color Fill", list("Yes", "No")) + if(choice == "No") + return + var/basecolor = input(user, "Select a base color for the canvas:", "Base Color", canvas_color) as null|color + if(basecolor && Adjacent(user, src) && Adjacent(user, I)) + canvas_color = basecolor + reset_grid() + user.visible_message("[user] smears paint on [src], covering the entire thing in paint.", "You smear paint on [src], changing the color of the entire thing.", runemessage = "smears paint") + update_appearance() + return + if(user.a_intent == I_HELP) tgui_interact(user) else @@ -183,7 +195,10 @@ /obj/item/canvas/proc/get_paint_tool_color(obj/item/I) if(!I) return - if(istype(I, /obj/item/weapon/pen/crayon)) + if(istype(I, /obj/item/paint_brush)) + var/obj/item/paint_brush/P = I + return P.selected_color + else if(istype(I, /obj/item/weapon/pen/crayon)) var/obj/item/weapon/pen/crayon/crayon = I return crayon.colour else if(istype(I, /obj/item/weapon/pen)) @@ -245,6 +260,58 @@ frame_offset_x = -2 frame_offset_y = -2 +/obj/item/paint_brush + name = "artist's paintbrush" + desc = "When you really want to put together a masterpiece!" + description_info = "Hit this on a palette to set the color, and use it on a canvas to paint with that color." + icon = 'icons/obj/artstuff.dmi' + icon_state = "brush" + var/selected_color = "#000000" + var/image/color_drop + var/hud_level = FALSE + +/obj/item/paint_brush/Initialize() + . = ..() + color_drop = image(icon, null, "brush_color") + color_drop.color = selected_color + +// When picked up +/obj/item/paint_brush/hud_layerise() + . = ..() + hud_level = TRUE + update_paint() + +// When put down +/obj/item/paint_brush/reset_plane_and_layer() + . = ..() + hud_level = FALSE + update_paint() + +/obj/item/paint_brush/proc/update_paint(var/new_color) + if(new_color) + selected_color = new_color + color_drop.color = new_color + + cut_overlays() + if(hud_level) + add_overlay(color_drop) + +/obj/item/paint_palette + name = "artist's palette" + desc = "Helps to have a paintbrush, too." + description_info = "You can hit this on a canvas to set the entire canvas color (but note that it will wipe out any works in progress). You can hit a paintbrush on this to set the color." + icon = 'icons/obj/artstuff.dmi' + icon_state = "palette" + +/obj/item/paint_palette/attackby(obj/item/weapon/W, mob/user) + if(istype(W, /obj/item/paint_brush)) + var/obj/item/paint_brush/P = W + var/newcolor = input(user, "Select a new paint color:", "Paint Palette", P.selected_color) as null|color + if(newcolor && Adjacent(user, P) && Adjacent(user, src)) + P.update_paint(newcolor) + else + return ..() + /obj/item/frame/painting name = "painting frame" desc = "The perfect showcase for your favorite deathtrap memories." diff --git a/icons/obj/artstuff.dmi b/icons/obj/artstuff.dmi index 1397bb26ab25f3144d8984412da42beef493f353..c75a4b85efb446bbdc416f0963b2ad9aadd86f4f 100644 GIT binary patch literal 2662 zcmZuzc{J3E7yr(f$ZkX_WUN_-l#&Kxj2dDPk%$<}^M2OC7&XmgX~r_LFB!7SvoEhl z*`-NBmXgLWg-W&z*(N-{_ue_b-#NeEANPLFx#ynGx#ymHKljGkU@r;_91{QlK-e6E zzPyk5`$j&%UZEfYf(ZjykF)~rvTK*#0g@v~EA#q2OFF2kWPfKJOwiFeWGjZ7&-v=|^tm%zj z?`!A%@Tu}mt$i5)@VlC$P3*(zi@DZRB}Z9Cd&#t#!Wnm^_#s8uLF6n|yM)t_YiCdARPzvU0+qpjV^3X;F9j0{;!%}9|2s{c^g->|au z*;@!;?GP`u4#4pn8&x--Ve&i$PO$gmKQD9paLcn=^B&^5@i7*)DGOn1L+^FvS9Klv z9S|F9cAM*tZCUX4jm{I{o12Y|*yOkFaL^Q&eF*62W|TE|mH$```q&k7ZFqHaGYe$;_WO3r?$Rv|Bk?(0X~c+ynF=4P7DizHMnpI#xAk74 z=7kOWCWl5_;tI)xGPXAO0X50j(h6BBRsOIXj6Khbn3t++%S$p35=Wu4)!FqIPluzU zUn~3p@#*_gtaz;9-TXzgK2)CYdO|q071E&EVxKDEUP?}dcPbSNc?;;5hb#pIycjgx z867<&8LkV??m>h49wH^S42Lt}^~C0Ntx35gOxF$>Eg^tG7yJ*baCux?!s~{MlqnPn zg1_rV*54^m?M^36rt>!bd4XFvQ~f@m$?Z95f$UosqZs)G)<+i@JHvn6rfx|o=O>Ey zuOp({jMpn`_y)>8D{$WCwkUO81>H-&1H71tFB~$sPS;;^=Q~W^Lf_!La!(@%XB~VS zpy+sC^_aiUZP%x??Phe_?BnxO94ZHFb_oT{;!0f#*%|#Hw z$jcvUGzfiNf+=mA0jtAf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