From 293a5ed27f995d046bac8eaa8711b1dc10331c60 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 19 Oct 2022 12:26:05 +0200 Subject: [PATCH] [MIRROR] Fixes job preference entries persisting after they have been nulled [MDB IGNORE] (#16968) * Fixes job preference entries persisting after they have been nulled (#70577) I know this doesn't actually change behavior, but it's confusing, and adds a potential point of failure if someone doesn't realize it can happen. Let's be consistent * Fixes job preference entries persisting after they have been nulled Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> --- code/modules/client/preferences.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 0f04710421f..3b0d17bc471 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -500,7 +500,10 @@ GLOBAL_LIST_EMPTY(preferences_datums) else job_preferences[other_job] = JP_MEDIUM - job_preferences[job.title] = level + if(level == null) + job_preferences -= job.title + else + job_preferences[job.title] = level return TRUE