mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 10:11:09 +00:00
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:
@@ -352,7 +352,7 @@ Example config:
|
||||
var/ct = initial(M.config_tag)
|
||||
if(ct && ct == mode_name)
|
||||
return new T
|
||||
return new /datum/game_mode/extended()
|
||||
return new /datum/game_mode/dynamic
|
||||
|
||||
/datum/controller/configuration/proc/get_runnable_modes()
|
||||
var/list/datum/game_mode/runnable_modes = new
|
||||
|
||||
@@ -104,8 +104,6 @@
|
||||
|
||||
/datum/config_entry/flag/allow_vote_restart // allow votes to restart
|
||||
|
||||
/datum/config_entry/flag/allow_vote_mode // allow votes to change mode
|
||||
|
||||
/datum/config_entry/flag/allow_vote_map // allow votes to change map
|
||||
|
||||
/datum/config_entry/number/vote_delay // minimum time between voting sessions (deciseconds, 10 minute default)
|
||||
|
||||
@@ -669,11 +669,6 @@ SUBSYSTEM_DEF(ticker)
|
||||
GLOB.master_mode = "extended"
|
||||
log_game("Saved mode is '[GLOB.master_mode]'")
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/save_mode(the_mode)
|
||||
var/F = file("data/mode.txt")
|
||||
fdel(F)
|
||||
WRITE_FILE(F, the_mode)
|
||||
|
||||
/// Returns if either the master mode or the forced secret ruleset matches the mode name.
|
||||
/datum/controller/subsystem/ticker/proc/is_mode(mode_name)
|
||||
return GLOB.master_mode == mode_name || GLOB.secret_force_mode == mode_name
|
||||
|
||||
@@ -61,11 +61,6 @@ SUBSYSTEM_DEF(vote)
|
||||
choices["Continue Playing"] += non_voters.len
|
||||
if(choices["Continue Playing"] >= greatest_votes)
|
||||
greatest_votes = choices["Continue Playing"]
|
||||
else if(mode == "gamemode")
|
||||
if(GLOB.master_mode in choices)
|
||||
choices[GLOB.master_mode] += non_voters.len
|
||||
if(choices[GLOB.master_mode] >= greatest_votes)
|
||||
greatest_votes = choices[GLOB.master_mode]
|
||||
else if(mode == "map")
|
||||
for (var/non_voter_ckey in non_voters)
|
||||
var/client/C = non_voters[non_voter_ckey]
|
||||
@@ -120,13 +115,6 @@ SUBSYSTEM_DEF(vote)
|
||||
if("restart")
|
||||
if(. == "Restart Round")
|
||||
restart = TRUE
|
||||
if("gamemode")
|
||||
if(GLOB.master_mode != .)
|
||||
SSticker.save_mode(.)
|
||||
if(SSticker.HasRoundStarted())
|
||||
restart = TRUE
|
||||
else
|
||||
GLOB.master_mode = .
|
||||
if("map")
|
||||
SSmapping.changemap(global.config.maplist[.])
|
||||
SSmapping.map_voted = TRUE
|
||||
@@ -185,8 +173,6 @@ SUBSYSTEM_DEF(vote)
|
||||
switch(vote_type)
|
||||
if("restart")
|
||||
choices.Add("Restart Round","Continue Playing")
|
||||
if("gamemode")
|
||||
choices.Add(config.votable_modes)
|
||||
if("map")
|
||||
if(!lower_admin && SSmapping.map_voted)
|
||||
to_chat(usr, "<span class='warning'>The next map has already been selected.</span>")
|
||||
@@ -255,7 +241,6 @@ SUBSYSTEM_DEF(vote)
|
||||
/datum/controller/subsystem/vote/ui_data(mob/user)
|
||||
var/list/data = list(
|
||||
"allow_vote_map" = CONFIG_GET(flag/allow_vote_map),
|
||||
"allow_vote_mode" = CONFIG_GET(flag/allow_vote_mode),
|
||||
"allow_vote_restart" = CONFIG_GET(flag/allow_vote_restart),
|
||||
"choices" = list(),
|
||||
"lower_admin" = !!user.client?.holder,
|
||||
@@ -297,18 +282,12 @@ SUBSYSTEM_DEF(vote)
|
||||
if("toggle_restart")
|
||||
if(usr.client.holder && upper_admin)
|
||||
CONFIG_SET(flag/allow_vote_restart, !CONFIG_GET(flag/allow_vote_restart))
|
||||
if("toggle_gamemode")
|
||||
if(usr.client.holder && upper_admin)
|
||||
CONFIG_SET(flag/allow_vote_mode, !CONFIG_GET(flag/allow_vote_mode))
|
||||
if("toggle_map")
|
||||
if(usr.client.holder && upper_admin)
|
||||
CONFIG_SET(flag/allow_vote_map, !CONFIG_GET(flag/allow_vote_map))
|
||||
if("restart")
|
||||
if(CONFIG_GET(flag/allow_vote_restart) || usr.client.holder)
|
||||
initiate_vote("restart",usr.key)
|
||||
if("gamemode")
|
||||
if(CONFIG_GET(flag/allow_vote_mode) || usr.client.holder)
|
||||
initiate_vote("gamemode",usr.key)
|
||||
if("map")
|
||||
if(CONFIG_GET(flag/allow_vote_map) || usr.client.holder)
|
||||
initiate_vote("map",usr.key)
|
||||
|
||||
Reference in New Issue
Block a user