diff --git a/code/__HELPERS/logging/dynamic.dm b/code/__HELPERS/logging/dynamic.dm new file mode 100644 index 00000000000..0f051b8d11c --- /dev/null +++ b/code/__HELPERS/logging/dynamic.dm @@ -0,0 +1,3 @@ +/// Logging for dynamic procs +/proc/log_dynamic(text) + WRITE_LOG(GLOB.dynamic_log, "DYNAMIC: [text]") diff --git a/code/_globalvars/logging.dm b/code/_globalvars/logging.dm index fd513b9b632..a88797fced1 100644 --- a/code/_globalvars/logging.dm +++ b/code/_globalvars/logging.dm @@ -1,105 +1,146 @@ -GLOBAL_VAR(log_directory) -GLOBAL_PROTECT(log_directory) -GLOBAL_VAR(world_game_log) -GLOBAL_PROTECT(world_game_log) -GLOBAL_VAR(world_silicon_log) -GLOBAL_PROTECT(world_silicon_log) -GLOBAL_VAR(world_tool_log) -GLOBAL_PROTECT(world_tool_log) -/// Log associated with [/proc/log_suspicious_login()] - Intended to hold all logins that failed due to suspicious circumstances such as ban detection, CID randomisation etc. -GLOBAL_VAR(world_suspicious_login_log) -GLOBAL_PROTECT(world_suspicious_login_log) -GLOBAL_VAR(world_runtime_log) -GLOBAL_PROTECT(world_runtime_log) -GLOBAL_VAR(world_qdel_log) -GLOBAL_PROTECT(world_qdel_log) -GLOBAL_VAR(world_attack_log) -GLOBAL_PROTECT(world_attack_log) -GLOBAL_VAR(world_econ_log) -GLOBAL_PROTECT(world_econ_log) -GLOBAL_VAR(world_href_log) -GLOBAL_PROTECT(world_href_log) -GLOBAL_VAR(world_mob_tag_log) -GLOBAL_PROTECT(world_mob_tag_log) -GLOBAL_VAR(round_id) -GLOBAL_PROTECT(round_id) +GLOBAL_LIST_EMPTY(active_turfs_startlist) + +GLOBAL_LIST_EMPTY(admin_log) +GLOBAL_PROTECT(admin_log) + +GLOBAL_LIST_EMPTY(adminlog) +GLOBAL_PROTECT(adminlog) + +GLOBAL_LIST_EMPTY(bombers) +GLOBAL_PROTECT(bombers) + +GLOBAL_LIST_EMPTY(combatlog) +GLOBAL_PROTECT(combatlog) + GLOBAL_VAR(config_error_log) GLOBAL_PROTECT(config_error_log) -GLOBAL_VAR(sql_error_log) -GLOBAL_PROTECT(sql_error_log) -GLOBAL_VAR(world_pda_log) -GLOBAL_PROTECT(world_pda_log) -GLOBAL_VAR(world_uplink_log) -GLOBAL_PROTECT(world_uplink_log) -GLOBAL_VAR(world_telecomms_log) -GLOBAL_PROTECT(world_telecomms_log) -GLOBAL_VAR(world_speech_indicators_log) -GLOBAL_PROTECT(world_speech_indicators_log) -GLOBAL_VAR(world_manifest_log) -GLOBAL_PROTECT(world_manifest_log) -GLOBAL_VAR(query_debug_log) -GLOBAL_PROTECT(query_debug_log) -GLOBAL_VAR(world_job_debug_log) -GLOBAL_PROTECT(world_job_debug_log) -GLOBAL_VAR(world_mecha_log) -GLOBAL_PROTECT(world_mecha_log) -GLOBAL_VAR(world_virus_log) -GLOBAL_PROTECT(world_virus_log) -GLOBAL_VAR(world_asset_log) -GLOBAL_PROTECT(world_asset_log) -GLOBAL_VAR(world_cloning_log) -GLOBAL_PROTECT(world_cloning_log) -GLOBAL_VAR(world_map_error_log) -GLOBAL_PROTECT(world_map_error_log) -GLOBAL_VAR(world_paper_log) -GLOBAL_PROTECT(world_paper_log) -GLOBAL_VAR(tgui_log) -GLOBAL_PROTECT(tgui_log) -GLOBAL_VAR(world_shuttle_log) -GLOBAL_PROTECT(world_shuttle_log) - -GLOBAL_VAR(filter_log) -GLOBAL_PROTECT(filter_log) - -GLOBAL_VAR(perf_log) -GLOBAL_PROTECT(perf_log) GLOBAL_VAR(demo_log) GLOBAL_PROTECT(demo_log) +GLOBAL_VAR(dynamic_log) +GLOBAL_PROTECT(dynamic_log) + +#ifdef REFERENCE_DOING_IT_LIVE +GLOBAL_LIST_EMPTY(harddel_log) +GLOBAL_PROTECT(harddel_log) +#endif + +GLOBAL_VAR(filter_log) +GLOBAL_PROTECT(filter_log) + +GLOBAL_LIST_EMPTY(IClog) +GLOBAL_PROTECT(IClog) + +/// Keeps last 100 signals here in format: "[src] used [REF(src)] @ location [src.loc]: [freq]/[code]" +GLOBAL_LIST_EMPTY(lastsignalers) +GLOBAL_PROTECT(lastsignalers) + +/// Stores who uploaded laws to which silicon-based lifeform, and what the law was +GLOBAL_LIST_EMPTY(lawchanges) +GLOBAL_PROTECT(lawchanges) + +GLOBAL_VAR(log_directory) +GLOBAL_PROTECT(log_directory) + GLOBAL_VAR(lua_log) GLOBAL_PROTECT(lua_log) -GLOBAL_LIST_EMPTY(bombers) -GLOBAL_PROTECT(bombers) -GLOBAL_LIST_EMPTY(admin_log) -GLOBAL_PROTECT(admin_log) -GLOBAL_LIST_EMPTY(lastsignalers) //keeps last 100 signals here in format: "[src] used [REF(src)] @ location [src.loc]: [freq]/[code]" -GLOBAL_PROTECT(lastsignalers) -GLOBAL_LIST_EMPTY(lawchanges) //Stores who uploaded laws to which silicon-based lifeform, and what the law was -GLOBAL_PROTECT(lawchanges) - -GLOBAL_LIST_EMPTY(combatlog) -GLOBAL_PROTECT(combatlog) -GLOBAL_LIST_EMPTY(IClog) -GLOBAL_PROTECT(IClog) GLOBAL_LIST_EMPTY(OOClog) GLOBAL_PROTECT(OOClog) -GLOBAL_LIST_EMPTY(adminlog) -GLOBAL_PROTECT(adminlog) -GLOBAL_LIST_EMPTY(active_turfs_startlist) +GLOBAL_VAR(perf_log) +GLOBAL_PROTECT(perf_log) -/////Picture logging +GLOBAL_VAR(query_debug_log) +GLOBAL_PROTECT(query_debug_log) + +/// Picture logging GLOBAL_VAR(picture_log_directory) GLOBAL_PROTECT(picture_log_directory) GLOBAL_VAR_INIT(picture_logging_id, 1) GLOBAL_PROTECT(picture_logging_id) + GLOBAL_VAR(picture_logging_prefix) GLOBAL_PROTECT(picture_logging_prefix) -///// -#ifdef REFERENCE_DOING_IT_LIVE -GLOBAL_LIST_EMPTY(harddel_log) -GLOBAL_PROTECT(harddel_log) -#endif + +GLOBAL_VAR(round_id) +GLOBAL_PROTECT(round_id) + +GLOBAL_VAR(sql_error_log) +GLOBAL_PROTECT(sql_error_log) + +GLOBAL_VAR(tgui_log) +GLOBAL_PROTECT(tgui_log) + +GLOBAL_VAR(world_asset_log) +GLOBAL_PROTECT(world_asset_log) + +GLOBAL_VAR(world_attack_log) +GLOBAL_PROTECT(world_attack_log) + +GLOBAL_VAR(world_cloning_log) +GLOBAL_PROTECT(world_cloning_log) + +GLOBAL_VAR(world_econ_log) +GLOBAL_PROTECT(world_econ_log) + +GLOBAL_VAR(world_game_log) +GLOBAL_PROTECT(world_game_log) + +GLOBAL_VAR(world_href_log) +GLOBAL_PROTECT(world_href_log) + +GLOBAL_VAR(world_job_debug_log) +GLOBAL_PROTECT(world_job_debug_log) + +GLOBAL_VAR(world_manifest_log) +GLOBAL_PROTECT(world_manifest_log) + +GLOBAL_VAR(world_map_error_log) +GLOBAL_PROTECT(world_map_error_log) + +GLOBAL_VAR(world_mecha_log) +GLOBAL_PROTECT(world_mecha_log) + +GLOBAL_VAR(world_mob_tag_log) +GLOBAL_PROTECT(world_mob_tag_log) + +GLOBAL_VAR(world_paper_log) +GLOBAL_PROTECT(world_paper_log) + +GLOBAL_VAR(world_pda_log) +GLOBAL_PROTECT(world_pda_log) + +GLOBAL_VAR(world_qdel_log) +GLOBAL_PROTECT(world_qdel_log) + +GLOBAL_VAR(world_runtime_log) +GLOBAL_PROTECT(world_runtime_log) + +GLOBAL_VAR(world_shuttle_log) +GLOBAL_PROTECT(world_shuttle_log) + +GLOBAL_VAR(world_silicon_log) +GLOBAL_PROTECT(world_silicon_log) + +GLOBAL_VAR(world_speech_indicators_log) +GLOBAL_PROTECT(world_speech_indicators_log) + +/// Log associated with [/proc/log_suspicious_login()] +/// Intended to hold all logins that failed due to suspicious circumstances such as ban detection, CID randomisation etc. +GLOBAL_VAR(world_suspicious_login_log) +GLOBAL_PROTECT(world_suspicious_login_log) + +GLOBAL_VAR(world_telecomms_log) +GLOBAL_PROTECT(world_telecomms_log) + +GLOBAL_VAR(world_tool_log) +GLOBAL_PROTECT(world_tool_log) + +GLOBAL_VAR(world_uplink_log) +GLOBAL_PROTECT(world_uplink_log) + +GLOBAL_VAR(world_virus_log) +GLOBAL_PROTECT(world_virus_log) diff --git a/code/game/gamemodes/dynamic/dynamic.dm b/code/game/gamemodes/dynamic/dynamic.dm index 6bfeb092696..f53d22631bb 100644 --- a/code/game/gamemodes/dynamic/dynamic.dm +++ b/code/game/gamemodes/dynamic/dynamic.dm @@ -379,16 +379,16 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) mid_round_budget = threat_level - round_start_budget /datum/game_mode/dynamic/proc/setup_parameters() - log_game("DYNAMIC: Dynamic mode parameters for the round:") - log_game("DYNAMIC: Centre is [threat_curve_centre], Width is [threat_curve_width], Forced extended is [GLOB.dynamic_forced_extended ? "Enabled" : "Disabled"], No stacking is [GLOB.dynamic_no_stacking ? "Enabled" : "Disabled"].") - log_game("DYNAMIC: Stacking limit is [GLOB.dynamic_stacking_limit].") + log_dynamic("Dynamic mode parameters for the round:") + log_dynamic("Centre is [threat_curve_centre], Width is [threat_curve_width], Forced extended is [GLOB.dynamic_forced_extended ? "Enabled" : "Disabled"], No stacking is [GLOB.dynamic_no_stacking ? "Enabled" : "Disabled"].") + log_dynamic("Stacking limit is [GLOB.dynamic_stacking_limit].") if(GLOB.dynamic_forced_threat_level >= 0) threat_level = round(GLOB.dynamic_forced_threat_level, 0.1) else generate_threat() generate_budgets() set_cooldowns() - log_game("DYNAMIC: Dynamic Mode initialized with a Threat Level of... [threat_level]! ([round_start_budget] round start budget)") + log_dynamic("Dynamic Mode initialized with a Threat Level of... [threat_level]! ([round_start_budget] round start budget)") return TRUE /datum/game_mode/dynamic/proc/setup_shown_threat() @@ -427,9 +427,9 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) if(player.ready == PLAYER_READY_TO_PLAY && player.mind && player.check_preferences()) roundstart_pop_ready++ candidates.Add(player) - log_game("DYNAMIC: Listing [roundstart_rules.len] round start rulesets, and [candidates.len] players ready.") + log_dynamic("Listing [roundstart_rules.len] round start rulesets, and [candidates.len] players ready.") if (candidates.len <= 0) - log_game("DYNAMIC: [candidates.len] candidates.") + log_dynamic("[candidates.len] candidates.") return TRUE if(GLOB.dynamic_forced_roundstart_ruleset.len > 0) @@ -437,14 +437,14 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) else roundstart(roundstart_rules) - log_game("DYNAMIC: [round_start_budget] round start budget was left, donating it to midrounds.") + log_dynamic("[round_start_budget] round start budget was left, donating it to midrounds.") threat_log += "[worldtime2text()]: [round_start_budget] round start budget was left, donating it to midrounds." mid_round_budget += round_start_budget var/starting_rulesets = "" for (var/datum/dynamic_ruleset/roundstart/DR in executed_rules) starting_rulesets += "[DR.name], " - log_game("DYNAMIC: Picked the following roundstart rules: [starting_rulesets]") + log_dynamic("Picked the following roundstart rules: [starting_rulesets]") candidates.Cut() return TRUE @@ -489,11 +489,11 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) /// A simple roundstart proc used when dynamic_forced_roundstart_ruleset has rules in it. /datum/game_mode/dynamic/proc/rigged_roundstart() message_admins("[GLOB.dynamic_forced_roundstart_ruleset.len] rulesets being forced. Will now attempt to draft players for them.") - log_game("DYNAMIC: [GLOB.dynamic_forced_roundstart_ruleset.len] rulesets being forced. Will now attempt to draft players for them.") + log_dynamic("[GLOB.dynamic_forced_roundstart_ruleset.len] rulesets being forced. Will now attempt to draft players for them.") for (var/datum/dynamic_ruleset/roundstart/rule in GLOB.dynamic_forced_roundstart_ruleset) configure_ruleset(rule) message_admins("Drafting players for forced ruleset [rule.name].") - log_game("DYNAMIC: Drafting players for forced ruleset [rule.name].") + log_dynamic("Drafting players for forced ruleset [rule.name].") rule.mode = src rule.acceptable(roundstart_pop_ready, threat_level) // Assigns some vars in the modes, running it here for consistency rule.candidates = candidates.Copy() @@ -509,7 +509,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) /datum/game_mode/dynamic/proc/roundstart(list/roundstart_rules) if (GLOB.dynamic_forced_extended) - log_game("DYNAMIC: Starting a round of forced extended.") + log_dynamic("Starting a round of forced extended.") return TRUE var/list/drafted_rules = list() for (var/datum/dynamic_ruleset/roundstart/rule in roundstart_rules) @@ -529,7 +529,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) while (round_start_budget_left > 0) var/datum/dynamic_ruleset/roundstart/ruleset = pick_weight(drafted_rules) if (isnull(ruleset)) - log_game("DYNAMIC: No more rules can be applied, stopping with [round_start_budget] left.") + log_dynamic("No more rules can be applied, stopping with [round_start_budget] left.") break var/cost = (ruleset in rulesets_picked) ? ruleset.scaling_cost : ruleset.cost @@ -566,7 +566,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) /// Initializes the round start ruleset provided to it. Returns how much threat to spend. /datum/game_mode/dynamic/proc/picking_roundstart_rule(datum/dynamic_ruleset/roundstart/ruleset, scaled_times = 0, forced = FALSE) - log_game("DYNAMIC: Picked a ruleset: [ruleset.name], scaled [scaled_times] times") + log_dynamic("Picked a ruleset: [ruleset.name], scaled [scaled_times] times") ruleset.trim_candidates() var/added_threat = ruleset.scale_up(roundstart_pop_ready, scaled_times) @@ -634,13 +634,13 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) high_impact_ruleset_executed = TRUE else if(new_rule.flags & ONLY_RULESET) only_ruleset_executed = TRUE - log_game("DYNAMIC: Making a call to a specific ruleset...[new_rule.name]!") + log_dynamic("Making a call to a specific ruleset...[new_rule.name]!") executed_rules += new_rule if (new_rule.persistent) current_rules += new_rule return TRUE else if (forced) - log_game("DYNAMIC: The ruleset [new_rule.name] couldn't be executed due to lack of elligible players.") + log_dynamic("The ruleset [new_rule.name] couldn't be executed due to lack of elligible players.") return FALSE /datum/game_mode/dynamic/process() @@ -664,7 +664,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) for(var/_executed in rule_list) var/datum/executed = _executed if(blocking == executed.type) - log_game("DYNAMIC: FAIL: check_blocking - [blocking] conflicts with [executed.type]") + log_dynamic("FAIL: check_blocking - [blocking] conflicts with [executed.type]") return TRUE return FALSE @@ -677,7 +677,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) if (forced_latejoin_rule) forced_latejoin_rule.candidates = list(newPlayer) forced_latejoin_rule.trim_candidates() - log_game("DYNAMIC: Forcing ruleset [forced_latejoin_rule]") + log_dynamic("Forcing ruleset [forced_latejoin_rule]") if (forced_latejoin_rule.ready(TRUE)) if (!forced_latejoin_rule.repeatable) latejoin_rules = remove_from_list(latejoin_rules, forced_latejoin_rule.type) @@ -789,7 +789,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) /// Log to messages and to the game /datum/game_mode/dynamic/proc/dynamic_log(text) message_admins("DYNAMIC: [text]") - log_game("DYNAMIC: [text]") + log_dynamic("[text]") #undef FAKE_REPORT_CHANCE #undef FAKE_GREENSHIFT_FORM_CHANCE diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm index 73c9492c8f4..39a50acb0fc 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm @@ -40,7 +40,7 @@ var/threat = round(mode.threat_level/10) if (job_check < required_enemies[threat]) - log_game("DYNAMIC: FAIL: [src] is not ready, because there are not enough enemies: [required_enemies[threat]] needed, [job_check] found") + log_dynamic("FAIL: [src] is not ready, because there are not enough enemies: [required_enemies[threat]] needed, [job_check] found") return FALSE return ..() @@ -158,8 +158,8 @@ SSshuttle.registerHostileEnvironment(revolution) return TRUE else - log_game("DYNAMIC: [ruletype] [name] discarded [M.name] from head revolutionary due to ineligibility.") - log_game("DYNAMIC: [ruletype] [name] failed to get any eligible headrevs. Refunding [cost] threat.") + log_dynamic("[ruletype] [name] discarded [M.name] from head revolutionary due to ineligibility.") + log_dynamic("[ruletype] [name] failed to get any eligible headrevs. Refunding [cost] threat.") return FALSE /datum/dynamic_ruleset/latejoin/provocateur/rule_process() diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm index 2427dae10a3..0eaf01665be 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm @@ -37,7 +37,7 @@ if (required_candidates <= dead_count) return TRUE - log_game("DYNAMIC: FAIL: [src], a from_ghosts ruleset, did not have enough dead candidates: [required_candidates] needed, [dead_count] found") + log_dynamic("FAIL: [src], a from_ghosts ruleset, did not have enough dead candidates: [required_candidates] needed, [dead_count] found") return FALSE @@ -105,7 +105,7 @@ var/threat = round(mode.threat_level/10) if (job_check < required_enemies[threat]) - log_game("DYNAMIC: FAIL: [src] is not ready, because there are not enough enemies: [required_enemies[threat]] needed, [job_check] found") + log_dynamic("FAIL: [src] is not ready, because there are not enough enemies: [required_enemies[threat]] needed, [job_check] found") return FALSE return TRUE @@ -126,7 +126,7 @@ message_admins("Possible volunteers was 0. This shouldn't appear, because of ready(), unless you forced it!") return message_admins("Polling [possible_volunteers.len] players to apply for the [name] ruleset.") - log_game("DYNAMIC: Polling [possible_volunteers.len] players to apply for the [name] ruleset.") + log_dynamic("Polling [possible_volunteers.len] players to apply for the [name] ruleset.") candidates = poll_ghost_candidates("The mode is looking for volunteers to become [antag_flag] for [name]", antag_flag_override, antag_flag || antag_flag_override, poll_time = 300) @@ -137,7 +137,7 @@ return message_admins("[candidates.len] players volunteered for the ruleset [name].") - log_game("DYNAMIC: [candidates.len] players volunteered for [name].") + log_dynamic("[candidates.len] players volunteered for [name].") review_applications() /// Here is where you can check if your ghost applicants are valid for the ruleset. @@ -240,7 +240,7 @@ /datum/dynamic_ruleset/midround/autotraitor/ready(forced = FALSE) if (required_candidates > living_players.len) - log_game("DYNAMIC: FAIL: [src] does not have enough candidates, using living_players ([required_candidates] needed, [living_players.len] found)") + log_dynamic("FAIL: [src] does not have enough candidates, using living_players ([required_candidates] needed, [living_players.len] found)") return FALSE return ..() @@ -251,7 +251,7 @@ var/datum/antagonist/traitor/newTraitor = new M.mind.add_antag_datum(newTraitor) message_admins("[ADMIN_LOOKUPFLW(M)] was selected by the [name] ruleset and has been made into a midround traitor.") - log_game("DYNAMIC: [key_name(M)] was selected by the [name] ruleset and has been made into a midround traitor.") + log_dynamic("[key_name(M)] was selected by the [name] ruleset and has been made into a midround traitor.") return TRUE @@ -539,7 +539,7 @@ new_xeno.key = applicant.key new_xeno.move_into_vent(vent) message_admins("[ADMIN_LOOKUPFLW(new_xeno)] has been made into an alien by the midround ruleset.") - log_game("DYNAMIC: [key_name(new_xeno)] was spawned as an alien by the midround ruleset.") + log_dynamic("[key_name(new_xeno)] was spawned as an alien by the midround ruleset.") return new_xeno ////////////////////////////////////////////// @@ -591,7 +591,7 @@ playsound(S, 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1) message_admins("[ADMIN_LOOKUPFLW(S)] has been made into a Nightmare by the midround ruleset.") - log_game("DYNAMIC: [key_name(S)] was spawned as a Nightmare by the midround ruleset.") + log_dynamic("[key_name(S)] was spawned as a Nightmare by the midround ruleset.") return S ////////////////////////////////////////////// @@ -640,7 +640,7 @@ playsound(S, 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1) message_admins("[ADMIN_LOOKUPFLW(S)] has been made into a Space Dragon by the midround ruleset.") - log_game("DYNAMIC: [key_name(S)] was spawned as a Space Dragon by the midround ruleset.") + log_dynamic("[key_name(S)] was spawned as a Space Dragon by the midround ruleset.") priority_announce("A large organic energy flux has been recorded near of [station_name()], please stand-by.", "Lifesign Alert") return S @@ -731,7 +731,7 @@ ninja.mind.add_antag_datum(/datum/antagonist/ninja) message_admins("[ADMIN_LOOKUPFLW(ninja)] has been made into a Space Ninja by the midround ruleset.") - log_game("DYNAMIC: [key_name(ninja)] was spawned as a Space Ninja by the midround ruleset.") + log_dynamic("[key_name(ninja)] was spawned as a Space Ninja by the midround ruleset.") return ninja ////////////////////////////////////////////// diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm index 2d8f43f1f6b..3e47a2f2083 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm @@ -67,7 +67,7 @@ // If we're not forced, we're going to make sure we can actually have an AI in this shift, if(!forced && min(ai_job.total_positions - ai_job.current_positions, ai_job.spawn_positions) <= 0) - log_game("DYNAMIC: FAIL: [src] could not run, because there is nobody who wants to be an AI") + log_dynamic("FAIL: [src] could not run, because there is nobody who wants to be an AI") return FALSE return ..() @@ -523,13 +523,13 @@ M.add_antag_datum(new_head,revolution) else assigned -= M - log_game("DYNAMIC: [ruletype] [name] discarded [M.name] from head revolutionary due to ineligibility.") + log_dynamic("[ruletype] [name] discarded [M.name] from head revolutionary due to ineligibility.") if(revolution.members.len) revolution.update_objectives() revolution.update_heads() SSshuttle.registerHostileEnvironment(revolution) return TRUE - log_game("DYNAMIC: [ruletype] [name] failed to get any eligible headrevs. Refunding [cost] threat.") + log_dynamic("[ruletype] [name] failed to get any eligible headrevs. Refunding [cost] threat.") return FALSE /datum/dynamic_ruleset/roundstart/revs/clean_up() diff --git a/code/game/gamemodes/dynamic/ruleset_picking.dm b/code/game/gamemodes/dynamic/ruleset_picking.dm index 21d0ab78d40..cb61a8b7fab 100644 --- a/code/game/gamemodes/dynamic/ruleset_picking.dm +++ b/code/game/gamemodes/dynamic/ruleset_picking.dm @@ -4,7 +4,7 @@ /// Mutates the list that is passed into it to remove invalid rules. /datum/game_mode/dynamic/proc/pick_ruleset(list/drafted_rules) if (only_ruleset_executed) - log_game("DYNAMIC: FAIL: only_ruleset_executed") + log_dynamic("FAIL: only_ruleset_executed") return null while (TRUE) @@ -14,7 +14,7 @@ for (var/leftover_rule in drafted_rules) leftover_rules += "[leftover_rule]" - log_game("DYNAMIC: FAIL: No rulesets left to pick. Leftover rules: [leftover_rules.Join(", ")]") + log_dynamic("FAIL: No rulesets left to pick. Leftover rules: [leftover_rules.Join(", ")]") return null @@ -29,7 +29,7 @@ && GLOB.dynamic_no_stacking \ && high_impact_ruleset_executed \ ) - log_game("DYNAMIC: FAIL: [rule] can't execute as a high impact ruleset was already executed.") + log_dynamic("FAIL: [rule] can't execute as a high impact ruleset was already executed.") drafted_rules -= rule if(drafted_rules.len <= 0) return null @@ -39,7 +39,7 @@ /// Executes a random midround ruleset from the list of drafted rules. /datum/game_mode/dynamic/proc/pick_midround_rule(list/drafted_rules, description) - log_game("DYNAMIC: Rolling [drafted_rules.len] [description]") + log_dynamic("Rolling [drafted_rules.len] [description]") var/datum/dynamic_ruleset/rule = pick_ruleset(drafted_rules) if (isnull(rule)) @@ -53,7 +53,7 @@ TIMER_STOPPABLE, \ ) - log_game("DYNAMIC: [rule] ruleset executing...") + log_dynamic("[rule] ruleset executing...") message_admins("DYNAMIC: Executing midround ruleset [rule] in [DisplayTimeText(ADMIN_CANCEL_MIDROUND_TIME)]. \ CANCEL | \ SOMETHING ELSE") @@ -84,7 +84,7 @@ spend_midround_budget(rule.cost, threat_log, "[worldtime2text()]: [rule.ruletype] [rule.name]") rule.pre_execute(GLOB.alive_player_list.len) if (rule.execute()) - log_game("DYNAMIC: Injected a [rule.ruletype == "latejoin" ? "latejoin" : "midround"] ruleset [rule.name].") + log_dynamic("Injected a [rule.ruletype == "latejoin" ? "latejoin" : "midround"] ruleset [rule.name].") if(rule.flags & HIGH_IMPACT_RULESET) high_impact_ruleset_executed = TRUE else if(rule.flags & ONLY_RULESET) @@ -92,7 +92,7 @@ if(rule.ruletype == "Latejoin") var/mob/M = pick(rule.candidates) message_admins("[key_name(M)] joined the station, and was selected by the [rule.name] ruleset.") - log_game("DYNAMIC: [key_name(M)] joined the station, and was selected by the [rule.name] ruleset.") + log_dynamic("[key_name(M)] joined the station, and was selected by the [rule.name] ruleset.") executed_rules += rule rule.candidates.Cut() if (rule.persistent) diff --git a/code/game/world.dm b/code/game/world.dm index 8a10446469b..43ac283e8ce 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -129,38 +129,37 @@ GLOBAL_VAR(restart_counter) GLOB.picture_logging_prefix = "O_[override_dir]_" GLOB.picture_log_directory = "data/picture_logs/[override_dir]" - GLOB.world_game_log = "[GLOB.log_directory]/game.log" - GLOB.world_silicon_log = "[GLOB.log_directory]/silicon.log" - GLOB.world_tool_log = "[GLOB.log_directory]/tools.log" - GLOB.world_suspicious_login_log = "[GLOB.log_directory]/suspicious_logins.log" - GLOB.world_mecha_log = "[GLOB.log_directory]/mecha.log" - GLOB.world_virus_log = "[GLOB.log_directory]/virus.log" - GLOB.world_cloning_log = "[GLOB.log_directory]/cloning.log" + GLOB.demo_log = "[GLOB.log_directory]/demo.log" + GLOB.dynamic_log = "[GLOB.log_directory]/dynamic.log" + GLOB.filter_log = "[GLOB.log_directory]/filters.log" + GLOB.sql_error_log = "[GLOB.log_directory]/sql.log" + GLOB.query_debug_log = "[GLOB.log_directory]/query_debug.log" + GLOB.tgui_log = "[GLOB.log_directory]/tgui.log" GLOB.world_asset_log = "[GLOB.log_directory]/asset.log" GLOB.world_attack_log = "[GLOB.log_directory]/attack.log" + GLOB.world_cloning_log = "[GLOB.log_directory]/cloning.log" GLOB.world_econ_log = "[GLOB.log_directory]/econ.log" - GLOB.world_pda_log = "[GLOB.log_directory]/pda.log" - GLOB.world_uplink_log = "[GLOB.log_directory]/uplink.log" - GLOB.world_telecomms_log = "[GLOB.log_directory]/telecomms.log" - GLOB.world_speech_indicators_log = "[GLOB.log_directory]/speech_indicators.log" - GLOB.world_manifest_log = "[GLOB.log_directory]/manifest.log" + GLOB.world_game_log = "[GLOB.log_directory]/game.log" GLOB.world_href_log = "[GLOB.log_directory]/hrefs.log" - GLOB.world_mob_tag_log = "[GLOB.log_directory]/mob_tags.log" - GLOB.sql_error_log = "[GLOB.log_directory]/sql.log" - GLOB.world_qdel_log = "[GLOB.log_directory]/qdel.log" - GLOB.world_map_error_log = "[GLOB.log_directory]/map_errors.log" - GLOB.world_runtime_log = "[GLOB.log_directory]/runtime.log" - GLOB.query_debug_log = "[GLOB.log_directory]/query_debug.log" GLOB.world_job_debug_log = "[GLOB.log_directory]/job_debug.log" + GLOB.world_manifest_log = "[GLOB.log_directory]/manifest.log" + GLOB.world_map_error_log = "[GLOB.log_directory]/map_errors.log" + GLOB.world_mecha_log = "[GLOB.log_directory]/mecha.log" + GLOB.world_mob_tag_log = "[GLOB.log_directory]/mob_tags.log" + GLOB.world_qdel_log = "[GLOB.log_directory]/qdel.log" GLOB.world_paper_log = "[GLOB.log_directory]/paper.log" - GLOB.tgui_log = "[GLOB.log_directory]/tgui.log" + GLOB.world_pda_log = "[GLOB.log_directory]/pda.log" + GLOB.world_runtime_log = "[GLOB.log_directory]/runtime.log" GLOB.world_shuttle_log = "[GLOB.log_directory]/shuttle.log" - GLOB.filter_log = "[GLOB.log_directory]/filters.log" + GLOB.world_silicon_log = "[GLOB.log_directory]/silicon.log" + GLOB.world_speech_indicators_log = "[GLOB.log_directory]/speech_indicators.log" + GLOB.world_suspicious_login_log = "[GLOB.log_directory]/suspicious_logins.log" + GLOB.world_telecomms_log = "[GLOB.log_directory]/telecomms.log" + GLOB.world_tool_log = "[GLOB.log_directory]/tools.log" + GLOB.world_uplink_log = "[GLOB.log_directory]/uplink.log" + GLOB.world_virus_log = "[GLOB.log_directory]/virus.log" GLOB.character_creation_log = "[GLOB.log_directory]/creator.log" // SKYRAT EDIT ADDITION - - GLOB.demo_log = "[GLOB.log_directory]/demo.log" - GLOB.event_vote_log = "[GLOB.log_directory]/event_vote.log" // SKYRAT EDIT ADDITION GLOB.lua_log = "[GLOB.log_directory]/lua.log" @@ -169,24 +168,26 @@ GLOBAL_VAR(restart_counter) GLOB.test_log = "[GLOB.log_directory]/tests.log" start_log(GLOB.test_log) #endif + #ifdef REFERENCE_DOING_IT_LIVE GLOB.harddel_log = "[GLOB.log_directory]/harddels.log" start_log(GLOB.harddel_log) #endif - start_log(GLOB.world_game_log) + start_log(GLOB.tgui_log) start_log(GLOB.world_attack_log) start_log(GLOB.world_econ_log) - start_log(GLOB.world_pda_log) - start_log(GLOB.world_uplink_log) - start_log(GLOB.world_telecomms_log) - start_log(GLOB.world_manifest_log) + start_log(GLOB.world_game_log) start_log(GLOB.world_href_log) + start_log(GLOB.world_job_debug_log) + start_log(GLOB.world_manifest_log) start_log(GLOB.world_mob_tag_log) start_log(GLOB.world_qdel_log) start_log(GLOB.world_runtime_log) - start_log(GLOB.world_job_debug_log) - start_log(GLOB.tgui_log) start_log(GLOB.world_shuttle_log) + start_log(GLOB.world_telecomms_log) + start_log(GLOB.world_uplink_log) + start_log(GLOB.world_pda_log) + // SKYRAT EDIT ADDITION start_log(GLOB.event_vote_log) start_log(GLOB.character_creation_log) diff --git a/tgstation.dme b/tgstation.dme index e8d9ae810c9..ddfdcc8421a 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -417,6 +417,7 @@ #include "code\__HELPERS\logging\atmos.dm" #include "code\__HELPERS\logging\attack.dm" #include "code\__HELPERS\logging\debug.dm" +#include "code\__HELPERS\logging\dynamic.dm" #include "code\__HELPERS\logging\economy.dm" #include "code\__HELPERS\logging\game.dm" #include "code\__HELPERS\logging\manifest.dm"