mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-24 16:16:45 +01:00
refactors paint helpers and hopefully fixes them (?) (#7132)
This commit is contained in:
@@ -2,25 +2,36 @@
|
||||
icon = 'icons/mapping/spawners/windows.dmi'
|
||||
icon_state = "window_grille_pane"
|
||||
layer = WINDOW_LAYER
|
||||
late = TRUE
|
||||
|
||||
/// found dirs
|
||||
var/found_dirs = NONE
|
||||
|
||||
/// spawn full windows or panes on grille?
|
||||
var/full_window = FALSE
|
||||
/// spawn grille at all?
|
||||
var/spawn_grille = TRUE
|
||||
/// spawn low wall?
|
||||
var/spawn_low_wall = FALSE
|
||||
/// full window path
|
||||
var/window_full_path = /obj/structure/window/basic/full
|
||||
/// pane path
|
||||
var/window_pane_path = /obj/structure/window/basic
|
||||
|
||||
/// spawn grille at all?
|
||||
var/spawn_grille = TRUE
|
||||
|
||||
/// spawn low wall?
|
||||
/// * requires full window
|
||||
var/spawn_low_wall = FALSE
|
||||
/// low wall path
|
||||
var/low_wall_path = /obj/structure/wall_frame/prepainted
|
||||
/// found dirs
|
||||
var/found_dirs = NONE
|
||||
/// low-wall stripe color
|
||||
/// * if non-null, will override stripe color on the low-wall
|
||||
var/low_wall_stripe_color
|
||||
|
||||
/// spawn firedoors? fulltile and non-hidden only for now
|
||||
var/firelocks = FALSE
|
||||
/// spawn glass firedoors?
|
||||
var/firelocks_use_glass = FALSE
|
||||
|
||||
/// id tag for electrochromics
|
||||
/// todo: rename to electrochromatic_id
|
||||
var/id
|
||||
|
||||
/obj/spawner/window/Initialize(mapload)
|
||||
@@ -35,34 +46,43 @@
|
||||
found_dirs |= d
|
||||
|
||||
/obj/spawner/window/Spawn()
|
||||
// no more mercy, if you fuck up your spawner placement on purpose
|
||||
// this will just tear a hole in your map so you notice faster
|
||||
if(locate(/obj/structure/window) in loc)
|
||||
CRASH("Window spawner at [audit_loc()] on turf with existing window.")
|
||||
if(spawn_grille)
|
||||
if(locate(/obj/structure/grille) in loc)
|
||||
warning("Window spawner at X [x] Y [y] Z [z] is set to spawn a grille, but found one already in it's loc.")
|
||||
else
|
||||
new /obj/structure/grille(loc)
|
||||
CRASH("Window spawner at [audit_loc()] is set to spawn a grille, but found one already in it's loc.")
|
||||
new /obj/structure/grille(loc)
|
||||
if(full_window)
|
||||
var/new_window = new window_full_path(loc)
|
||||
if (spawn_low_wall)
|
||||
new low_wall_path(loc)
|
||||
if(locate(/obj/structure/wall_frame) in loc)
|
||||
CRASH("Window spawner at [audit_loc()] is set to spawn low wall but found one already in turf")
|
||||
var/obj/structure/wall_frame/low_wall = new low_wall_path(loc)
|
||||
if(isnull(low_wall_stripe_color))
|
||||
low_wall.stripe_color = low_wall_stripe_color
|
||||
|
||||
var/new_window = new window_full_path(loc)
|
||||
if(id && istype(new_window, /obj/structure/window/reinforced/polarized))
|
||||
var/obj/structure/window/reinforced/polarized/P = new_window
|
||||
P.id = id
|
||||
else
|
||||
// spawn in dirs not in found dirs
|
||||
var/obj/structure/window/W
|
||||
for(var/d in GLOB.cardinal)
|
||||
if(found_dirs & d)
|
||||
continue
|
||||
W = new window_pane_path(loc)
|
||||
W.setDir(d)
|
||||
new window_pane_path(loc, d)
|
||||
if(firelocks)
|
||||
if(locate(/obj/machinery/door/firedoor) in loc)
|
||||
warning("Window spawner at X [x] Y [y] Z [z] is set to spawn firelocks, but found one already in it's loc.")
|
||||
else
|
||||
new /obj/machinery/door/firedoor(loc)
|
||||
CRASH("Window spawner at X [audit_loc()] is set to spawn firelocks, but found one already in it's loc.")
|
||||
new /obj/machinery/door/firedoor(loc)
|
||||
|
||||
/obj/spawner/window/firelocks
|
||||
icon_state = "window_grille_pane_fire"
|
||||
firelocks = TRUE
|
||||
|
||||
/obj/spawner/window/firelocks/transparent
|
||||
firelocks_use_glass = TRUE
|
||||
|
||||
/obj/spawner/window/full
|
||||
full_window = TRUE
|
||||
@@ -72,6 +92,9 @@
|
||||
icon_state = "window_grille_full_fire"
|
||||
firelocks = TRUE
|
||||
|
||||
/obj/spawner/window/full/firelocks/transparent
|
||||
firelocks_use_glass = TRUE
|
||||
|
||||
/obj/spawner/window/reinforced
|
||||
icon_state = "rwindow_grille_pane"
|
||||
window_pane_path = /obj/structure/window/reinforced
|
||||
@@ -81,6 +104,9 @@
|
||||
icon_state = "rwindow_grille_pane_fire"
|
||||
firelocks = TRUE
|
||||
|
||||
/obj/spawner/window/reinforced/firelocks/transparent
|
||||
firelocks_use_glass = TRUE
|
||||
|
||||
/obj/spawner/window/reinforced/full
|
||||
icon_state = "rwindow_grille_full"
|
||||
full_window = TRUE
|
||||
@@ -89,6 +115,9 @@
|
||||
icon_state = "rwindow_grille_full_fire"
|
||||
firelocks = TRUE
|
||||
|
||||
/obj/spawner/window/reinforced/full/firelocks/transparent
|
||||
firelocks_use_glass = TRUE
|
||||
|
||||
/obj/spawner/window/reinforced/tinted
|
||||
icon_state = "rwindow_grille_pane"
|
||||
window_pane_path = /obj/structure/window/reinforced/tinted
|
||||
@@ -98,6 +127,9 @@
|
||||
icon_state = "rwindow_grille_pane_fire"
|
||||
firelocks = TRUE
|
||||
|
||||
/obj/spawner/window/reinforced/tinted/firelocks/transparent
|
||||
firelocks_use_glass = TRUE
|
||||
|
||||
/obj/spawner/window/reinforced/tinted/full
|
||||
icon_state = "rwindow_grille_full"
|
||||
full_window = TRUE
|
||||
@@ -106,6 +138,8 @@
|
||||
icon_state = "rwindow_grille_full_fire"
|
||||
firelocks = TRUE
|
||||
|
||||
/obj/spawner/window/reinforced/tinted/full/firelocks/transparent
|
||||
firelocks_use_glass = TRUE
|
||||
|
||||
/obj/spawner/window/borosillicate
|
||||
icon_state = "phoron_grille_pane"
|
||||
@@ -116,14 +150,19 @@
|
||||
icon_state = "phoron_grille_pane_fire"
|
||||
firelocks = TRUE
|
||||
|
||||
/obj/spawner/window/borosillicate/firelocks/transparent
|
||||
firelocks_use_glass = TRUE
|
||||
|
||||
/obj/spawner/window/borosillicate/full
|
||||
icon_state = "phoron_grille_full"
|
||||
full_window = TRUE
|
||||
|
||||
/obj/spawner/window/borosillicate/full/firelocks
|
||||
icon_state = "phoron_grille_full"
|
||||
firelocks = TRUE
|
||||
|
||||
/obj/spawner/window/borosillicate/full/firelocks/transparent
|
||||
firelocks_use_glass = TRUE
|
||||
|
||||
/obj/spawner/window/borosillicate/reinforced
|
||||
icon_state = "rphoron_grille_pane"
|
||||
window_pane_path = /obj/structure/window/phoronreinforced
|
||||
@@ -133,6 +172,9 @@
|
||||
icon_state = "rphoron_grille_pane_fire"
|
||||
firelocks = TRUE
|
||||
|
||||
/obj/spawner/window/borosillicate/reinforced/firelocks/transparent
|
||||
firelocks_use_glass = TRUE
|
||||
|
||||
/obj/spawner/window/borosillicate/reinforced/full
|
||||
icon_state = "rphoron_grille_full"
|
||||
full_window = TRUE
|
||||
@@ -141,77 +183,86 @@
|
||||
icon_state = "rphoron_grille_full_fire"
|
||||
firelocks = TRUE
|
||||
|
||||
/obj/spawner/window/borosillicate/reinforced/full/firelocks/transparent
|
||||
firelocks_use_glass = TRUE
|
||||
|
||||
/**
|
||||
* * Implicitly full windows
|
||||
*/
|
||||
/obj/spawner/window/low_wall
|
||||
spawn_low_wall = TRUE
|
||||
|
||||
/obj/spawner/window/low_wall/borosillicate/full
|
||||
icon_state = "phoron_grille_full"
|
||||
full_window = TRUE
|
||||
window_pane_path = /obj/structure/window/phoronbasic
|
||||
|
||||
/obj/spawner/window/low_wall/borosillicate
|
||||
icon_state = "phoron_grille_full"
|
||||
window_full_path = /obj/structure/window/phoronbasic/full
|
||||
|
||||
/obj/spawner/window/low_wall/borosillicate/full/firelocks
|
||||
icon_state = "phoron_grille_full"
|
||||
/obj/spawner/window/low_wall/borosillicate/firelocks
|
||||
firelocks = TRUE
|
||||
|
||||
/obj/spawner/window/low_wall/borosillicate/reinforced/full
|
||||
/obj/spawner/window/low_wall/borosillicate/firelocks/transparent
|
||||
firelocks_use_glass = TRUE
|
||||
|
||||
/obj/spawner/window/low_wall/borosillicate/reinforced
|
||||
icon_state = "rphoron_grille_full"
|
||||
full_window = TRUE
|
||||
window_pane_path = /obj/structure/window/phoronreinforced
|
||||
window_full_path = /obj/structure/window/phoronreinforced/full
|
||||
|
||||
/obj/spawner/window/low_wall/borosillicate/reinforced/full/firelocks
|
||||
/obj/spawner/window/low_wall/borosillicate/reinforced/firelocks
|
||||
icon_state = "rphoron_grille_full_fire"
|
||||
firelocks = TRUE
|
||||
|
||||
/obj/spawner/window/low_wall/reinforced/full
|
||||
/obj/spawner/window/low_wall/borosillicate/reinforced/firelocks/transparent
|
||||
firelocks_use_glass = TRUE
|
||||
|
||||
/obj/spawner/window/low_wall/reinforced
|
||||
icon_state = "rwindow_grille_full"
|
||||
full_window = TRUE
|
||||
window_pane_path = /obj/structure/window/reinforced
|
||||
window_full_path = /obj/structure/window/reinforced/full
|
||||
|
||||
/obj/spawner/window/low_wall/reinforced/full/firelocks
|
||||
/obj/spawner/window/low_wall/reinforced/firelocks
|
||||
icon_state = "rwindow_grille_full_fire"
|
||||
firelocks = TRUE
|
||||
|
||||
/obj/spawner/window/low_wall/reinforced/tinted/full
|
||||
/obj/spawner/window/low_wall/reinforced/firelocks/transparent
|
||||
firelocks_use_glass = TRUE
|
||||
|
||||
/obj/spawner/window/low_wall/reinforced/tinted
|
||||
icon_state = "rwindow_grille_full"
|
||||
full_window = TRUE
|
||||
window_pane_path = /obj/structure/window/reinforced/tinted
|
||||
window_full_path = /obj/structure/window/reinforced/tinted/full
|
||||
|
||||
/obj/spawner/window/low_wall/reinforced/tinted/full/firelocks
|
||||
/obj/spawner/window/low_wall/reinforced/tinted/firelocks
|
||||
icon_state = "rwindow_grille_full_fire"
|
||||
firelocks = TRUE
|
||||
|
||||
/obj/spawner/window/low_wall/reinforced/electrochromic/full
|
||||
/obj/spawner/window/low_wall/reinforced/tinted/firelocks/transparent
|
||||
firelocks_use_glass = TRUE
|
||||
|
||||
/obj/spawner/window/low_wall/reinforced/electrochromic
|
||||
icon_state = "rwindow_grille_full"
|
||||
full_window = TRUE
|
||||
window_pane_path = /obj/structure/window/reinforced/polarized
|
||||
window_full_path = /obj/structure/window/reinforced/polarized/full
|
||||
|
||||
/obj/spawner/window/low_wall/reinforced/electrochromic/full/firelocks
|
||||
/obj/spawner/window/low_wall/reinforced/electrochromic/firelocks
|
||||
icon_state = "rwindow_grille_full_fire"
|
||||
firelocks = TRUE
|
||||
|
||||
/obj/spawner/window/low_wall/full
|
||||
full_window = TRUE
|
||||
/obj/spawner/window/low_wall/reinforced/electrochromic/firelocks/transparent
|
||||
firelocks_use_glass = TRUE
|
||||
|
||||
/obj/spawner/window/low_wall
|
||||
icon_state = "window_grille_full"
|
||||
|
||||
/obj/spawner/window/low_wall/full/firelocks
|
||||
/obj/spawner/window/low_wall/firelocks
|
||||
icon_state = "window_grille_full_fire"
|
||||
firelocks = TRUE
|
||||
|
||||
/obj/spawner/window/low_wall/full/nogrille/firelocks
|
||||
full_window = TRUE
|
||||
/obj/spawner/window/low_wall/firelocks/transparent
|
||||
firelocks_use_glass = TRUE
|
||||
|
||||
/obj/spawner/window/low_wall/nogrille/firelocks
|
||||
icon_state = "window_grille_full"
|
||||
spawn_grille = FALSE
|
||||
firelocks = TRUE
|
||||
|
||||
/obj/spawner/window/low_wall/full/firelocks/nogrille
|
||||
icon_state = "window_grille_full"
|
||||
firelocks = TRUE
|
||||
spawn_grille = FALSE
|
||||
|
||||
|
||||
|
||||
/obj/spawner/window/low_wall/nogrille/firelocks/transparent
|
||||
firelocks_use_glass = TRUE
|
||||
|
||||
Reference in New Issue
Block a user