mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-15 20:52:07 +00:00
Merge pull request #5343 from ReddeyfishVor/slimeChanges
prevent slimes from spawning on top of people
This commit is contained in:
@@ -12,4 +12,16 @@
|
||||
var/area/A = locate(areapath) // Check if it actually exists
|
||||
if(istype(A) && A.z in using_map.player_levels)
|
||||
grand_list_of_areas += A
|
||||
return grand_list_of_areas
|
||||
return grand_list_of_areas
|
||||
|
||||
/** Checks if any living humans are in a given area! */
|
||||
/proc/is_area_occupied(var/area/myarea)
|
||||
// Testing suggests looping over human_mob_list is quicker than looping over area contents
|
||||
for(var/mob/living/carbon/human/H in human_mob_list)
|
||||
if(H.stat >= DEAD) //Conditions for exclusion here, like if disconnected people start blocking it.
|
||||
continue
|
||||
var/area/A = get_area(H)
|
||||
if(A == myarea) //The loc of a turf is the area it is in.
|
||||
return 1
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user