mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 22:47:59 +01:00
Clean up window coloring code a bit. Also makes windowspawners only create
windows where needed, not everywhere then deleting the ones it doesn't want.
This commit is contained in:
@@ -7,26 +7,28 @@
|
||||
var/windowtospawn = /obj/structure/window/basic
|
||||
|
||||
/obj/effect/spawner/window/New()
|
||||
for(var/obj/structure/grille/G in get_turf(src)) qdel(G) //just in case mappers don't know what they are doing
|
||||
spawn(0)
|
||||
for(var/obj/structure/grille/G in get_turf(src)) qdel(G) //just in case mappers don't know what they are doing
|
||||
|
||||
if(!useFull)
|
||||
for(var/cdir in cardinal)
|
||||
var/obj/structure/window/WI = new windowtospawn(get_turf(src))
|
||||
WI.dir = cdir
|
||||
for(var/obj/effect/spawner/window/WS in get_step(src,cdir))
|
||||
qdel(WI)
|
||||
break
|
||||
else
|
||||
var/obj/structure/window/W = new windowtospawn(get_turf(src))
|
||||
W.dir = SOUTHWEST
|
||||
if(!useFull)
|
||||
for(var/cdir in cardinal)
|
||||
for(var/obj/effect/spawner/window/WS in get_step(src,cdir))
|
||||
cdir = null
|
||||
break
|
||||
if(!cdir) continue
|
||||
var/obj/structure/window/WI = new windowtospawn(get_turf(src))
|
||||
WI.dir = cdir
|
||||
else
|
||||
var/obj/structure/window/W = new windowtospawn(get_turf(src))
|
||||
W.dir = SOUTHWEST
|
||||
|
||||
if(useGrille)
|
||||
new /obj/structure/grille(get_turf(src))
|
||||
if(useGrille)
|
||||
new /obj/structure/grille(get_turf(src))
|
||||
|
||||
src.air_update_turf(1) //atmos can pass otherwise
|
||||
src.air_update_turf(1) //atmos can pass otherwise
|
||||
|
||||
spawn(10)
|
||||
qdel(src)
|
||||
spawn(10)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/spawner/window/reinforced
|
||||
name = "reinforced window spawner"
|
||||
|
||||
Reference in New Issue
Block a user