mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-02-04 21:30:14 +00:00
- Complete rewrite of pipe rendering code. It now selects icons from a shared cache. - Manifolds and other devices (pumps, filters, etc.) now match the color of the connected pipes. - Updated omni devices to use the shared cache. - Set separate pipe color definitions. - Cleaned up a lot of pipe code, converting it to absolute paths and removing old commented out code. - Tweaked t-ray rendering code. - Tweaked pipe painter. - Enhanced pipe checking debug command. - Expanded tank capacity and resprited them.
33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
/obj/item/device/pipe_painter
|
|
name = "pipe painter"
|
|
icon = 'icons/obj/bureaucracy.dmi'
|
|
icon_state = "labeler1"
|
|
item_state = "flight"
|
|
var/list/modes
|
|
var/mode
|
|
|
|
/obj/item/device/pipe_painter/New()
|
|
..()
|
|
modes = new()
|
|
for(var/C in pipe_colors)
|
|
modes += "[C]"
|
|
mode = pick(modes)
|
|
|
|
/obj/item/device/pipe_painter/afterattack(atom/A, mob/user as mob)
|
|
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
|
|
|
|
var/turf/T = P.loc
|
|
if (P.level < 2 && T.level==1 && isturf(T) && T.intact)
|
|
user << "\red You must remove the plating first."
|
|
return
|
|
|
|
P.change_color(pipe_colors[mode])
|
|
|
|
/obj/item/device/pipe_painter/attack_self(mob/user as mob)
|
|
mode = input("Which colour do you want to use?", "Pipe painter", mode) in modes
|
|
|
|
/obj/item/device/pipe_painter/examine()
|
|
..()
|
|
usr << "It is in [mode] mode." |