mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-02-05 22:09:05 +00:00
removes materials list from items, uses custom_materials instead. This might introduce some bugs so we should testmerge this for a while (and Ill test stuff locally as much as I can) this also adds material crafting to sheets. Test case being chairs. In the future we can add stuff like tables, walls, doors etc. also applies materials to everything, with fixes, which can close #46299
31 lines
1.0 KiB
Plaintext
31 lines
1.0 KiB
Plaintext
/obj/item/pipe_painter
|
|
name = "pipe painter"
|
|
icon = 'icons/obj/bureaucracy.dmi'
|
|
icon_state = "labeler1"
|
|
item_state = "flight"
|
|
item_flags = NOBLUDGEON
|
|
var/paint_color = "grey"
|
|
|
|
custom_materials = list(/datum/material/iron=5000, /datum/material/glass=2000)
|
|
|
|
/obj/item/pipe_painter/afterattack(atom/A, mob/user, proximity_flag)
|
|
. = ..()
|
|
//Make sure we only paint adjacent items
|
|
if(!proximity_flag)
|
|
return
|
|
|
|
if(!istype(A, /obj/machinery/atmospherics/pipe))
|
|
return
|
|
|
|
var/obj/machinery/atmospherics/pipe/P = A
|
|
if(P.paint(GLOB.pipe_paint_colors[paint_color]))
|
|
playsound(src, 'sound/machines/click.ogg', 50, TRUE)
|
|
user.visible_message("<span class='notice'>[user] paints \the [P] [paint_color].</span>","<span class='notice'>You paint \the [P] [paint_color].</span>")
|
|
|
|
/obj/item/pipe_painter/attack_self(mob/user)
|
|
paint_color = input("Which colour do you want to use?","Pipe painter") in GLOB.pipe_paint_colors
|
|
|
|
/obj/item/pipe_painter/examine(mob/user)
|
|
. = ..()
|
|
. += "<span class='notice'>It is set to [paint_color].</span>"
|