mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-19 10:59:39 +01:00
Extends and reworks how various extended information text (desc_info, desc_build, desc_upgrades) are handled to make object interactions and mechanics A.) much more clearly documented in-game and B.) much easier to support from the back-end. Almost certainly a candidate for test merge. Assembly/Disassembly instructions are noticeably sporadic, largely due to our current lack of a unified framework. That's a future thing I'd like to attack so that it can be handled programmatically, but for now I only targeted the biggest culprits as I came across them. --------- Signed-off-by: Batrachophreno <Batrochophreno@gmail.com>
36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
/obj/item/device/pipe_painter
|
|
name = "pipe painter"
|
|
icon = 'icons/obj/item/device/pipe_painter.dmi'
|
|
icon_state = "pipe_painter"
|
|
item_state = "pipe_painter"
|
|
var/list/modes
|
|
var/mode
|
|
|
|
/obj/item/device/pipe_painter/feedback_hints(mob/user, distance, is_adjacent)
|
|
. += ..()
|
|
. += "It is in [mode] mode."
|
|
|
|
/obj/item/device/pipe_painter/New()
|
|
..()
|
|
modes = new()
|
|
for(var/C in GLOB.pipe_colors)
|
|
modes += "[C]"
|
|
mode = pick(modes)
|
|
|
|
/obj/item/device/pipe_painter/afterattack(var/atom/A, var/mob/user, proximity)
|
|
if(!proximity)
|
|
return
|
|
if(!in_range(user, A))
|
|
return
|
|
else if(is_type_in_list(A, list(/obj/machinery/atmospherics/pipe/tank, /obj/machinery/atmospherics/pipe/simple/heat_exchanging)))
|
|
return
|
|
else if(istype(A,/obj/machinery/atmospherics/pipe))
|
|
var/obj/machinery/atmospherics/pipe/P = A
|
|
P.change_color(GLOB.pipe_colors[mode])
|
|
else if(istype(A, /obj/item/pipe) && pipe_color_check(GLOB.pipe_colors[mode]))
|
|
var/obj/item/pipe/P = A
|
|
P.color = GLOB.pipe_colors[mode]
|
|
|
|
/obj/item/device/pipe_painter/attack_self(var/mob/user)
|
|
mode = tgui_input_list(user, "Which colour do you want to use?", "Pipe Painter", modes, mode)
|