mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-19 01:57:54 +01:00
* Part 1
* Testing 1
* Revert "Testing 1"
This reverts commit fc06554b28.
* Part 1.1
* Part 2 - UI Style List
* Preferences lists
* Preferences lists - DONE
* More inputs
* MOOOOOORE
* UI style else
* Last ones
* Double name fix
* Pre-selected Search
* Return Pick Darkness
* Return Pick Darkness
* Missing users
* Some review changes
* Revert MULE lists
* I just hate MERGE CONFLICT label
* List window tweaks
* I think there it is
* why i am stopid
* Update tgui.bundle.js
39 lines
1.2 KiB
Plaintext
39 lines
1.2 KiB
Plaintext
/datum/painter/pipe
|
|
module_name = "pipe painter"
|
|
module_state = "pipe_painter"
|
|
var/static/list/blacklisted_pipes = list(/obj/machinery/atmospherics/pipe/simple/heat_exchanging, /obj/machinery/atmospherics/pipe/simple/insulated)
|
|
var/static/list/modes = list()
|
|
|
|
/datum/painter/pipe/New()
|
|
..()
|
|
if(!length(modes))
|
|
for(var/C in GLOB.pipe_colors)
|
|
modes += "[C]"
|
|
paint_setting = pick(modes)
|
|
|
|
/datum/painter/pipe/pick_color(mob/user)
|
|
var/new_paint_setting = tgui_input_list(user, "Which color do you want to use?", "Pick color", modes)
|
|
if(!new_paint_setting)
|
|
return
|
|
paint_setting = new_paint_setting
|
|
|
|
/datum/painter/pipe/paint_atom(atom/target, mob/user)
|
|
if(!istype(target, /obj/machinery/atmospherics/pipe))
|
|
return
|
|
var/obj/machinery/atmospherics/pipe/P = target
|
|
|
|
if(is_type_in_list(P, blacklisted_pipes))
|
|
return
|
|
|
|
if(P.pipe_color == GLOB.pipe_colors[paint_setting])
|
|
to_chat(user, "<span class='notice'>This pipe is aready painted [paint_setting]!</span>")
|
|
return
|
|
|
|
var/turf/T = get_turf(P)
|
|
if(P.level < 2 && T.level == 1 && T.intact && !T.transparent_floor)
|
|
to_chat(user, "<span class='warning'>You must remove the flooring first.</span>")
|
|
return
|
|
|
|
P.change_color(GLOB.pipe_colors[paint_setting])
|
|
return TRUE
|