mirror of
https://github.com/Aurorastation/Aurora-Old.git
synced 2026-08-23 04:36:18 +01:00
Configurable Age Restrictions
Makes the age restrictions on jobs editable on the fly from a new config file.
This commit is contained in:
@@ -26,6 +26,10 @@ var/jobban_keylist[0] //to store the keys & ranks
|
||||
if(config.usewhitelist && !check_whitelist(M))
|
||||
return "Whitelisted Job"
|
||||
|
||||
if (config.use_age_restriction_for_jobs)
|
||||
if (config.age_restrictions[rank] && M.client.player_age < config.age_restrictions[rank])
|
||||
return "Age Restricted"
|
||||
|
||||
for (var/s in jobban_keylist)
|
||||
if( findtext(s,"[M.ckey] - [rank]") == 1 )
|
||||
var/startpos = findtext(s, "## ")+3
|
||||
|
||||
@@ -429,13 +429,18 @@ datum/preferences
|
||||
src.be_special = 0
|
||||
else
|
||||
var/n = 0
|
||||
var/banned = null
|
||||
for (var/i in special_roles)
|
||||
if(special_roles[i]) //if mode is available on the server
|
||||
if(jobban_isbanned(user, i))
|
||||
dat += "<b>Be [i]:</b> <font color=red><b> \[BANNED]</b></font><br>"
|
||||
else if(i == "pai candidate")
|
||||
if(jobban_isbanned(user, "pAI"))
|
||||
dat += "<b>Be [i]:</b> <font color=red><b> \[BANNED]</b></font><br>"
|
||||
banned = jobban_isbanned(user, i)
|
||||
if (i == "pai candidate")
|
||||
banned = jobban_isbanned(user, "pAI")
|
||||
|
||||
if (banned == "Age Restricted")
|
||||
var/time = config.age_restrictions[i] - user.client.player_age
|
||||
dat += "<b>Be [i]:</b> <font color=black>\[IN [time] DAYS]</font><br>"
|
||||
else if (banned)
|
||||
dat += "<b>Be [i]:</b> <font color=red><b>\[BANNED]</b></font><br>"
|
||||
else
|
||||
dat += "<b>Be [i]:</b> <a href='?_src_=prefs;preference=be_special;num=[n]'><b>[src.be_special&(1<<n) ? "Yes" : "No"]</b></a><br>"
|
||||
n++
|
||||
@@ -1680,4 +1685,4 @@ var/list/limb_connection_data
|
||||
/datum/preferences/proc/make_sure_we_have_a_brain_type_for_machines()
|
||||
if (species=="Machine")
|
||||
if(!machine_brain_type)
|
||||
machine_brain_type="Posibrain"
|
||||
machine_brain_type="Posibrain"
|
||||
|
||||
Reference in New Issue
Block a user