Creates a framework for per-faction Alt Titles (#19671)

Creates a framework to restrict certain alt titles to certain factions.

As an example and natural logical consequence:
"Corporate Reporter" can only be used by Corporate employees
"Freelance Journalist" can only be used by Independent crew

I plan to use this system in a later PR.

---------

Signed-off-by: FlamingLily <80451102+FlamingLily@users.noreply.github.com>
This commit is contained in:
FlamingLily
2024-07-27 12:45:29 +00:00
committed by GitHub
parent 7a15a98270
commit 4bce8201c3
4 changed files with 70 additions and 0 deletions
@@ -517,6 +517,11 @@
if (!job)
return
var/choices = list(job.title) + job.alt_titles
for(var/t in choices)
if(!isnull(job.alt_factions))
if (src.faction in job.alt_factions[t])
continue
choices -= t
if((GLOB.all_species[src.species].spawn_flags & NO_AGE_MINIMUM))
return choices
for(var/t in choices)