From 945fa02fd6d76aff0e2654c10ea776938fc656b1 Mon Sep 17 00:00:00 2001 From: mikomyazaki <47489928+mikomyazaki@users.noreply.github.com> Date: Tue, 29 Sep 2020 14:44:14 +0100 Subject: [PATCH] Faction species blacklists will no longer become null due to incorrect use of initial. (#10120) --- code/game/jobs/faction/faction.dm | 3 ++- html/changelogs/species_blacklist_fix.yml | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 html/changelogs/species_blacklist_fix.yml diff --git a/code/game/jobs/faction/faction.dm b/code/game/jobs/faction/faction.dm index 1809243468a..9e4e5ca7a22 100644 --- a/code/game/jobs/faction/faction.dm +++ b/code/game/jobs/faction/faction.dm @@ -30,7 +30,8 @@ if(LAZYACCESS(job_species_blacklist, role.title)) role.blacklisted_species = job_species_blacklist[role.title] else - role.blacklisted_species = initial(role.blacklisted_species) + var/datum/job/J = new role.type + role.blacklisted_species = J.blacklisted_species . += role /datum/faction/proc/get_selection_error(datum/preferences/prefs) diff --git a/html/changelogs/species_blacklist_fix.yml b/html/changelogs/species_blacklist_fix.yml new file mode 100644 index 00000000000..67eba574cca --- /dev/null +++ b/html/changelogs/species_blacklist_fix.yml @@ -0,0 +1,7 @@ + +author: mikomyazaki + +delete-after: True + +changes: + - bugfix: "Faction job-species blacklists will no longer be nulled under some circumstances, allowing invalid job-species combinations." \ No newline at end of file