Files
Bubberstation/code/game/objects/effects/spawners/structure.dm
2017-09-16 17:34:01 -04:00

280 lines
13 KiB
Plaintext

/*
Because mapping is already tedious enough this spawner let you spawn generic
"sets" of objects rather than having to make the same object stack again and
again.
*/
/obj/effect/spawner/structure
name = "map structure spawner"
var/list/spawn_list
/obj/effect/spawner/structure/Initialize()
. = ..()
if(spawn_list && spawn_list.len)
for(var/I in spawn_list)
new I(get_turf(src))
qdel(src)
//normal windows
/obj/effect/spawner/structure/window
icon = 'icons/obj/structures_spawners.dmi'
icon_state = "window_spawner"
name = "window spawner"
spawn_list = list(/obj/structure/grille, /obj/structure/window/fulltile)
dir = SOUTH
/obj/effect/spawner/structure/window/hollow
name = "hollow window spawner"
icon_state = "hwindow_spawner_full"
spawn_list = list(/obj/structure/grille, /obj/structure/window, /obj/structure/window/spawner/north, /obj/structure/window/spawner/east, /obj/structure/window/spawner/west)
/obj/effect/spawner/structure/window/hollow/end
icon_state = "hwindow_spawner_end"
/obj/effect/spawner/structure/window/hollow/end/Initialize()
switch(dir)
if(NORTH)
spawn_list = list(/obj/structure/grille, /obj/structure/window/spawner/north, /obj/structure/window/spawner/east, /obj/structure/window/spawner/west)
if(EAST)
spawn_list = list(/obj/structure/grille, /obj/structure/window, /obj/structure/window/spawner/north, /obj/structure/window/spawner/east)
if(SOUTH)
spawn_list = list(/obj/structure/grille, /obj/structure/window, /obj/structure/window/spawner/east, /obj/structure/window/spawner/west)
if(WEST)
spawn_list = list(/obj/structure/grille, /obj/structure/window, /obj/structure/window/spawner/north, /obj/structure/window/spawner/west)
. = ..()
/obj/effect/spawner/structure/window/hollow/middle
icon_state = "hwindow_spawner_middle"
/obj/effect/spawner/structure/window/hollow/middle/Initialize()
switch(dir)
if(NORTH,SOUTH)
spawn_list = list(/obj/structure/grille, /obj/structure/window, /obj/structure/window/spawner/north)
if(EAST,WEST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/spawner/east, /obj/structure/window/spawner/west)
. = ..()
/obj/effect/spawner/structure/window/hollow/directional
icon_state = "hwindow_spawner_directional"
/obj/effect/spawner/structure/window/hollow/directional/Initialize()
switch(dir)
if(NORTH)
spawn_list = list(/obj/structure/grille, /obj/structure/window/spawner/north)
if(NORTHEAST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/spawner/north, /obj/structure/window/spawner/east)
if(EAST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/spawner/east)
if(SOUTHEAST)
spawn_list = list(/obj/structure/grille, /obj/structure/window, /obj/structure/window/spawner/east)
if(SOUTH)
spawn_list = list(/obj/structure/grille, /obj/structure/window)
if(SOUTHWEST)
spawn_list = list(/obj/structure/grille, /obj/structure/window, /obj/structure/window/spawner/west)
if(WEST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/spawner/west)
if(NORTHWEST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/spawner/north, /obj/structure/window/spawner/west)
. = ..()
//reinforced
/obj/effect/spawner/structure/window/reinforced
name = "reinforced window spawner"
icon_state = "rwindow_spawner"
spawn_list = list(/obj/structure/grille, /obj/structure/window/reinforced/fulltile)
/obj/effect/spawner/structure/window/hollow/reinforced
name = "hollow reinforced window spawner"
icon_state = "hrwindow_spawner_full"
spawn_list = list(/obj/structure/grille, /obj/structure/window/reinforced, /obj/structure/window/reinforced/spawner/north, /obj/structure/window/reinforced/spawner/east, /obj/structure/window/reinforced/spawner/west)
/obj/effect/spawner/structure/window/hollow/reinforced/end
icon_state = "hrwindow_spawner_end"
/obj/effect/spawner/structure/window/hollow/reinforced/end/Initialize()
switch(dir)
if(NORTH)
spawn_list = list(/obj/structure/grille, /obj/structure/window/reinforced/spawner/north, /obj/structure/window/reinforced/spawner/east, /obj/structure/window/reinforced/spawner/west)
if(EAST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/reinforced, /obj/structure/window/reinforced/spawner/north, /obj/structure/window/reinforced/spawner/east)
if(SOUTH)
spawn_list = list(/obj/structure/grille, /obj/structure/window/reinforced, /obj/structure/window/reinforced/spawner/east, /obj/structure/window/reinforced/spawner/west)
if(WEST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/reinforced, /obj/structure/window/reinforced/spawner/north, /obj/structure/window/reinforced/spawner/west)
. = ..()
/obj/effect/spawner/structure/window/hollow/reinforced/middle
icon_state = "hrwindow_spawner_middle"
/obj/effect/spawner/structure/window/hollow/reinforced/middle/Initialize()
switch(dir)
if(NORTH,SOUTH)
spawn_list = list(/obj/structure/grille, /obj/structure/window/reinforced, /obj/structure/window/reinforced/spawner/north)
if(EAST,WEST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/reinforced/spawner/east, /obj/structure/window/reinforced/spawner/west)
. = ..()
/obj/effect/spawner/structure/window/hollow/reinforced/directional
icon_state = "hrwindow_spawner_directional"
/obj/effect/spawner/structure/window/hollow/reinforced/directional/Initialize()
switch(dir)
if(NORTH)
spawn_list = list(/obj/structure/grille, /obj/structure/window/reinforced/spawner/north)
if(NORTHEAST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/reinforced/spawner/north, /obj/structure/window/reinforced/spawner/east)
if(EAST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/reinforced/spawner/east)
if(SOUTHEAST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/reinforced, /obj/structure/window/reinforced/spawner/east)
if(SOUTH)
spawn_list = list(/obj/structure/grille, /obj/structure/window/reinforced)
if(SOUTHWEST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/reinforced, /obj/structure/window/reinforced/spawner/west)
if(WEST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/reinforced/spawner/west)
if(NORTHWEST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/reinforced/spawner/north, /obj/structure/window/reinforced/spawner/west)
. = ..()
//tinted
/obj/effect/spawner/structure/window/reinforced/tinted
name = "tinted reinforced window spawner"
icon_state = "twindow_spawner"
spawn_list = list(/obj/structure/grille, /obj/structure/window/reinforced/tinted/fulltile)
//shuttle window
/obj/effect/spawner/structure/window/shuttle
name = "reinforced tinted window spawner"
icon_state = "swindow_spawner"
spawn_list = list(/obj/structure/grille, /obj/structure/window/shuttle)
//plasma windows
/obj/effect/spawner/structure/window/plasma
name = "plasma window spawner"
icon_state = "pwindow_spawner"
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/fulltile)
/obj/effect/spawner/structure/window/hollow/plasma
name = "hollow plasma window spawner"
icon_state = "phwindow_spawner_full"
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma, /obj/structure/window/plasma/spawner/north, /obj/structure/window/plasma/spawner/east, /obj/structure/window/plasma/spawner/west)
/obj/effect/spawner/structure/window/hollow/plasma/end
icon_state = "phwindow_spawner_end"
/obj/effect/spawner/structure/window/hollow/plasma/end/Initialize()
switch(dir)
if(NORTH)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/spawner/north, /obj/structure/window/plasma/spawner/east, /obj/structure/window/plasma/spawner/west)
if(EAST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma, /obj/structure/window/plasma/spawner/north, /obj/structure/window/plasma/spawner/east)
if(SOUTH)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma, /obj/structure/window/plasma/spawner/east, /obj/structure/window/plasma/spawner/west)
if(WEST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma, /obj/structure/window/plasma/spawner/north, /obj/structure/window/plasma/spawner/west)
. = ..()
/obj/effect/spawner/structure/window/hollow/plasma/middle
icon_state = "phwindow_spawner_middle"
/obj/effect/spawner/structure/window/hollow/plasma/middle/Initialize()
switch(dir)
if(NORTH,SOUTH)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma, /obj/structure/window/plasma/spawner/north)
if(EAST,WEST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/spawner/east, /obj/structure/window/plasma/spawner/west)
. = ..()
/obj/effect/spawner/structure/window/hollow/plasma/directional
icon_state = "phwindow_spawner_directional"
/obj/effect/spawner/structure/window/hollow/plasma/directional/Initialize()
switch(dir)
if(NORTH)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/spawner/north)
if(NORTHEAST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/spawner/north, /obj/structure/window/plasma/spawner/east)
if(EAST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/spawner/east)
if(SOUTHEAST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma, /obj/structure/window/plasma/spawner/east)
if(SOUTH)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma)
if(SOUTHWEST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma, /obj/structure/window/plasma/spawner/west)
if(WEST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/spawner/west)
if(NORTHWEST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/spawner/north, /obj/structure/window/plasma/spawner/west)
. = ..()
//plasma reinforced
/obj/effect/spawner/structure/window/plasma/reinforced
name = "reinforced plasma window spawner"
icon_state = "prwindow_spawner"
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/reinforced/fulltile)
/obj/effect/spawner/structure/window/hollow/plasma/reinforced
name = "hollow plasma window spawner"
icon_state = "phrwindow_spawner_full"
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/reinforced, /obj/structure/window/plasma/reinforced/spawner/north, /obj/structure/window/plasma/reinforced/spawner/east, /obj/structure/window/plasma/reinforced/spawner/west)
/obj/effect/spawner/structure/window/hollow/plasma/reinforced/end
icon_state = "phrwindow_spawner_end"
/obj/effect/spawner/structure/window/hollow/plasma/reinforced/end/Initialize()
switch(dir)
if(NORTH)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/reinforced/spawner/north, /obj/structure/window/plasma/reinforced/spawner/east, /obj/structure/window/plasma/reinforced/spawner/west)
if(EAST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/reinforced, /obj/structure/window/plasma/reinforced/spawner/north, /obj/structure/window/plasma/reinforced/spawner/east)
if(SOUTH)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/reinforced, /obj/structure/window/plasma/reinforced/spawner/east, /obj/structure/window/plasma/reinforced/spawner/west)
if(WEST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/reinforced, /obj/structure/window/plasma/reinforced/spawner/north, /obj/structure/window/plasma/reinforced/spawner/west)
. = ..()
/obj/effect/spawner/structure/window/hollow/plasma/reinforced/middle
icon_state = "phrwindow_spawner_middle"
/obj/effect/spawner/structure/window/hollow/plasma/reinforced/middle/Initialize()
switch(dir)
if(NORTH,SOUTH)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/reinforced, /obj/structure/window/plasma/reinforced/spawner/north)
if(EAST,WEST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/reinforced/spawner/east, /obj/structure/window/plasma/reinforced/spawner/west)
. = ..()
/obj/effect/spawner/structure/window/hollow/plasma/reinforced/directional
icon_state = "phrwindow_spawner_directional"
/obj/effect/spawner/structure/window/hollow/plasma/reinforced/directional/Initialize()
switch(dir)
if(NORTH)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/reinforced/spawner/north)
if(NORTHEAST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/reinforced/spawner/north, /obj/structure/window/plasma/reinforced/spawner/east)
if(EAST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/reinforced/spawner/east)
if(SOUTHEAST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/reinforced, /obj/structure/window/plasma/reinforced/spawner/east)
if(SOUTH)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/reinforced)
if(SOUTHWEST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/reinforced, /obj/structure/window/plasma/reinforced/spawner/west)
if(WEST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/reinforced/spawner/west)
if(NORTHWEST)
spawn_list = list(/obj/structure/grille, /obj/structure/window/plasma/reinforced/spawner/north, /obj/structure/window/plasma/reinforced/spawner/west)
. = ..()