diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index 752b8bed198..2230fca558a 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -25,6 +25,7 @@ SPECIES_SKRELL_AXIORI = 50 ) var/list/alt_ages = null // assoc list of alt titles to minimum character ages assoc lists (see above -- yes this is slightly awful) + var/list/alt_factions = null // Assoc list of alt titles (as strings) to a list of faction titles (as strings). Defines what alt title can belong to what faction. Remains Null if no restrictions in use. var/latejoin_at_spawnpoints = FALSE //If this job should use roundstart spawnpoints for latejoin (offstation jobs etc) diff --git a/code/game/jobs/job/outsider/representative.dm b/code/game/jobs/job/outsider/representative.dm index 0777eab88ab..c52cf6edd54 100644 --- a/code/game/jobs/job/outsider/representative.dm +++ b/code/game/jobs/job/outsider/representative.dm @@ -18,6 +18,10 @@ access = list(ACCESS_JOURNALIST, ACCESS_MAINT_TUNNELS) minimal_access = list(ACCESS_JOURNALIST, ACCESS_MAINT_TUNNELS) alt_titles = list("Freelance Journalist") + alt_factions = list( + "Corporate Reporter" = list("NanoTrasen", "Idris Incorporated", "Hephaestus Industries", "Orion Express", "Zavodskoi Interstellar", "Zeng-Hu Pharmaceuticals", "Private Military Contracting Group", "Stellar Corporate Conglomerate"), + "Freelance Journalist" = list("Independent") + ) alt_outfits = list("Freelance Journalist" = /obj/outfit/job/journalistf) title_accesses = list("Corporate Reporter" = list(ACCESS_MEDICAL, ACCESS_SEC_DOORS, ACCESS_RESEARCH, ACCESS_ENGINE)) outfit = /obj/outfit/job/journalist diff --git a/code/modules/client/preference_setup/occupation/occupation.dm b/code/modules/client/preference_setup/occupation/occupation.dm index bd86e08925c..8f30f260497 100644 --- a/code/modules/client/preference_setup/occupation/occupation.dm +++ b/code/modules/client/preference_setup/occupation/occupation.dm @@ -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) diff --git a/html/changelogs/flaminglily-factiontitle.yml b/html/changelogs/flaminglily-factiontitle.yml new file mode 100644 index 00000000000..edc34f8bda8 --- /dev/null +++ b/html/changelogs/flaminglily-factiontitle.yml @@ -0,0 +1,60 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: FlamingLily + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - code_imp: "Added a system for restricting certain alt titles to certain factions." + - rscadd: "Restricted Freelance Journalist to the independent faction, and Corp reporter to the corporate factions." +