Replaces a bunch of mob loops with hopefully better ones

This commit is contained in:
vuonojenmustaturska
2017-11-17 00:08:40 +02:00
committed by CitadelStationBot
parent 0e0eb351b3
commit 6ce69fb2c8
84 changed files with 405 additions and 154 deletions
+2 -2
View File
@@ -505,7 +505,7 @@ Code:
menu += "<h4>Located Cleanbots:</h4>"
ldat = null
for (var/mob/living/simple_animal/bot/cleanbot/B in GLOB.living_mob_list)
for (var/mob/living/simple_animal/bot/cleanbot/B in GLOB.alive_mob_list)
var/turf/bl = get_turf(B)
if(bl)
@@ -715,7 +715,7 @@ Code:
var/turf/current_turf = get_turf(src)
var/zlevel = current_turf.z
var/botcount = 0
for(Bot in GLOB.living_mob_list) //Git da botz
for(Bot in GLOB.alive_mob_list) //Git da botz
if(!Bot.on || Bot.z != zlevel || Bot.remote_disabled || !(bot_access_flags & Bot.bot_type)) //Only non-emagged bots on the same Z-level are detected!
continue //Also, the PDA must have access to the bot type.
menu += "<A href='byond://?src=[REF(src)];op=control;bot=[REF(Bot)]'><b>[Bot.name]</b> ([Bot.get_mode()])<BR>"
+1 -2
View File
@@ -103,7 +103,7 @@
var/list/name_counts = list()
var/list/names = list()
for(var/mob/living/carbon/human/H in GLOB.mob_list)
for(var/mob/living/carbon/human/H in GLOB.carbon_list)
if(!trackable(H))
continue
@@ -147,4 +147,3 @@
return PROCESS_KILL
scan_for_target()
update_icon()