Mapping tool: adds a "structure" spawner that can be used to create "sets" of objects in a turf at runtime rather than having to stack objects in the map editor. Included are two presets for window and rwindow with a "wiring friendly" icon.

This commit is contained in:
KyrahAbattoir
2015-06-05 11:39:23 +02:00
parent f79a2eb0ab
commit d6c0ebdc1b
3 changed files with 34 additions and 0 deletions
@@ -0,0 +1,33 @@
/*
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/New()
if(spawn_list && spawn_list.len)
for(var/i = 1, i <= spawn_list.len, i++)
var/to_spawn = spawn_list[i]
new to_spawn(get_turf(src))
qdel(src)
/obj/effect/spawner/structure/window
icon = 'icons/obj/structures.dmi'
icon_state = "window_spawner"
name = "window spawner"
spawn_list = list(
/obj/structure/grille,
/obj/structure/window/fulltile
)
/obj/effect/spawner/structure/window/reinforced
name = "reenforced window spawner"
icon_state = "rwindow_spawner"
spawn_list = list(
/obj/structure/grille,
/obj/structure/window/reinforced/fulltile
)