mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 10:11:09 +00:00
Remove a bunch of old gamemode code (#59067)
* Beep beep gamemode removal coming through * More cleaning * More cleaning * Clean up station_was_nuked * Station nuke source * Remove name * More unused functions * Remove antag rep, which was unused in dynamic * Remove more antag rep stuff, which was UNUSED IN DYNAMIC * Station goals outside of mode * Remove setup_done * Remove player lists * Move some older procs * Fix simulations * Attempt to fix this stupid case sensitive bullshit * Revert "Attempt to fix this stupid case sensitive bullshit" This reverts commit 8693c02d67602543d7d4b92130a7a32cd973e5bf. * ??? * Delete icons/Testing directory * Move station_goals global definition
This commit is contained in:
@@ -42,7 +42,6 @@
|
||||
if(entries)
|
||||
CRASH("/datum/controller/configuration/Load() called more than once!")
|
||||
InitEntries()
|
||||
LoadModes()
|
||||
if(fexists("[directory]/config.txt") && LoadEntries("config.txt") <= 1)
|
||||
var/list/legacy_configs = list("game_options.txt", "dbconfig.txt", "comms.txt")
|
||||
for(var/I in legacy_configs)
|
||||
@@ -221,35 +220,6 @@
|
||||
return
|
||||
return E.ValidateAndSet("[new_val]")
|
||||
|
||||
/datum/controller/configuration/proc/LoadModes()
|
||||
gamemode_cache = typecacheof(/datum/game_mode, TRUE)
|
||||
modes = list()
|
||||
mode_names = list()
|
||||
mode_reports = list()
|
||||
mode_false_report_weight = list()
|
||||
votable_modes = list()
|
||||
var/list/probabilities = Get(/datum/config_entry/keyed_list/probability)
|
||||
for(var/T in gamemode_cache)
|
||||
// I wish I didn't have to instance the game modes in order to look up
|
||||
// their information, but it is the only way (at least that I know of).
|
||||
var/datum/game_mode/M = new T()
|
||||
|
||||
if(M.config_tag)
|
||||
if(!(M.config_tag in modes)) // ensure each mode is added only once
|
||||
modes += M.config_tag
|
||||
mode_names[M.config_tag] = M.name
|
||||
probabilities[M.config_tag] = M.probability
|
||||
mode_reports[M.report_type] = M.generate_report()
|
||||
if(probabilities[M.config_tag]>0)
|
||||
mode_false_report_weight[M.report_type] = M.false_report_weight
|
||||
else
|
||||
//"impossible" modes will still falsly show up occasionally, else they'll stick out like a sore thumb if an admin decides to force a disabled gamemode.
|
||||
mode_false_report_weight[M.report_type] = min(1, M.false_report_weight)
|
||||
if(M.votable)
|
||||
votable_modes += M.config_tag
|
||||
qdel(M)
|
||||
votable_modes += "secret"
|
||||
|
||||
/datum/controller/configuration/proc/LoadMOTD()
|
||||
motd = file2text("[directory]/motd.txt")
|
||||
var/tm_info = GLOB.revdata.GetTestMergeInfo()
|
||||
@@ -342,71 +312,6 @@ Example config:
|
||||
else
|
||||
log_config("Unknown command in map vote config: '[command]'")
|
||||
|
||||
|
||||
/datum/controller/configuration/proc/pick_mode(mode_name)
|
||||
// I wish I didn't have to instance the game modes in order to look up
|
||||
// their information, but it is the only way (at least that I know of).
|
||||
// ^ This guy didn't try hard enough
|
||||
for(var/T in gamemode_cache)
|
||||
var/datum/game_mode/M = T
|
||||
var/ct = initial(M.config_tag)
|
||||
if(ct && ct == mode_name)
|
||||
return new T
|
||||
return new /datum/game_mode/dynamic
|
||||
|
||||
/datum/controller/configuration/proc/get_runnable_modes()
|
||||
var/list/datum/game_mode/runnable_modes = new
|
||||
var/list/probabilities = Get(/datum/config_entry/keyed_list/probability)
|
||||
var/list/min_pop = Get(/datum/config_entry/keyed_list/min_pop)
|
||||
var/list/max_pop = Get(/datum/config_entry/keyed_list/max_pop)
|
||||
var/list/repeated_mode_adjust = Get(/datum/config_entry/number_list/repeated_mode_adjust)
|
||||
for(var/T in gamemode_cache)
|
||||
var/datum/game_mode/M = new T()
|
||||
if(!(M.config_tag in modes))
|
||||
qdel(M)
|
||||
continue
|
||||
if(probabilities[M.config_tag]<=0)
|
||||
qdel(M)
|
||||
continue
|
||||
if(min_pop[M.config_tag])
|
||||
M.required_players = min_pop[M.config_tag]
|
||||
if(max_pop[M.config_tag])
|
||||
M.maximum_players = max_pop[M.config_tag]
|
||||
if(M.can_start())
|
||||
var/final_weight = probabilities[M.config_tag]
|
||||
if(SSpersistence.saved_modes.len == 3 && repeated_mode_adjust.len == 3)
|
||||
var/recent_round = min(SSpersistence.saved_modes.Find(M.config_tag),3)
|
||||
var/adjustment = 0
|
||||
while(recent_round)
|
||||
adjustment += repeated_mode_adjust[recent_round]
|
||||
recent_round = SSpersistence.saved_modes.Find(M.config_tag,recent_round+1,0)
|
||||
final_weight *= ((100-adjustment)/100)
|
||||
runnable_modes[M] = final_weight
|
||||
return runnable_modes
|
||||
|
||||
/datum/controller/configuration/proc/get_runnable_midround_modes(crew)
|
||||
var/list/datum/game_mode/runnable_modes = new
|
||||
var/list/probabilities = Get(/datum/config_entry/keyed_list/probability)
|
||||
var/list/min_pop = Get(/datum/config_entry/keyed_list/min_pop)
|
||||
var/list/max_pop = Get(/datum/config_entry/keyed_list/max_pop)
|
||||
for(var/T in (gamemode_cache - SSticker.mode.type))
|
||||
var/datum/game_mode/M = new T()
|
||||
if(!(M.config_tag in modes))
|
||||
qdel(M)
|
||||
continue
|
||||
if(probabilities[M.config_tag]<=0)
|
||||
qdel(M)
|
||||
continue
|
||||
if(min_pop[M.config_tag])
|
||||
M.required_players = min_pop[M.config_tag]
|
||||
if(max_pop[M.config_tag])
|
||||
M.maximum_players = max_pop[M.config_tag]
|
||||
if(M.required_players <= crew)
|
||||
if(M.maximum_players >= 0 && M.maximum_players < crew)
|
||||
continue
|
||||
runnable_modes[M] = probabilities[M.config_tag]
|
||||
return runnable_modes
|
||||
|
||||
/datum/controller/configuration/proc/LoadChatFilter()
|
||||
var/list/in_character_filter = list()
|
||||
if(!fexists("[directory]/in_character_filter.txt"))
|
||||
|
||||
@@ -21,20 +21,6 @@
|
||||
/datum/config_entry/keyed_list/min_pop/ValidateListEntry(key_name, key_value)
|
||||
return key_name in config.modes
|
||||
|
||||
/datum/config_entry/keyed_list/continuous // which roundtypes continue if all antagonists die
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_FLAG
|
||||
|
||||
/datum/config_entry/keyed_list/continuous/ValidateListEntry(key_name, key_value)
|
||||
return key_name in config.modes
|
||||
|
||||
/datum/config_entry/keyed_list/midround_antag // which roundtypes use the midround antagonist system
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_FLAG
|
||||
|
||||
/datum/config_entry/keyed_list/midround_antag/ValidateListEntry(key_name, key_value)
|
||||
return key_name in config.modes
|
||||
|
||||
/datum/config_entry/number/damage_multiplier
|
||||
config_entry_value = 1
|
||||
integer = FALSE
|
||||
@@ -111,41 +97,11 @@
|
||||
|
||||
/datum/config_entry/flag/allow_latejoin_antagonists // If late-joining players can be traitor/changeling
|
||||
|
||||
/datum/config_entry/flag/use_antag_rep // see game_options.txt for details
|
||||
|
||||
/datum/config_entry/number/antag_rep_maximum
|
||||
config_entry_value = 200
|
||||
integer = FALSE
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/default_antag_tickets
|
||||
config_entry_value = 100
|
||||
integer = FALSE
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/max_tickets_per_roll
|
||||
config_entry_value = 100
|
||||
integer = FALSE
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/midround_antag_time_check // How late (in minutes you want the midround antag system to stay on, setting this to 0 will disable the system)
|
||||
config_entry_value = 60
|
||||
integer = FALSE
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/midround_antag_life_check // A ratio of how many people need to be alive in order for the round not to immediately end in midround antagonist
|
||||
config_entry_value = 0.7
|
||||
integer = FALSE
|
||||
min_val = 0
|
||||
max_val = 1
|
||||
|
||||
/datum/config_entry/number/shuttle_refuel_delay
|
||||
config_entry_value = 12000
|
||||
integer = FALSE
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/show_game_type_odds //if set this allows players to see the odds of each roundtype on the get revision screen
|
||||
|
||||
/datum/config_entry/keyed_list/roundstart_races //races you can play as from the get go.
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_FLAG
|
||||
@@ -388,10 +344,6 @@
|
||||
|
||||
/datum/config_entry/flag/shift_time_realtime
|
||||
|
||||
/datum/config_entry/keyed_list/antag_rep
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_NUM
|
||||
|
||||
/datum/config_entry/number/monkeycap
|
||||
config_entry_value = 64
|
||||
min_val = 0
|
||||
|
||||
@@ -59,13 +59,12 @@ SUBSYSTEM_DEF(events)
|
||||
if(!CONFIG_GET(flag/allow_random_events))
|
||||
return
|
||||
|
||||
var/gamemode = SSticker.mode.config_tag
|
||||
var/players_amt = get_active_player_count(alive_check = 1, afk_check = 1, human_check = 1)
|
||||
// Only alive, non-AFK human players count towards this.
|
||||
|
||||
var/sum_of_weights = 0
|
||||
for(var/datum/round_event_control/E in control)
|
||||
if(!E.canSpawnEvent(players_amt, gamemode))
|
||||
if(!E.canSpawnEvent(players_amt))
|
||||
continue
|
||||
if(E.weight < 0) //for round-start events etc.
|
||||
var/res = TriggerEvent(E)
|
||||
@@ -78,7 +77,7 @@ SUBSYSTEM_DEF(events)
|
||||
sum_of_weights = rand(0,sum_of_weights) //reusing this variable. It now represents the 'weight' we want to select
|
||||
|
||||
for(var/datum/round_event_control/E in control)
|
||||
if(!E.canSpawnEvent(players_amt, gamemode))
|
||||
if(!E.canSpawnEvent(players_amt))
|
||||
continue
|
||||
sum_of_weights -= E.weight
|
||||
|
||||
|
||||
@@ -218,7 +218,6 @@ SUBSYSTEM_DEF(job)
|
||||
if((player) && (player.mind))
|
||||
player.mind.assigned_role = null
|
||||
player.mind.special_role = null
|
||||
SSpersistence.antag_rep_change[player.ckey] = 0
|
||||
SetupOccupations()
|
||||
unassigned = list()
|
||||
return
|
||||
@@ -279,7 +278,7 @@ SUBSYSTEM_DEF(job)
|
||||
* fills var "assigned_role" for all ready players.
|
||||
* This proc must not have any side effect besides of modifying "assigned_role".
|
||||
**/
|
||||
/datum/controller/subsystem/job/proc/DivideOccupations(list/required_jobs)
|
||||
/datum/controller/subsystem/job/proc/DivideOccupations()
|
||||
//Setup new player list and get the jobs list
|
||||
JobDebug("Running DO")
|
||||
|
||||
@@ -299,8 +298,6 @@ SUBSYSTEM_DEF(job)
|
||||
initial_players_to_assign = unassigned.len
|
||||
|
||||
JobDebug("DO, Len: [unassigned.len]")
|
||||
if(unassigned.len == 0)
|
||||
return validate_required_jobs(required_jobs)
|
||||
|
||||
//Scale number of open security officer slots to population
|
||||
setup_officer_positions()
|
||||
@@ -410,25 +407,7 @@ SUBSYSTEM_DEF(job)
|
||||
if(!AssignRole(player, SSjob.overflow_role)) //If everything is already filled, make them an assistant
|
||||
return FALSE //Living on the edge, the forced antagonist couldn't be assigned to overflow role (bans, client age) - just reroll
|
||||
|
||||
return validate_required_jobs(required_jobs)
|
||||
|
||||
/datum/controller/subsystem/job/proc/validate_required_jobs(list/required_jobs)
|
||||
if(!required_jobs.len)
|
||||
return TRUE
|
||||
for(var/required_group in required_jobs)
|
||||
var/group_ok = TRUE
|
||||
for(var/rank in required_group)
|
||||
var/datum/job/J = GetJob(rank)
|
||||
if(!J)
|
||||
SSticker.mode.setup_error = "Invalid job [rank] in gamemode required jobs."
|
||||
return FALSE
|
||||
if(J.current_positions < required_group[rank])
|
||||
group_ok = FALSE
|
||||
break
|
||||
if(group_ok)
|
||||
return TRUE
|
||||
SSticker.mode.setup_error = "Required jobs not present."
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
//We couldn't find a job from prefs for this guy.
|
||||
/datum/controller/subsystem/job/proc/HandleUnassigned(mob/dead/new_player/player)
|
||||
@@ -519,8 +498,6 @@ SUBSYSTEM_DEF(job)
|
||||
else
|
||||
M = living_mob
|
||||
|
||||
SSpersistence.antag_rep_change[M.client.ckey] += job.GetAntagRep()
|
||||
|
||||
if(M.client.holder)
|
||||
if(CONFIG_GET(flag/auto_deadmin_players) || (M.client.prefs?.toggles & DEADMIN_ALWAYS))
|
||||
M.client.holder.auto_deadmin()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#define FILE_ANTAG_REP "data/AntagReputation.json"
|
||||
#define FILE_RECENT_MAPS "data/RecentMaps.json"
|
||||
|
||||
#define KEEP_ROUNDS_MAP 3
|
||||
@@ -14,8 +13,6 @@ SUBSYSTEM_DEF(persistence)
|
||||
var/list/saved_maps = list()
|
||||
var/list/blocked_maps = list()
|
||||
var/list/saved_trophies = list()
|
||||
var/list/antag_rep = list()
|
||||
var/list/antag_rep_change = list()
|
||||
var/list/picture_logging_information = list()
|
||||
var/list/obj/structure/sign/picture_frame/photo_frames
|
||||
var/list/obj/item/storage/photo_album/photo_albums
|
||||
@@ -26,11 +23,8 @@ SUBSYSTEM_DEF(persistence)
|
||||
LoadPoly()
|
||||
LoadChiselMessages()
|
||||
LoadTrophies()
|
||||
LoadRecentModes()
|
||||
LoadRecentMaps()
|
||||
LoadPhotoPersistence()
|
||||
if(CONFIG_GET(flag/use_antag_rep))
|
||||
LoadAntagReputation()
|
||||
LoadRandomizedRecipes()
|
||||
LoadPaintings()
|
||||
load_custom_outfits()
|
||||
@@ -107,15 +101,6 @@ SUBSYSTEM_DEF(persistence)
|
||||
saved_trophies = json["data"]
|
||||
SetUpTrophies(saved_trophies.Copy())
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/LoadRecentModes()
|
||||
var/json_file = file("data/RecentModes.json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
var/list/json = json_decode(file2text(json_file))
|
||||
if(!json)
|
||||
return
|
||||
saved_modes = json["data"]
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/LoadRecentMaps()
|
||||
var/map_sav = FILE_RECENT_MAPS
|
||||
if(!fexists(FILE_RECENT_MAPS))
|
||||
@@ -137,16 +122,6 @@ SUBSYSTEM_DEF(persistence)
|
||||
if(run >= 2) //If run twice in the last KEEP_ROUNDS_MAP + 1 (including current) rounds, disable map for voting and rotation.
|
||||
blocked_maps += VM.map_name
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/LoadAntagReputation()
|
||||
var/json = file2text(FILE_ANTAG_REP)
|
||||
if(!json)
|
||||
var/json_file = file(FILE_ANTAG_REP)
|
||||
if(!fexists(json_file))
|
||||
WARNING("Failed to load antag reputation. File likely corrupt.")
|
||||
return
|
||||
return
|
||||
antag_rep = json_decode(json)
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/SetUpTrophies(list/trophy_items)
|
||||
for(var/A in GLOB.trophy_cases)
|
||||
var/obj/structure/displaycase/trophy/T = A
|
||||
@@ -176,11 +151,8 @@ SUBSYSTEM_DEF(persistence)
|
||||
/datum/controller/subsystem/persistence/proc/CollectData()
|
||||
CollectChiselMessages()
|
||||
CollectTrophies()
|
||||
CollectRoundtype()
|
||||
CollectMaps()
|
||||
SavePhotoPersistence() //THIS IS PERSISTENCE, NOT THE LOGGING PORTION.
|
||||
if(CONFIG_GET(flag/use_antag_rep))
|
||||
CollectAntagReputation()
|
||||
SaveRandomizedRecipes()
|
||||
SavePaintings()
|
||||
SaveScars()
|
||||
@@ -297,16 +269,6 @@ SUBSYSTEM_DEF(persistence)
|
||||
data["placer_key"] = T.placer_key
|
||||
saved_trophies += list(data)
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/CollectRoundtype()
|
||||
saved_modes[3] = saved_modes[2]
|
||||
saved_modes[2] = saved_modes[1]
|
||||
saved_modes[1] = SSticker.mode.config_tag
|
||||
var/json_file = file("data/RecentModes.json")
|
||||
var/list/file_data = list()
|
||||
file_data["data"] = saved_modes
|
||||
fdel(json_file)
|
||||
WRITE_FILE(json_file, json_encode(file_data))
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/CollectMaps()
|
||||
if(length(saved_maps) > KEEP_ROUNDS_MAP) //Get rid of extras from old configs.
|
||||
saved_maps.Cut(KEEP_ROUNDS_MAP+1)
|
||||
@@ -322,21 +284,6 @@ SUBSYSTEM_DEF(persistence)
|
||||
fdel(json_file)
|
||||
WRITE_FILE(json_file, json_encode(file_data))
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/CollectAntagReputation()
|
||||
var/ANTAG_REP_MAXIMUM = CONFIG_GET(number/antag_rep_maximum)
|
||||
|
||||
for(var/p_ckey in antag_rep_change)
|
||||
// var/start = antag_rep[p_ckey]
|
||||
antag_rep[p_ckey] = max(0, min(antag_rep[p_ckey]+antag_rep_change[p_ckey], ANTAG_REP_MAXIMUM))
|
||||
|
||||
// WARNING("AR_DEBUG: [p_ckey]: Committed [antag_rep_change[p_ckey]] reputation, going from [start] to [antag_rep[p_ckey]]")
|
||||
|
||||
antag_rep_change = list()
|
||||
|
||||
fdel(FILE_ANTAG_REP)
|
||||
text2file(json_encode(antag_rep), FILE_ANTAG_REP)
|
||||
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/LoadRandomizedRecipes()
|
||||
var/json_file = file("data/RandomizedChemRecipes.json")
|
||||
var/json
|
||||
|
||||
@@ -325,7 +325,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
return 1
|
||||
|
||||
/datum/controller/subsystem/shuttle/proc/canRecall()
|
||||
if(!emergency || emergency.mode != SHUTTLE_CALL || adminEmergencyNoRecall || emergencyNoRecall || SSticker.mode.name == "meteor")
|
||||
if(!emergency || emergency.mode != SHUTTLE_CALL || adminEmergencyNoRecall || emergencyNoRecall)
|
||||
return
|
||||
var/security_num = seclevel2num(get_security_level())
|
||||
switch(security_num)
|
||||
|
||||
@@ -14,7 +14,6 @@ SUBSYSTEM_DEF(ticker)
|
||||
var/start_immediately = FALSE
|
||||
var/setup_done = FALSE //All game setup done including mode post setup and
|
||||
|
||||
var/hide_mode = FALSE
|
||||
var/datum/game_mode/mode = null
|
||||
|
||||
var/login_music //music played in pregame lobby
|
||||
@@ -66,8 +65,6 @@ SUBSYSTEM_DEF(ticker)
|
||||
var/emergency_reason
|
||||
|
||||
/datum/controller/subsystem/ticker/Initialize(timeofday)
|
||||
load_mode()
|
||||
|
||||
var/list/byond_sound_formats = list(
|
||||
"mid" = TRUE,
|
||||
"midi" = TRUE,
|
||||
@@ -213,50 +210,22 @@ SUBSYSTEM_DEF(ticker)
|
||||
/datum/controller/subsystem/ticker/proc/setup()
|
||||
to_chat(world, "<span class='boldannounce'>Starting game...</span>")
|
||||
var/init_start = world.timeofday
|
||||
//Create and announce mode
|
||||
var/list/datum/game_mode/runnable_modes
|
||||
if(GLOB.master_mode == "random" || GLOB.master_mode == "secret")
|
||||
runnable_modes = config.get_runnable_modes()
|
||||
|
||||
if(GLOB.master_mode == "secret")
|
||||
hide_mode = 1
|
||||
if(GLOB.secret_force_mode != "secret")
|
||||
var/datum/game_mode/smode = config.pick_mode(GLOB.secret_force_mode)
|
||||
if(!smode.can_start())
|
||||
message_admins("<span class='notice'>Unable to force secret [GLOB.secret_force_mode]. [smode.required_players] players and [smode.required_enemies] eligible antagonists needed.</span>")
|
||||
else
|
||||
mode = smode
|
||||
|
||||
if(!mode)
|
||||
if(!runnable_modes.len)
|
||||
to_chat(world, "<B>Unable to choose playable game mode.</B> Reverting to pre-game lobby.")
|
||||
return FALSE
|
||||
mode = pickweight(runnable_modes)
|
||||
if(!mode) //too few roundtypes all run too recently
|
||||
mode = pick(runnable_modes)
|
||||
|
||||
else
|
||||
mode = config.pick_mode(GLOB.master_mode)
|
||||
if(!mode.can_start())
|
||||
to_chat(world, "<B>Unable to start [mode.name].</B> Not enough players, [mode.required_players] players and [mode.required_enemies] eligible antagonists needed. Reverting to pre-game lobby.")
|
||||
qdel(mode)
|
||||
mode = null
|
||||
SSjob.ResetOccupations()
|
||||
return FALSE
|
||||
mode = new /datum/game_mode/dynamic
|
||||
|
||||
CHECK_TICK
|
||||
//Configure mode and assign player to special mode stuff
|
||||
var/can_continue = 0
|
||||
can_continue = src.mode.pre_setup() //Choose antagonists
|
||||
CHECK_TICK
|
||||
can_continue = can_continue && SSjob.DivideOccupations(mode.required_jobs) //Distribute jobs
|
||||
can_continue = can_continue && SSjob.DivideOccupations() //Distribute jobs
|
||||
CHECK_TICK
|
||||
|
||||
if(!GLOB.Debug2)
|
||||
if(!can_continue)
|
||||
log_game("[mode.name] failed pre_setup, cause: [mode.setup_error]")
|
||||
log_game("Game failed pre_setup")
|
||||
QDEL_NULL(mode)
|
||||
to_chat(world, "<B>Error setting up [GLOB.master_mode].</B> Reverting to pre-game lobby.")
|
||||
to_chat(world, "<B>Error setting up game.</B> Reverting to pre-game lobby.")
|
||||
SSjob.ResetOccupations()
|
||||
return FALSE
|
||||
else
|
||||
@@ -270,14 +239,6 @@ SUBSYSTEM_DEF(ticker)
|
||||
SSid_access.refresh_job_trim_singletons()
|
||||
|
||||
CHECK_TICK
|
||||
if(hide_mode)
|
||||
var/list/modes = new
|
||||
for (var/datum/game_mode/M in runnable_modes)
|
||||
modes += M.name
|
||||
modes = sortList(modes)
|
||||
to_chat(world, "<b>The gamemode is: secret!\nPossibilities:</B> [english_list(modes)]")
|
||||
else
|
||||
mode.announce()
|
||||
|
||||
if(!CONFIG_GET(flag/ooc_during_round))
|
||||
toggle_ooc(FALSE) // Turn it off
|
||||
@@ -325,7 +286,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
|
||||
var/list/adm = get_admin_counts()
|
||||
var/list/allmins = adm["present"]
|
||||
send2adminchat("Server", "Round [GLOB.round_id ? "#[GLOB.round_id]:" : "of"] [hide_mode ? "secret":"[mode.name]"] has started[allmins.len ? ".":" with no active admins online!"]")
|
||||
send2adminchat("Server", "Round [GLOB.round_id ? "#[GLOB.round_id]" : ""] has started[allmins.len ? ".":" with no active admins online!"]")
|
||||
setup_done = TRUE
|
||||
|
||||
for(var/i in GLOB.start_landmarks_list)
|
||||
@@ -552,7 +513,6 @@ SUBSYSTEM_DEF(ticker)
|
||||
/datum/controller/subsystem/ticker/Recover()
|
||||
current_state = SSticker.current_state
|
||||
force_ending = SSticker.force_ending
|
||||
hide_mode = SSticker.hide_mode
|
||||
mode = SSticker.mode
|
||||
|
||||
login_music = SSticker.login_music
|
||||
@@ -661,18 +621,6 @@ SUBSYSTEM_DEF(ticker)
|
||||
//Break chain since this has a sleep input in it
|
||||
addtimer(CALLBACK(player, /mob/dead/new_player.proc/make_me_an_observer), 1)
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/load_mode()
|
||||
var/mode = trim(file2text("data/mode.txt"))
|
||||
if(mode)
|
||||
GLOB.master_mode = mode
|
||||
else
|
||||
GLOB.master_mode = "extended"
|
||||
log_game("Saved mode is '[GLOB.master_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
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/SetRoundEndSound(the_sound)
|
||||
set waitfor = FALSE
|
||||
round_end_sound_sent = FALSE
|
||||
|
||||
Reference in New Issue
Block a user