Refactors faction lists to use getters and setters and be cached (#94490)

This commit is contained in:
Bloop
2026-01-19 04:12:35 +01:00
committed by GitHub
parent 8a8e9f7c88
commit 68153c2333
158 changed files with 757 additions and 393 deletions
@@ -165,6 +165,8 @@
/obj/effect/watcher_orbiter/Initialize(mapload)
. = ..()
if(LAZYLEN(target_faction))
target_faction = string_list(target_faction)
START_PROCESSING(SSobj, src)
// Shuttle rotation fucks with our position, we just want to stick with our guy
@@ -182,7 +184,7 @@
for (var/mob/living/potential_target in oview(5, src))
if (!ismining(potential_target) || potential_target.stat == DEAD)
continue
if (!faction_check(target_faction, potential_target.faction))
if (!potential_target.has_faction(target_faction))
continue
shoot_at(potential_target)
return