From 3d861022cf12dfd40c0360ddc7eea7541e569a17 Mon Sep 17 00:00:00 2001 From: BlueMemesauce <47338680+BlueMemesauce@users.noreply.github.com> Date: Thu, 29 Dec 2022 17:01:44 -0500 Subject: [PATCH] Fixes a bug where latejoin menu would display incorrect number of open slots (#72263) ## About The Pull Request Fixes number of open slots being less than intended by simply adding an if statement that prevents negative numbers from being added to the total. ## Why It's Good For The Game The number of department slots open will be accurate and there won't be any nonsense like a negative number of slots. Fixes #72034 ## Changelog :cl: spellcheck: fixed a bug where latejoin menu would display incorrect number of open slots /:cl: --- code/modules/mob/dead/new_player/latejoin_menu.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/dead/new_player/latejoin_menu.dm b/code/modules/mob/dead/new_player/latejoin_menu.dm index 6e0634ef169..98f365a8ec4 100644 --- a/code/modules/mob/dead/new_player/latejoin_menu.dm +++ b/code/modules/mob/dead/new_player/latejoin_menu.dm @@ -82,7 +82,8 @@ GLOBAL_DATUM_INIT(latejoin_menu, /datum/latejoin_menu, new) department_data["open_slots"] = "∞" if(department_data["open_slots"] != "∞") - department_data["open_slots"] += job_datum.total_positions - job_datum.current_positions + if(job_datum.total_positions - job_datum.current_positions > 0) + department_data["open_slots"] += job_datum.total_positions - job_datum.current_positions department_jobs[job_datum.title] = job_data