mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-25 08:34:23 +00:00
 ## About The Pull Request Made pipe painter properly paint pipe colors, work on pipe items, and added the same functionality to regular spraycans. Spraycans now have the color presets in UI for easier selection of the valid pipe colors. ## Why It's Good For The Game Bug fixing is good. It was weird that spraycans couldn't paint pipes, but some other device could. Also custom spraycan color is too clunky, presets are nice for quick spraycan color selection. ## Changelog 🆑 fix: fixed pipe painter not applying pipe color properly qol: made spraycans work also as pipe painters qol: spraycans now have basic color presets for quick selection /🆑
37 lines
1.4 KiB
Plaintext
37 lines
1.4 KiB
Plaintext
/obj/item/pipe_painter
|
|
name = "pipe painter"
|
|
desc = "Used for coloring pipes, unsurprisingly."
|
|
icon = 'icons/obj/service/bureaucracy.dmi'
|
|
icon_state = "labeler1"
|
|
inhand_icon_state = null
|
|
item_flags = NOBLUDGEON
|
|
var/paint_color = "grey"
|
|
|
|
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.5, /datum/material/glass = SHEET_MATERIAL_AMOUNT)
|
|
|
|
/obj/item/pipe_painter/afterattack(atom/target, mob/user, proximity_flag)
|
|
. = ..()
|
|
//Make sure we only paint adjacent items
|
|
if(!proximity_flag)
|
|
return
|
|
|
|
if(istype(target, /obj/machinery/atmospherics))
|
|
var/obj/machinery/atmospherics/target_pipe = target
|
|
target_pipe.paint(GLOB.pipe_paint_colors[paint_color])
|
|
playsound(src, 'sound/machines/click.ogg', 50, TRUE)
|
|
balloon_alert(user, "painted in [paint_color] color")
|
|
else if(istype(target, /obj/item/pipe))
|
|
var/obj/item/pipe/target_pipe = target
|
|
var/color = GLOB.pipe_paint_colors[paint_color]
|
|
target_pipe.pipe_color = color
|
|
target.add_atom_colour(color, FIXED_COLOUR_PRIORITY)
|
|
playsound(src, 'sound/machines/click.ogg', 50, TRUE)
|
|
balloon_alert(user, "painted in [paint_color] color")
|
|
|
|
/obj/item/pipe_painter/attack_self(mob/user)
|
|
paint_color = tgui_input_list(user, "Which colour do you want to use?", "Pipe painter", GLOB.pipe_paint_colors)
|
|
|
|
/obj/item/pipe_painter/examine(mob/user)
|
|
. = ..()
|
|
. += span_notice("It is set to [paint_color].")
|