[MIRROR] Optimized Getallcontents (#2552)

* Optimized Getallcontents (#55964)

Optimized Getallcontents, split up it's component procs

* Optimized Getallcontents

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-01-07 23:53:25 +01:00
committed by GitHub
parent 6d11612783
commit ab87c3fe29
3 changed files with 21 additions and 26 deletions
@@ -360,7 +360,7 @@ GLOBAL_VAR_INIT(hhMysteryRoomNumber, rand(1, 999999))
. = ..()
if(istype(AM, /obj/item/hilbertshotel))
relocate(AM)
var/list/obj/item/hilbertshotel/hotels = AM.GetAllContents(/obj/item/hilbertshotel)
var/list/obj/item/hilbertshotel/hotels = AM.get_all_contents_type(/obj/item/hilbertshotel)
for(var/obj/item/hilbertshotel/H in hotels)
if(parentSphere == H)
relocate(H)
@@ -399,7 +399,7 @@ GLOBAL_VAR_INIT(hhMysteryRoomNumber, rand(1, 999999))
var/mob/M = AM
if(M.mind)
var/stillPopulated = FALSE
var/list/currentLivingMobs = GetAllContents(/mob/living) //Got to catch anyone hiding in anything
var/list/currentLivingMobs = get_all_contents_type(/mob/living) //Got to catch anyone hiding in anything
for(var/mob/living/L in currentLivingMobs) //Check to see if theres any sentient mobs left.
if(L.mind)
stillPopulated = TRUE