mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
[MIRROR] Remove all gamemodes except Dynamic (#5173)
* Remove all gamemodes except Dynamic * qaaaaaaaa Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: Gandalf <jzo123@hotmail.com>
This commit is contained in:
@@ -1146,3 +1146,18 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
SSambience.ambience_listening_clients[src] = world.time + 10 SECONDS //Just wait 10 seconds before the next one aight mate? cheers.
|
||||
else
|
||||
SSambience.ambience_listening_clients -= src
|
||||
|
||||
/// Checks if this client has met the days requirement passed in, or if
|
||||
/// they are exempt from it.
|
||||
/// Returns the number of days left, or 0.
|
||||
/client/proc/get_remaining_days(days_needed)
|
||||
if(!CONFIG_GET(flag/use_age_restriction_for_jobs))
|
||||
return 0
|
||||
|
||||
if(!isnum(player_age))
|
||||
return 0 //This is only a number if the db connection is established, otherwise it is text: "Requires database", meaning these restrictions cannot be enforced
|
||||
|
||||
if(!isnum(days_needed))
|
||||
return 0
|
||||
|
||||
return max(0, days_needed - player_age)
|
||||
|
||||
@@ -695,20 +695,19 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
src.be_special = list()
|
||||
|
||||
|
||||
for (var/i in GLOB.special_roles)
|
||||
if(is_banned_from(user.ckey, i))
|
||||
dat += "<b>Be [capitalize(i)]:</b> <a href='?_src_=prefs;bancheck=[i]'>BANNED</a><br>"
|
||||
for (var/special_role in GLOB.special_roles)
|
||||
if(is_banned_from(user.ckey, special_role))
|
||||
dat += "<b>Be [capitalize(special_role)]:</b> <a href='?_src_=prefs;bancheck=[special_role]'>BANNED</a><br>"
|
||||
else
|
||||
var/days_remaining = null
|
||||
if(ispath(GLOB.special_roles[i]) && CONFIG_GET(flag/use_age_restriction_for_jobs)) //If it's a game mode antag, check if the player meets the minimum age
|
||||
var/mode_path = GLOB.special_roles[i]
|
||||
var/datum/game_mode/temp_mode = new mode_path
|
||||
days_remaining = temp_mode.get_remaining_days(user.client)
|
||||
if(CONFIG_GET(flag/use_age_restriction_for_jobs)) //If it's a game mode antag, check if the player meets the minimum age
|
||||
var/days_needed = GLOB.special_roles[special_role]
|
||||
days_remaining = user.client?.get_remaining_days(days_needed)
|
||||
|
||||
if(days_remaining)
|
||||
dat += "<b>Be [capitalize(i)]:</b> <font color=red> \[IN [days_remaining] DAYS]</font><br>"
|
||||
dat += "<b>Be [capitalize(special_role)]:</b> <font color=red> \[IN [days_remaining] DAYS]</font><br>"
|
||||
else
|
||||
dat += "<b>Be [capitalize(i)]:</b> <a href='?_src_=prefs;preference=be_special;be_special_type=[i]'>[(i in be_special) ? "Enabled" : "Disabled"]</a><br>"
|
||||
dat += "<b>Be [capitalize(special_role)]:</b> <a href='?_src_=prefs;preference=be_special;be_special_type=[special_role]'>[(special_role in be_special) ? "Enabled" : "Disabled"]</a><br>"
|
||||
dat += "<br>"
|
||||
dat += "<b>Midround Antagonist:</b> <a href='?_src_=prefs;preference=allow_midround_antag'>[(toggles & MIDROUND_ANTAG) ? "Enabled" : "Disabled"]</a><br>"
|
||||
dat += "</td></tr></table>"
|
||||
|
||||
Reference in New Issue
Block a user