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:
Ikarrus
2015-01-20 23:16:51 -07:00
parent 793243763d
commit f4e021fc82
4 changed files with 61 additions and 3 deletions
+5 -2
View File
@@ -47,8 +47,9 @@
var/kick_inactive = 0 //force disconnect for inactive players
var/load_jobs_from_txt = 0
var/automute_on = 0 //enables automuting/spam prevention
var/jobs_have_minimal_access = 0 //determines whether jobs use minimal access or expanded access.
var/jobs_have_maint_access = 0 //Who gets maint access? See defines above
var/minimal_access_threshold = 0 //If the number of players is larger than this threshold, minimal access will be turned on and jobs_have_maint_access will be set to 3
var/jobs_have_minimal_access = 0 //determines whether jobs use minimal access or expanded access. Only used if minimal_access_threshold is 0.
var/jobs_have_maint_access = 0 //Who gets maint access? See defines above. Only used if minimal_access_threshold is 0.
var/sec_start_brig = 0 //makes sec start in brig or dept sec posts
var/server
@@ -395,6 +396,8 @@
config.allow_latejoin_antagonists = 1
if("allow_random_events")
config.allow_random_events = 1
if("minimal_access_threshold")
config.minimal_access_threshold = text2num(value)
if("jobs_have_minimal_access")
config.jobs_have_minimal_access = 1
if("humans_need_surnames")
+10
View File
@@ -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