mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-30 23:46:43 +01:00
Merge pull request #128 from ReddeyfishVor/slimeChange
prevent slimes from spawning on top of players
This commit is contained in:
+12
-1
@@ -12,4 +12,15 @@
|
||||
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