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 1397bb26ab2..c75a4b85efb 100644 Binary files a/icons/obj/artstuff.dmi and b/icons/obj/artstuff.dmi differ