Remove all gamemodes except Dynamic (#58470)

Removes all /datum/game_mode except dynamic. Eventually, all of mode and game_mode will be removed, and Dynamic will become an ingrained system. Every single other gamemode was unmaintained at best and poisoned other code at worst. Currently all tg servers run 24/7 Dynamic, so the time to act is now.

* Remove gamemode references from age checks

* Monkey

* Remove heretics

* Remove BBs

* Refactor uplinks and remove clown ops

* Remove nuke ops

* Removes and refactors cult

* Remove extended

* Remove and move out meteors

* Removes wizard

* Remove sandbox

* Remove changelings

* Remove traitors

* Remove revs

* Remove gangs

* Remove changing mode and voting for new gamemodes

* get_candidates signature fix

* Summon ERT and NERD in their own panel

* Remove some old unneeded age_check stuff

* Fix old signatures of get_uplink_items

* Use Extended like config for dynamic.json

* Fix discounted gear
This commit is contained in:
Mothblocks
2021-04-25 01:55:10 -07:00
committed by GitHub
parent 51cb0e38a6
commit 7e4de07506
137 changed files with 843 additions and 3122 deletions
+15
View File
@@ -1116,3 +1116,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)
+8 -9
View File
@@ -693,20 +693,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>"