Files
Paradise/code/game/objects/effects/spawners/windowspawner.dm
T
tigercat2000 7d8c9a731a SS Conversion: Atoms, Machines, n' Mobs
This converts the machine and mob processes to the SMC. Additionally, it
adds the Atom subsystem, which handles all Initialize() calls in place
of the old gameticker. Due to incompatibility with our atmospherics
(FUCK OUR ATMOSPHERICS FOR FUCKING EVER JESUS CHRIST WHO THE FUCK MADE
THIS PIECE OF GODDAMN SHIT) atmospherics machines do not use
Initialize() as they should, instead opting for a custom atmos_init
proc that the air controller handles.
2018-04-28 17:55:15 -07:00

44 lines
1.2 KiB
Plaintext

/obj/effect/spawner/window
name = "window spawner"
icon = 'icons/obj/structures.dmi'
icon_state = "window_spawner"
var/useFull = 0
var/useGrille = 1
var/windowtospawn = /obj/structure/window/basic
anchored = 1 // No sliding out while you prime
/obj/effect/spawner/window/Initialize()
..()
spawn(0)
var/turf/T = get_turf(src)
for(var/obj/structure/grille/G in get_turf(src))
// Complain noisily
log_runtime(EXCEPTION("Extra grille on turf: ([T.x],[T.y],[T.z])"), src)
qdel(G) //just in case mappers don't know what they are doing
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))
src.air_update_turf(1) //atmos can pass otherwise
spawn(10)
qdel(src)
/obj/effect/spawner/window/reinforced
name = "reinforced window spawner"
icon_state = "rwindow_spawner"
windowtospawn = /obj/structure/window/reinforced