Files
Spookerton 978f4511a5 examine signature changed to include distance
- distance is INFINITE, 0, or a positive integer based on get_dist() between
the examiner and examinee's turfs when they are on the same Z. When the
examiner is dead or a ghost, distance is always 0.
- also updates /examine( implementations to use it!
- adds w_class_to_name proc for reusing "It is a X item." examine behavior.
2024-01-31 13:49:52 +00:00

32 lines
1.1 KiB
Plaintext

/obj/item/pipe_painter
name = "pipe painter"
desc = "Used to apply a even coat of paint to pipes. Atmospheric usage reccomended."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "labeler1"
var/list/modes
var/mode
/obj/item/pipe_painter/Initialize()
. = ..()
modes = new()
for(var/C in pipe_colors)
modes += "[C]"
mode = pick(modes)
/obj/item/pipe_painter/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity)
return
if(!istype(A,/obj/machinery/atmospherics/pipe) || istype(A,/obj/machinery/atmospherics/pipe/tank) || istype(A,/obj/machinery/atmospherics/pipe/vent) || istype(A,/obj/machinery/atmospherics/pipe/simple/heat_exchanging) || istype(A,/obj/machinery/atmospherics/pipe/simple/insulated) || !in_range(user, A))
return
var/obj/machinery/atmospherics/pipe/P = A
P.change_color(pipe_colors[mode])
/obj/item/pipe_painter/attack_self(mob/user as mob)
mode = input("Which colour do you want to use?", "Pipe painter", mode) in modes
/obj/item/pipe_painter/examine(mob/user, distance, infix, suffix)
. = ..()
. += "It is in [mode] mode."