mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-01 21:21:59 +00:00
* Handlers converted, now to fix 3532 compile errors * 3532 compile fixes later, got runtimes on startup * Well the server loads now atleast * Take 2 * Oops
34 lines
1.0 KiB
Plaintext
34 lines
1.0 KiB
Plaintext
/obj/item/pipe_painter
|
|
name = "pipe painter"
|
|
icon = 'icons/obj/bureaucracy.dmi'
|
|
icon_state = "labeler1"
|
|
item_state = "flight"
|
|
var/list/modes
|
|
var/mode
|
|
|
|
/obj/item/pipe_painter/New()
|
|
..()
|
|
modes = new()
|
|
for(var/C in GLOB.pipe_colors)
|
|
modes += "[C]"
|
|
mode = pick(modes)
|
|
|
|
/obj/item/pipe_painter/afterattack(atom/A, mob/user as mob)
|
|
if(!istype(A,/obj/machinery/atmospherics/pipe) || 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
|
|
|
|
var/turf/T = P.loc
|
|
if(P.level < 2 && T.level==1 && isturf(T) && T.intact)
|
|
to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
|
|
return
|
|
|
|
P.change_color(GLOB.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)
|
|
. = ..()
|
|
. += "<span class='notice'>It is in [mode] mode.</span>"
|