mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 02:16:05 +00:00
* Adding spawner * File itself * Window schematics * Construct window framework * Adding to schematics and deconstructioN * Adding to mech and borg schematics, placeholder icon * Fixing compile errors * Unneeded var * Hopefully better logic * Copypasting fix * Another compile fix * This should make selecting them actually work * No deconstructing plasma glass * Better checks, can_r_wall usage * Less brackets * Overlay implementation testing * More of it * Remove for now so it can compile, come up with better idea later * Workable solution * Now actually works right * Custom dirs Co-authored-by: kanef <kanef9x@protonmail.com>
115 lines
3.0 KiB
Plaintext
115 lines
3.0 KiB
Plaintext
/obj/effect/spawner/window
|
|
name = "window spawner"
|
|
var/full = FALSE
|
|
var/list/dirs = list(NORTH,WEST,SOUTH,EAST)
|
|
|
|
/obj/effect/spawner/window/New()
|
|
..()
|
|
spawn_window()
|
|
|
|
/obj/effect/spawner/window/proc/spawn_window()
|
|
var/turf/T = get_turf(src)
|
|
if(T && !istype(T,/turf/simulated/wall) && !istype(T,/turf/unsimulated/wall))
|
|
if(!locate(/obj/structure/grille) in loc)
|
|
new /obj/structure/grille(T)
|
|
for(var/direction in dirs)
|
|
var/windowhere = FALSE
|
|
for(var/obj/structure/window/reinforced/R in loc)
|
|
if(R.dir == direction)
|
|
windowhere = TRUE
|
|
if(windowhere)
|
|
continue
|
|
var/obj/structure/window/reinforced/new_window = new /obj/structure/window/reinforced(loc)
|
|
new_window.dir = direction
|
|
new_window.update_nearby_tiles()
|
|
if(full && !locate(/obj/structure/window/full/reinforced) in loc)
|
|
var/obj/structure/window/reinforced/new_fullwindow = new /obj/structure/window/full/reinforced(loc)
|
|
new_fullwindow.update_nearby_tiles()
|
|
qdel(src)
|
|
|
|
/obj/effect/spawner/window/northend
|
|
dirs = list(NORTH)
|
|
|
|
/obj/effect/spawner/window/westend
|
|
dirs = list(WEST)
|
|
|
|
/obj/effect/spawner/window/southend
|
|
dirs = list(SOUTH)
|
|
|
|
/obj/effect/spawner/window/eastend
|
|
dirs = list(EAST)
|
|
|
|
/obj/effect/spawner/window/horizontal
|
|
dirs = list(NORTH,SOUTH)
|
|
|
|
/obj/effect/spawner/window/vertical
|
|
dirs = list(WEST,EAST)
|
|
|
|
/obj/effect/spawner/window/nwcorner
|
|
dirs = list(NORTH,WEST)
|
|
|
|
/obj/effect/spawner/window/swcorner
|
|
dirs = list(SOUTH,WEST)
|
|
|
|
/obj/effect/spawner/window/secorner
|
|
dirs = list(SOUTH,EAST)
|
|
|
|
/obj/effect/spawner/window/necorner
|
|
dirs = list(NORTH,EAST)
|
|
|
|
/obj/effect/spawner/window/northcap
|
|
dirs = list(NORTH,EAST,WEST)
|
|
|
|
/obj/effect/spawner/window/westcap
|
|
dirs = list(WEST,NORTH,SOUTH)
|
|
|
|
/obj/effect/spawner/window/southcap
|
|
dirs = list(SOUTH,EAST,WEST)
|
|
|
|
/obj/effect/spawner/window/eastcap
|
|
dirs = list(EAST,NORTH,SOUTH)
|
|
|
|
/obj/effect/spawner/window/full
|
|
full = TRUE
|
|
|
|
/obj/effect/spawner/window/full/northend
|
|
dirs = list(NORTH)
|
|
|
|
/obj/effect/spawner/window/full/westend
|
|
dirs = list(WEST)
|
|
|
|
/obj/effect/spawner/window/full/southend
|
|
dirs = list(SOUTH)
|
|
|
|
/obj/effect/spawner/window/full/eastend
|
|
dirs = list(EAST)
|
|
|
|
/obj/effect/spawner/window/full/horizontal
|
|
dirs = list(NORTH,SOUTH)
|
|
|
|
/obj/effect/spawner/window/full/vertical
|
|
dirs = list(WEST,EAST)
|
|
|
|
/obj/effect/spawner/window/full/nwcorner
|
|
dirs = list(NORTH,WEST)
|
|
|
|
/obj/effect/spawner/window/full/swcorner
|
|
dirs = list(SOUTH,WEST)
|
|
|
|
/obj/effect/spawner/window/full/secorner
|
|
dirs = list(SOUTH,EAST)
|
|
|
|
/obj/effect/spawner/window/full/necorner
|
|
dirs = list(NORTH,EAST)
|
|
|
|
/obj/effect/spawner/window/full/northcap
|
|
dirs = list(NORTH,EAST,WEST)
|
|
|
|
/obj/effect/spawner/window/full/westcap
|
|
dirs = list(WEST,NORTH,SOUTH)
|
|
|
|
/obj/effect/spawner/window/full/southcap
|
|
dirs = list(SOUTH,EAST,WEST)
|
|
|
|
/obj/effect/spawner/window/full/eastcap
|
|
dirs = list(EAST,NORTH,SOUTH) |