mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
Full jobs will no longer be shown as priority for latejoiners (#30627)
* Fixes full jobs being shown as priority * Commiting in the middle of compiling leaves things out
This commit is contained in:
@@ -19,7 +19,6 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
var/list/region_access = null
|
||||
var/list/head_subordinates = null
|
||||
var/target_dept = 0 //Which department this computer has access to. 0=all departments
|
||||
var/prioritycount = 0 // we don't want 500 prioritized jobs
|
||||
|
||||
//Cooldown for closing positions in seconds
|
||||
//if set to -1: No cooldown... probably a bad idea
|
||||
@@ -209,7 +208,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
if(job in SSjob.prioritized_jobs)
|
||||
dat += "<a href='?src=\ref[src];choice=prioritize_job;job=[job.title]'>Deprioritize</a>"
|
||||
else
|
||||
if(prioritycount < 5)
|
||||
if(SSjob.prioritized_jobs.len < 5)
|
||||
dat += "<a href='?src=\ref[src];choice=prioritize_job;job=[job.title]'>Prioritize</a>"
|
||||
else
|
||||
dat += "Denied"
|
||||
@@ -530,11 +529,12 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
var/priority = TRUE
|
||||
if(j in SSjob.prioritized_jobs)
|
||||
SSjob.prioritized_jobs -= j
|
||||
prioritycount--
|
||||
priority = FALSE
|
||||
else if(j.total_positions <= j.current_positions)
|
||||
to_chat(usr, "<span class='notice'>[j.title] has had all positions filled. Open up more slots before prioritizing it.</span>")
|
||||
return
|
||||
else
|
||||
SSjob.prioritized_jobs += j
|
||||
prioritycount++
|
||||
to_chat(usr, "<span class='notice'>[j.title] has been successfully [priority ? "prioritized" : "unprioritized"]. Potential employees will notice your request.</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
|
||||
|
||||
@@ -408,6 +408,11 @@
|
||||
if(job && IsJobAvailable(job.title))
|
||||
available_job_count++;
|
||||
|
||||
|
||||
for(var/datum/job/prioritized_job in SSjob.prioritized_jobs)
|
||||
if(prioritized_job.current_positions >= prioritized_job.total_positions)
|
||||
SSjob.prioritized_jobs -= prioritized_job
|
||||
|
||||
if(length(SSjob.prioritized_jobs))
|
||||
dat += "<div class='notice red'>The station has flagged these jobs as high priority:<br>"
|
||||
var/amt = length(SSjob.prioritized_jobs)
|
||||
|
||||
Reference in New Issue
Block a user