From 41f2555060ff08b9c98b38cb7fa75b7fe0afd0c8 Mon Sep 17 00:00:00 2001 From: Verkister Date: Fri, 17 Nov 2017 13:46:26 +0200 Subject: [PATCH] Fixes one player being able to hog every slot of a job alone. -Apparently the FreeRole proc that is called when people cryo out and whatnot only frees up one single slot and only if the job slots are already full. What this means is that say, we have a 3 slot job, and one person joins, leaves, and rejoins into the job 3 times, the one person will have filled up the entire job until they leave, which even then only reopens one slot. -Leaving does not deduct from the current_positions count (shown as the number on join menu before the "active" number, meaning it also counts the people who have already left and so on) and the FreeRole only pops a slot open if the person leaving took the last slot. --- code/game/jobs/job_controller.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index f74b1d6185f..a0ac2f646cb 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -74,7 +74,7 @@ var/global/datum/controller/occupations/job_master proc/FreeRole(var/rank) //making additional slot on the fly var/datum/job/job = GetJob(rank) - if(job && job.current_positions >= job.total_positions && job.total_positions != -1) + if(job && job.total_positions != -1) job.total_positions++ return 1 return 0