mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
Makes for loops use GLOB.human_list. Should improve performance a bit. Fixes blood contract affecting dead crew (#13691)
* Replaces all human in X to GLOB.human_list * crew monitor * no playerlist converts * forgot to stage there...
This commit is contained in:
@@ -460,8 +460,9 @@ Gunshots/explosions/opening doors/less rare audio (done)
|
||||
target = T
|
||||
var/image/A = null
|
||||
var/kind = force_kind ? force_kind : pick("clown", "corgi", "carp", "skeleton", "demon","zombie")
|
||||
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
|
||||
if(H == target)
|
||||
for(var/thing in GLOB.human_list)
|
||||
var/mob/living/carbon/human/H = thing
|
||||
if(H.stat == DEAD || H == target)
|
||||
continue
|
||||
if(skip_nearby && (H in view(target)))
|
||||
continue
|
||||
@@ -539,7 +540,8 @@ Gunshots/explosions/opening doors/less rare audio (done)
|
||||
var/mob/living/carbon/human/clone = null
|
||||
var/clone_weapon = null
|
||||
|
||||
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
|
||||
for(var/thing in GLOB.human_list)
|
||||
var/mob/living/carbon/human/H = thing
|
||||
if(H.stat || H.lying)
|
||||
continue
|
||||
clone = H
|
||||
@@ -751,8 +753,10 @@ GLOBAL_LIST_INIT(non_fakeattack_weapons, list(/obj/item/gun/projectile, /obj/ite
|
||||
target.client.images.Remove(speech_overlay)
|
||||
else // Radio talk
|
||||
var/list/humans = list()
|
||||
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
|
||||
humans += H
|
||||
for(var/thing in GLOB.human_list)
|
||||
var/mob/living/carbon/human/H = thing
|
||||
if(H.stat != DEAD)
|
||||
humans += H
|
||||
person = pick(humans)
|
||||
target.hear_radio(message_to_multilingual(pick(radio_messages), pick(person.languages)), speaker = person, part_a = "<span class='[SSradio.frequency_span_class(PUB_FREQ)]'><b>\[[get_frequency_name(PUB_FREQ)]\]</b> <span class='name'>", part_b = "</span> <span class='message'>")
|
||||
qdel(src)
|
||||
|
||||
Reference in New Issue
Block a user