mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-29 19:52:12 +00:00
* The future is hazy * Deconflict and linters * Update windowdoor.dm * Update airlock.dm * Update airlock.dm * What was even the point of visible? * Fixes * Update tgui.bundle.js * Update windoor_assembly.dm * Update airlock_painter.dm * Update tgui.bundle.js * Ain't no wizard * Update RCD.dm * Tweaks
36 lines
1.3 KiB
Plaintext
36 lines
1.3 KiB
Plaintext
/datum/painter/pipe/window // Yes, this is a pipe painter subtype.
|
|
module_name = "window painter"
|
|
module_state = "window_painter"
|
|
var/static/list/paintable_windows = list(
|
|
/obj/structure/window/reinforced,
|
|
/obj/structure/window/basic,
|
|
/obj/structure/window/full/reinforced,
|
|
/obj/structure/window/full/basic,
|
|
/obj/machinery/door/window)
|
|
var/static/list/polarized_windows = list(
|
|
/obj/structure/window/reinforced/polarized,
|
|
/obj/structure/window/full/reinforced/polarized,
|
|
/obj/machinery/door/window
|
|
)
|
|
|
|
/datum/painter/pipe/window/paint_atom(atom/target, mob/user)
|
|
if(!is_type_in_list(target, paintable_windows))
|
|
return
|
|
var/obj/structure/window/W = target
|
|
|
|
if(is_type_in_list(target, polarized_windows))
|
|
if((W.opacity && W.old_color == GLOB.pipe_colors[paint_setting]) || (!W.opacity && W.color == GLOB.pipe_colors[paint_setting]))
|
|
to_chat(user, "<span class='notice'>This window is aready painted [paint_setting]!</span>")
|
|
return
|
|
if(!W.opacity)
|
|
W.color = GLOB.pipe_colors[paint_setting]
|
|
W.old_color = GLOB.pipe_colors[paint_setting]
|
|
return TRUE
|
|
|
|
if(W.color == GLOB.pipe_colors[paint_setting])
|
|
to_chat(user, "<span class='notice'>This window is aready painted [paint_setting]!</span>")
|
|
return
|
|
|
|
W.color = GLOB.pipe_colors[paint_setting]
|
|
return TRUE
|