Adds spaceturf check to blob overmind spawning
This commit is contained in:
committed by
CitadelStationBot
parent
1f65e222b7
commit
02b63e199b
@@ -58,12 +58,27 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
|
||||
/mob/camera/blob/proc/validate_location()
|
||||
var/turf/T = get_turf(src)
|
||||
<<<<<<< HEAD
|
||||
var/area/A = get_area(T)
|
||||
if(((A && !A.blob_allowed) || !T || !(T.z in GLOB.station_z_levels)) && LAZYLEN(GLOB.blobstart))
|
||||
T = get_turf(pick(GLOB.blobstart))
|
||||
=======
|
||||
if(!is_valid_turf(T) && LAZYLEN(GLOB.blobstart))
|
||||
var/list/blobstarts = shuffle(GLOB.blobstart)
|
||||
for(var/_T in blobstarts)
|
||||
if(is_valid_turf(_T))
|
||||
T = _T
|
||||
break
|
||||
>>>>>>> ca1da30... Adds spaceturf check to blob overmind spawning (#34100)
|
||||
if(!T)
|
||||
CRASH("No blobspawnpoints and blob spawned in nullspace.")
|
||||
forceMove(T)
|
||||
|
||||
/mob/camera/blob/proc/is_valid_turf(turf/T)
|
||||
var/area/A = get_area(T)
|
||||
if((A && !A.blob_allowed) || !T || !is_station_level(T.z) || isspaceturf(T))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/mob/camera/blob/Life()
|
||||
if(!blob_core)
|
||||
@@ -246,4 +261,4 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
. = ..()
|
||||
var/datum/antagonist/blob/B = mind.has_antag_datum(/datum/antagonist/blob)
|
||||
if(!B)
|
||||
mind.add_antag_datum(/datum/antagonist/blob)
|
||||
mind.add_antag_datum(/datum/antagonist/blob)
|
||||
|
||||
Reference in New Issue
Block a user