mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 03:26:31 +01:00
Automatic Round-start Access Scaling
- Added a new config option MINIMAL_ACCESS_THRESHOLD that can be used to automatically give players more access during low-pop rounds. - If the number of players is below this threshold, expanded access will be used and security and assistants will have maintenance access. - If the number of players exceeds the threshold, minimal access will be used and security and assistants will not have maintenance access. - Setting the threshold to 0 will disable this function, and server ops can set the state of round-start access manually
This commit is contained in:
@@ -211,6 +211,15 @@ var/datum/subsystem/job/SSjob
|
||||
//Scale number of open security officer slots to population
|
||||
setup_officer_positions()
|
||||
|
||||
//Jobs will have fewer access permissions if the number of players exceeds the threshold defined in game_options.txt
|
||||
if(config.minimal_access_threshold)
|
||||
if(config.minimal_access_threshold > unassigned.len)
|
||||
config.jobs_have_minimal_access = 0
|
||||
config.jobs_have_maint_access = 3 //Sec and Assistants get maint access
|
||||
else
|
||||
config.jobs_have_minimal_access = 1
|
||||
config.jobs_have_maint_access = 0 //Sec and Assistants don't get maint access
|
||||
|
||||
//Shuffle players and jobs
|
||||
unassigned = shuffle(unassigned)
|
||||
|
||||
@@ -335,6 +344,7 @@ var/datum/subsystem/job/SSjob
|
||||
H << "<b>To speak on your departments radio, use the :h button. To see others, look closely at your headset.</b>"
|
||||
if(job.req_admin_notify)
|
||||
H << "<b>You are playing a job that is important for Game Progression. If you have to disconnect, please notify the admins via adminhelp.</b>"
|
||||
H << "<FONT color='blue'><B>As this station was initially staffed with a [config.jobs_have_minimal_access ? "full crew, only your job's necessities" : "skeleton crew, additional access"] have been added to your ID card.</B></font>"
|
||||
|
||||
H.update_hud() // Tmp fix for Github issue 1006. TODO: make all procs in update_icons.dm do client.screen |= equipment no matter what.
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user