mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
crazylemon suggestion
This commit is contained in:
@@ -74,6 +74,14 @@
|
||||
/obj/effect/spawner
|
||||
name = "object spawner"
|
||||
|
||||
/**
|
||||
* Used when we want to pass vars from a spawner to a spawned object
|
||||
*
|
||||
* o - The spawned object we want to pass a var to
|
||||
*/
|
||||
/obj/effect/spawner/proc/synchronize_variables(atom/a)
|
||||
return
|
||||
|
||||
/obj/effect/list_container
|
||||
name = "list container"
|
||||
|
||||
|
||||
@@ -7,12 +7,11 @@
|
||||
var/window_to_spawn_regular = /obj/structure/window/basic
|
||||
var/window_to_spawn_full = /obj/structure/window/full/basic
|
||||
anchored = TRUE // No sliding out while you prime
|
||||
/// Used to link electrochromic windows to buttons
|
||||
var/id
|
||||
|
||||
/obj/effect/spawner/window/Initialize(mapload)
|
||||
. = ..()
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/structure/window/WI
|
||||
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)
|
||||
@@ -25,16 +24,11 @@
|
||||
break
|
||||
if(!cdir)
|
||||
continue
|
||||
var/obj/structure/window/WI = new window_to_spawn_regular(get_turf(src))
|
||||
WI = new window_to_spawn_regular(get_turf(src))
|
||||
WI.dir = cdir
|
||||
if(istype(src, /obj/effect/spawner/window/reinforced/polarized) && id)
|
||||
var/obj/structure/window/reinforced/polarized/WIP = WI
|
||||
WIP.id = id
|
||||
else
|
||||
var/obj/structure/window/WI = new window_to_spawn_full(get_turf(src))
|
||||
if(istype(src, /obj/effect/spawner/window/reinforced/polarized) && id)
|
||||
var/obj/structure/window/full/reinforced/polarized/WIP = WI
|
||||
WIP.id = id
|
||||
WI = new window_to_spawn_full(get_turf(src))
|
||||
synchronize_variables(WI)
|
||||
|
||||
if(useGrille)
|
||||
new /obj/structure/grille(get_turf(src))
|
||||
@@ -42,7 +36,6 @@
|
||||
air_update_turf(TRUE) //atmos can pass otherwise
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
|
||||
/obj/effect/spawner/window/reinforced
|
||||
name = "reinforced window spawner"
|
||||
icon_state = "rwindow_spawner"
|
||||
@@ -72,6 +65,16 @@
|
||||
icon_state = "ewindow_spawner"
|
||||
window_to_spawn_regular = /obj/structure/window/reinforced/polarized
|
||||
window_to_spawn_full = /obj/structure/window/full/reinforced/polarized
|
||||
/// Used to link electrochromic windows to buttons
|
||||
var/id
|
||||
|
||||
/obj/effect/spawner/window/reinforced/polarized/synchronize_variables(atom/a)
|
||||
if(useFull)
|
||||
var/obj/structure/window/full/reinforced/polarized/p = a
|
||||
p.id = id
|
||||
else
|
||||
var/obj/structure/window/reinforced/polarized/p = a
|
||||
p.id = id
|
||||
|
||||
/obj/effect/spawner/window/shuttle
|
||||
name = "shuttle window spawner"
|
||||
|
||||
Reference in New Issue
Block a user