Merge pull request #5159 from Citadel-Station-13/upstream-merge-34926
[MIRROR] Makes revenants spawn on dead bodies & bodycontainers
This commit is contained in:
@@ -34,10 +34,16 @@
|
||||
|
||||
var/list/spawn_locs = list()
|
||||
|
||||
for(var/obj/effect/landmark/revenantspawn/L in GLOB.landmarks_list)
|
||||
if(isturf(L.loc))
|
||||
spawn_locs += L.loc
|
||||
if(!spawn_locs.len) //If we can't find any revenant spawns, try the carp spawns
|
||||
for(var/mob/living/L in GLOB.dead_mob_list) //look for any dead bodies
|
||||
var/turf/T = get_turf(L)
|
||||
if(T && is_station_level(T.z))
|
||||
spawn_locs += T
|
||||
if(!spawn_locs.len || spawn_locs.len < 15) //look for any morgue trays, crematoriums, ect if there weren't alot of dead bodies on the station to pick from
|
||||
for(var/obj/structure/bodycontainer/bc in GLOB.bodycontainers)
|
||||
var/turf/T = get_turf(bc)
|
||||
if(T && is_station_level(T.z))
|
||||
spawn_locs += T
|
||||
if(!spawn_locs.len) //If we can't find any valid spawnpoints, try the carp spawns
|
||||
for(var/obj/effect/landmark/carpspawn/L in GLOB.landmarks_list)
|
||||
if(isturf(L.loc))
|
||||
spawn_locs += L.loc
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
* Parent class for morgue and crematorium
|
||||
* For overriding only
|
||||
*/
|
||||
GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants and other ghosties.
|
||||
|
||||
/obj/structure/bodycontainer
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "morgue1"
|
||||
@@ -26,7 +28,12 @@
|
||||
var/message_cooldown
|
||||
var/breakout_time = 600
|
||||
|
||||
/obj/structure/bodycontainer/Initialize()
|
||||
. = ..()
|
||||
GLOB.bodycontainers += src
|
||||
|
||||
/obj/structure/bodycontainer/Destroy()
|
||||
GLOB.bodycontainers -= src
|
||||
open()
|
||||
if(connected)
|
||||
qdel(connected)
|
||||
|
||||
Reference in New Issue
Block a user