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
+20
View File
@@ -1,3 +1,4 @@
<<<<<<< HEAD
/obj/effect/manifest
name = "manifest"
icon = 'icons/mob/screen_gen.dmi'
@@ -15,3 +16,22 @@
P.name = "paper- 'Crew Manifest'"
//SN src = null
qdel(src)
=======
/obj/effect/manifest
name = "manifest"
icon = 'icons/mob/screen_gen.dmi'
icon_state = "x"
/obj/effect/manifest/New()
src.invisibility = INVISIBILITY_ABSTRACT
/obj/effect/manifest/proc/manifest()
var/dat = "<B>Crew Manifest</B>:<BR>"
for(var/mob/living/carbon/human/M in GLOB.carbon_list)
dat += text(" <B>[]</B> - []<BR>", M.name, M.get_assignment())
var/obj/item/paper/P = new /obj/item/paper( src.loc )
P.info = dat
P.name = "paper- 'Crew Manifest'"
//SN src = null
qdel(src)
>>>>>>> 39375d5... Replaces a bunch of mob loops with hopefully better ones (#32786)
+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()