diff --git a/archive/maps/gateway_archive_vr/labyrinth.dm b/archive/maps/gateway_archive_vr/labyrinth.dm
index af85d754bc..26b4e92108 100644
--- a/archive/maps/gateway_archive_vr/labyrinth.dm
+++ b/archive/maps/gateway_archive_vr/labyrinth.dm
@@ -184,7 +184,7 @@
else
M.make_jittery(500)
chassis.use_power(energy_drain)
- log_message("Honked from [src.name]. HONK!")
+ src.log_message("Honked from [src.name]. HONK!")
do_after_cooldown()
return
diff --git a/archive/maps/southern_cross/events/wildlife_encounter.dm b/archive/maps/southern_cross/events/wildlife_encounter.dm
index 04d7c10e01..267107d03a 100644
--- a/archive/maps/southern_cross/events/wildlife_encounter.dm
+++ b/archive/maps/southern_cross/events/wildlife_encounter.dm
@@ -20,7 +20,7 @@
/datum/event2/event/wildlife_encounter/set_up()
for(var/mob/living/L in GLOB.player_list)
//if(!(L.z in get_location_z_levels()))
- // log_debug("Not on the right z-level")
+ // log_mapping("Not on the right z-level")
// continue // Not on the right z-level.
if(L.stat)
continue // Don't want dead people.
@@ -34,7 +34,7 @@
/datum/event2/event/wildlife_encounter/start()
if(!victim)
- log_debug("Failed to find a target for random encounter. Aborting.")
+ log_game("Failed to find a target for random encounter. Aborting.")
abort()
return
@@ -60,19 +60,19 @@
for(var/i = 1 to potential_victims.len)
if (get_dist(spawning_turf, potential_victims[i]) < world.view)
spawning_turf = null
- log_debug("Failed to locate position out of sight of [potential_victims[i]].")
+ log_game("Failed to locate position out of sight of [potential_victims[i]].")
attempts++
potential_victims = null
- log_debug("Sending [number_of_packs] [build_path]\s after \the [victim].")
+ log_game("Sending [number_of_packs] [build_path]\s after \the [victim].")
for(var/i = 1 to number_of_packs)
if(spawning_turf)
var/mob/living/simple_mob/M = new build_path(spawning_turf)
M.ai_holder?.give_destination(get_turf(victim))
else
- log_debug("Failed to locate turf to spawn encounter.")
+ log_game("Failed to locate turf to spawn encounter.")
/datum/event2/event/wildlife_encounter/proc/item_to_spawn()
return pick(prob(22);/mob/living/simple_mob/animal/sif/savik,
diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm
index 09ae869916..cc4f9ac491 100644
--- a/code/ZAS/Fire.dm
+++ b/code/ZAS/Fire.dm
@@ -226,8 +226,8 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin
if((temperature > PHORON_MINIMUM_BURN_TEMPERATURE || force_burn) && (no_check ||check_recombustability(zone? zone.fuel_objs : null)))
#ifdef FIREDBG
- log_debug("***************** FIREDBG *****************")
- log_debug("Burning [zone? zone.name : "zoneless gas_mixture"]!")
+ log_world("***************** FIREDBG *****************")
+ log_world("Burning [zone? zone.name : "zoneless gas_mixture"]!")
#endif
var/gas_fuel = 0
@@ -280,13 +280,13 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin
var/used_oxidizers = used_fuel*(FIRE_REACTION_OXIDIZER_AMOUNT/FIRE_REACTION_FUEL_AMOUNT)
#ifdef FIREDBG
- log_debug("gas_fuel = [gas_fuel], liquid_fuel = [liquid_fuel], total_oxidizers = [total_oxidizers]")
- log_debug("fuel_area = [fuel_area], total_fuel = [total_fuel], reaction_limit = [reaction_limit]")
- log_debug("firelevel -> [firelevel] (gas: [gas_firelevel], liquid: [liquid_firelevel])")
- log_debug("liquid_reaction_progress = [liquid_reaction_progress]")
- log_debug("gas_reaction_progress = [gas_reaction_progress]")
- log_debug("total_reaction_progress = [total_reaction_progress]")
- log_debug("used_fuel = [used_fuel], used_oxidizers = [used_oxidizers]; ")
+ log_world("gas_fuel = [gas_fuel], liquid_fuel = [liquid_fuel], total_oxidizers = [total_oxidizers]")
+ log_world("fuel_area = [fuel_area], total_fuel = [total_fuel], reaction_limit = [reaction_limit]")
+ log_world("firelevel -> [firelevel] (gas: [gas_firelevel], liquid: [liquid_firelevel])")
+ log_world("liquid_reaction_progress = [liquid_reaction_progress]")
+ log_world("gas_reaction_progress = [gas_reaction_progress]")
+ log_world("total_reaction_progress = [total_reaction_progress]")
+ log_world("used_fuel = [used_fuel], used_oxidizers = [used_oxidizers]; ")
#endif
//if the reaction is progressing too slow then it isn't self-sustaining anymore and burns out
@@ -315,8 +315,8 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin
update_values()
#ifdef FIREDBG
- log_debug("used_gas_fuel = [used_gas_fuel]; used_liquid_fuel = [used_liquid_fuel]; total = [used_fuel]")
- log_debug("new temperature = [temperature]; new pressure = [return_pressure()]")
+ log_world("used_gas_fuel = [used_gas_fuel]; used_liquid_fuel = [used_liquid_fuel]; total = [used_fuel]")
+ log_world("new temperature = [temperature]; new pressure = [return_pressure()]")
#endif
return firelevel
diff --git a/code/ZAS/Variable Settings.dm b/code/ZAS/Variable Settings.dm
index 015396c24a..7c46e4572b 100644
--- a/code/ZAS/Variable Settings.dm
+++ b/code/ZAS/Variable Settings.dm
@@ -170,7 +170,7 @@ var/global/vs_control/vsc = new
vars[ch] = vw
if(how == "Toggle")
newvar = (newvar?"ON":"OFF")
- to_world(span_world(span_blue("[key_name(user)] changed the setting [display_description] to [newvar].")))
+ to_chat(world, span_world(span_blue("[key_name(user)] changed the setting [display_description] to [newvar].")))
if(ch in plc.settings)
ChangeSettingsDialog(user,plc.settings)
else
@@ -323,7 +323,7 @@ var/global/vs_control/vsc = new
plc.N2O_HALLUCINATION = initial(plc.N2O_HALLUCINATION)
- to_world(span_world(span_blue("[key_name(user)] changed the global phoron/ZAS settings to \"[def]\"")))
+ to_chat(world, span_world(span_blue("[key_name(user)] changed the global phoron/ZAS settings to \"[def]\"")))
/pl_control/var/list/settings = list()
diff --git a/code/__defines/_flags.dm b/code/__defines/_flags.dm
new file mode 100644
index 0000000000..4bd4edcca7
--- /dev/null
+++ b/code/__defines/_flags.dm
@@ -0,0 +1,2 @@
+/// 33554431 (2^24 - 1) is the maximum value our bitflags can reach.
+#define MAX_BITFLAG_DIGITS 8
diff --git a/code/__defines/_helpers.dm b/code/__defines/_helpers.dm
index b7cf727299..85dd40153b 100644
--- a/code/__defines/_helpers.dm
+++ b/code/__defines/_helpers.dm
@@ -13,6 +13,17 @@
/// The Y/Height dimension of ICON_SIZE. This will more than likely be the smaller axis.
#define ICON_SIZE_Y 32
+//Returns the hex value of a decimal number
+//len == length of returned string
+#define num2hex(X, len) num2text(X, len, 16)
+
+//Returns an integer given a hex input, supports negative values "-ff"
+//skips preceding invalid characters
+#define hex2num(X) text2num(X, 16)
+
+/// Until a condition is true, sleep
+#define UNTIL(X) while(!(X)) stoplag()
+
/// Takes a datum as input, returns its ref string
#define text_ref(datum) ref(datum)
@@ -24,3 +35,6 @@
/// A null statement to guard against EmptyBlock lint without necessitating the use of pass()
/// Used to avoid proc-call overhead. But use sparingly. Probably pointless in most places.
#define EMPTY_BLOCK_GUARD ;
+
+/// Abstraction over using mob.client to just check if there's a connected player.
+#define HAS_CONNECTED_PLAYER(mob) (mob.client)
diff --git a/code/__defines/_tick.dm b/code/__defines/_tick.dm
index 5c7b2a3a86..9fc9aa96cc 100644
--- a/code/__defines/_tick.dm
+++ b/code/__defines/_tick.dm
@@ -28,5 +28,3 @@
#define TICK_CHECK_HIGH_PRIORITY ( TICK_USAGE > 95 )
/// runs stoplag if tick_usage is above 95, for high priority usage
#define CHECK_TICK_HIGH_PRIORITY ( TICK_CHECK_HIGH_PRIORITY? stoplag() : 0 )
-
-#define UNTIL(X) while(!(X)) stoplag()
diff --git a/code/__defines/logging.dm b/code/__defines/logging.dm
index 3b64f81c74..f87ab3f428 100644
--- a/code/__defines/logging.dm
+++ b/code/__defines/logging.dm
@@ -1,5 +1,133 @@
+/// The number of entries to store per category, don't make this too large or you'll start to see performance issues
+#define CONFIG_MAX_CACHED_LOG_ENTRIES 1000
+
+/// The number of *minimum* ticks between each log re-render, making this small will cause performance issues
+/// Admins can still manually request a re-render
+#define LOG_UPDATE_TIMEOUT 5 SECONDS
+
+// The maximum number of entries allowed in the signaler investigate log, keep this relatively small to prevent performance issues when an admin tries to query it
+#define INVESTIGATE_SIGNALER_LOG_MAX_LENGTH 500
+
+//Investigate logging defines
+#define INVESTIGATE_CARGO "cargo"
+#define INVESTIGATE_RESEARCH "research"
+
+// Logging types for log_message()
+#define LOG_ATTACK (1 << 0)
+#define LOG_SAY (1 << 1)
+#define LOG_WHISPER (1 << 2)
+#define LOG_EMOTE (1 << 3)
+#define LOG_DSAY (1 << 4)
+#define LOG_PDA (1 << 5)
+#define LOG_CHAT (1 << 6)
+#define LOG_COMMENT (1 << 7)
+#define LOG_TELECOMMS (1 << 8)
+#define LOG_OOC (1 << 9)
+#define LOG_LOOC (1 << 10)
+#define LOG_ADMIN (1 << 11)
+#define LOG_OWNERSHIP (1 << 12)
+#define LOG_GAME (1 << 13)
+#define LOG_ADMIN_PRIVATE (1 << 14)
+#define LOG_ASAY (1 << 15)
+#define LOG_MECHA (1 << 16)
+#define LOG_VIRUS (1 << 17)
+#define LOG_SHUTTLE (1 << 18)
+#define LOG_ECON (1 << 19)
+#define LOG_VICTIM (1 << 20)
+#define LOG_RADIO_EMOTE (1 << 21)
+#define LOG_SPEECH_INDICATORS (1 << 22)
+#define LOG_TRANSPORT (1 << 23)
+
+//Individual logging panel pages
+#define INDIVIDUAL_GAME_LOG (LOG_GAME)
+#define INDIVIDUAL_ATTACK_LOG (LOG_ATTACK | LOG_VICTIM)
+#define INDIVIDUAL_SAY_LOG (LOG_SAY | LOG_WHISPER | LOG_DSAY | LOG_SPEECH_INDICATORS)
+#define INDIVIDUAL_EMOTE_LOG (LOG_EMOTE | LOG_RADIO_EMOTE)
+#define INDIVIDUAL_COMMS_LOG (LOG_PDA | LOG_CHAT | LOG_COMMENT | LOG_TELECOMMS)
+#define INDIVIDUAL_OOC_LOG (LOG_OOC | LOG_LOOC | LOG_ADMIN)
+#define INDIVIDUAL_SHOW_ALL_LOG (LOG_ATTACK | LOG_SAY | LOG_WHISPER | LOG_EMOTE | LOG_RADIO_EMOTE | LOG_DSAY | LOG_PDA | LOG_CHAT | LOG_COMMENT | LOG_TELECOMMS | LOG_OOC | LOG_LOOC | LOG_ADMIN | LOG_OWNERSHIP | LOG_GAME | LOG_ADMIN_PRIVATE | LOG_ASAY | LOG_MECHA | LOG_VIRUS | LOG_SHUTTLE | LOG_ECON | LOG_VICTIM | LOG_SPEECH_INDICATORS)
+
+// Log entry keys
+#define LOG_ENTRY_KEY_TIMESTAMP "ts"
+#define LOG_ENTRY_KEY_CATEGORY "cat"
+#define LOG_ENTRY_KEY_MESSAGE "msg"
+#define LOG_ENTRY_KEY_DATA "data"
+#define LOG_ENTRY_KEY_WORLD_STATE "w-state"
+#define LOG_ENTRY_KEY_SEMVER_STORE "s-store"
+#define LOG_ENTRY_KEY_ID "id"
+#define LOG_ENTRY_KEY_SCHEMA_VERSION "s-ver"
+
+// Internal categories
+#define LOG_CATEGORY_INTERNAL_CATEGORY_NOT_FOUND "internal-category-not-found"
+#define LOG_CATEGORY_INTERNAL_ERROR "internal-error"
+
+// Misc categories
+#define LOG_CATEGORY_ATTACK "attack"
+#define LOG_CATEGORY_CONFIG "config"
+#define LOG_CATEGORY_QDEL "qdel"
+#define LOG_CATEGORY_RUNTIME "runtime"
+#define LOG_CATEGORY_SUSPICIOUS_LOGIN "suspicious-logins"
+#define LOG_CATEGORY_VORE "vore"
+
+// Admin categories
+#define LOG_CATEGORY_ADMIN "admin"
+#define LOG_CATEGORY_ADMIN_DSAY "admin-dsay"
+
+// Admin private categories
+#define LOG_CATEGORY_ADMIN_PRIVATE "adminprivate"
+#define LOG_CATEGORY_ADMIN_PRIVATE_ASAY "adminprivate-asay"
+#define LOG_CATEGORY_ADMIN_PRIVATE_MSAY "adminprivate-msay"
+#define LOG_CATEGORY_ADMIN_PRIVATE_ESAY "adminprivate-esay"
+
+// Debug categories
+#define LOG_CATEGORY_DEBUG "debug"
+#define LOG_CATEGORY_DEBUG_ASSET "debug-asset"
+#define LOG_CATEGORY_DEBUG_MAPPING "debug-mapping"
+#define LOG_CATEGORY_DEBUG_MOBTAG "debug-mobtag"
+#define LOG_CATEGORY_DEBUG_SQL "debug-sql"
+
+// Compatibility categories, for when stuff is changed and you need existing functionality to work
+#define LOG_CATEGORY_COMPAT_GAME "game-compat"
+
+// Game categories
+#define LOG_CATEGORY_GAME "game"
+#define LOG_CATEGORY_GAME_ACCESS "game-access"
+#define LOG_CATEGORY_GAME_EMOTE "game-emote"
+#define LOG_CATEGORY_GAME_OOC "game-ooc"
+#define LOG_CATEGORY_GAME_LOOC "game-looc"
+#define LOG_CATEGORY_GAME_PRAYER "game-prayer"
+#define LOG_CATEGORY_GAME_SAY "game-say"
+#define LOG_CATEGORY_GAME_TOPIC "game-topic"
+#define LOG_CATEGORY_GAME_VOTE "game-vote"
+#define LOG_CATEGORY_GAME_WHISPER "game-whisper"
+
+// HREF categories
+#define LOG_CATEGORY_HREF "href"
+#define LOG_CATEGORY_HREF_TGUI "href-tgui"
+
+// PDA categories
+#define LOG_CATEGORY_PDA "pda"
+
+// Flags that apply to the entry_flags var on logging categories
+// These effect how entry datums process the inputs passed into them
+/// Enables data list usage for readable log entries
+/// You'll likely want to disable internal formatting to make this work properly
+#define ENTRY_USE_DATA_W_READABLE (1<<0)
+
+
+#define SCHEMA_VERSION "schema-version"
+
+// Default log schema version
+#define LOG_CATEGORY_SCHEMA_VERSION_NOT_SET "0.0.1"
+
+//wrapper macros for easier grepping
+#define DIRECT_OUTPUT(A, B) A << B
+#define DIRECT_INPUT(A, B) A >> B
+#define SEND_IMAGE(target, image) DIRECT_OUTPUT(target, image)
+#define SEND_SOUND(target, sound) DIRECT_OUTPUT(target, sound)
#define SEND_TEXT(target, text) DIRECT_OUTPUT(target, text)
#define WRITE_FILE(file, text) DIRECT_OUTPUT(file, text)
#define READ_FILE(file, text) DIRECT_INPUT(file, text)
-
-#define INVESTIGATE_RESEARCH "research"
+//This is an external call, "true" and "false" are how rust parses out booleans
+#define WRITE_LOG(log, text) rustg_log_write(log, text, "true")
+#define WRITE_LOG_NO_FORMAT(log, text) rustg_log_write(log, text, "false")
diff --git a/code/__defines/shuttle.dm b/code/__defines/shuttle.dm
index 9bf7dcad6f..76989a0e95 100644
--- a/code/__defines/shuttle.dm
+++ b/code/__defines/shuttle.dm
@@ -23,5 +23,5 @@
#ifndef DEBUG_SHUTTLES
#define log_shuttle(M)
#else
- #define log_shuttle(M) log_debug("[M]")
+ #define log_shuttle(M) log_world("[M]")
#endif
diff --git a/code/__defines/stack_trace.dm b/code/__defines/stack_trace.dm
new file mode 100644
index 0000000000..4911b4a0d5
--- /dev/null
+++ b/code/__defines/stack_trace.dm
@@ -0,0 +1,4 @@
+/// gives us the stack trace from CRASH() without ending the current proc.
+#define stack_trace(message) _stack_trace(message, __FILE__, __LINE__)
+
+#define WORKAROUND_IDENTIFIER "%//%"
diff --git a/code/__defines/tgs.config.dm b/code/__defines/tgs.config.dm
index c57439c7e4..0dc0e64f9a 100644
--- a/code/__defines/tgs.config.dm
+++ b/code/__defines/tgs.config.dm
@@ -3,9 +3,9 @@
#define TGS_READ_GLOBAL(Name) GLOB.##Name
#define TGS_WRITE_GLOBAL(Name, Value) GLOB.##Name = ##Value
#define TGS_WORLD_ANNOUNCE(message) to_chat(world, span_boldannounce("[html_encode(##message)]"))
-#define TGS_INFO_LOG(message) log_to_dd("TGS Info: [##message]")
-#define TGS_WARNING_LOG(message) log_to_dd("TGS Warn: [##message]")
-#define TGS_ERROR_LOG(message) log_to_dd("TGS Error: [##message]")
+#define TGS_INFO_LOG(message) log_world("TGS Info: [##message]")
+#define TGS_WARNING_LOG(message) log_world("TGS Warn: [##message]")
+#define TGS_ERROR_LOG(message) stack_trace("TGS Error: [##message]")
#define TGS_NOTIFY_ADMINS(event) message_admins(##event)
#define TGS_CLIENT_COUNT GLOB.clients.len
#define TGS_PROTECT_DATUM(Path) GENERAL_PROTECT_DATUM(##Path)
diff --git a/code/_compile_options.dm b/code/_compile_options.dm
new file mode 100644
index 0000000000..bc43d51fa2
--- /dev/null
+++ b/code/_compile_options.dm
@@ -0,0 +1,7 @@
+// Comment this out if you are debugging problems that might be obscured by custom error handling in world/Error
+#ifdef DEBUG
+#define USE_CUSTOM_ERROR_HANDLER
+#endif
+
+// We do not have dreamlua implemented
+#define DISABLE_DREAMLUAU
diff --git a/code/_global_vars/logging.dm b/code/_global_vars/logging.dm
index 5ac744da96..4e04f43faf 100644
--- a/code/_global_vars/logging.dm
+++ b/code/_global_vars/logging.dm
@@ -5,6 +5,44 @@ GLOBAL_PROTECT(round_id)
GLOBAL_VAR_INIT(log_directory, "data/logs/") //See world.dm for the full calculated path
GLOBAL_PROTECT(log_directory)
+#define DECLARE_LOG_NAMED(log_var_name, log_file_name, start)\
+GLOBAL_VAR(##log_var_name);\
+GLOBAL_PROTECT(##log_var_name);\
+/world/_initialize_log_files(temp_log_override = null){\
+ ..();\
+ GLOB.##log_var_name = temp_log_override || "[GLOB.log_directory]/[##log_file_name].log";\
+ if(!temp_log_override && ##start){\
+ start_log(GLOB.##log_var_name);\
+ }\
+}
+
+#define DECLARE_LOG(log_name, start) DECLARE_LOG_NAMED(##log_name, "[copytext(#log_name, 1, length(#log_name) - 3)]", start)
+#define START_LOG TRUE
+#define DONT_START_LOG FALSE
+
+/// Populated by log declaration macros to set log file names and start messages
+/world/proc/_initialize_log_files(temp_log_override = null)
+ // Needs to be here to avoid compiler warnings
+ SHOULD_CALL_PARENT(TRUE)
+ return
+
+// All individual log files.
+// These should be used where the log category cannot easily be a json log file.
+DECLARE_LOG(config_error_log, DONT_START_LOG)
+DECLARE_LOG(perf_log, DONT_START_LOG) // Declared here but name is set in time_track subsystem
+
+#ifdef REFERENCE_TRACKING_LOG_APART
+DECLARE_LOG_NAMED(harddel_log, "harddels", START_LOG)
+#endif
+
+#if defined(UNIT_TESTS) || defined(SPACEMAN_DMM)
+DECLARE_LOG_NAMED(test_log, "tests", START_LOG)
+#endif
+
+/// All admin related log lines minus their categories
+GLOBAL_LIST_EMPTY(admin_activities)
+GLOBAL_PROTECT(admin_activities)
+
GLOBAL_VAR(diary)
GLOBAL_PROTECT(diary)
@@ -30,3 +68,8 @@ GLOBAL_PROTECT(bombers)
/// Stores who uploaded laws to which silicon-based lifeform, and what the law was
GLOBAL_LIST_EMPTY(lawchanges)
GLOBAL_PROTECT(lawchanges)
+
+#undef DECLARE_LOG
+#undef DECLARE_LOG_NAMED
+#undef START_LOG
+#undef DONT_START_LOG
diff --git a/code/_helpers/_lists.dm b/code/_helpers/_lists.dm
index 8e9e3adac8..d656f05d22 100644
--- a/code/_helpers/_lists.dm
+++ b/code/_helpers/_lists.dm
@@ -910,7 +910,7 @@ GLOBAL_LIST_EMPTY(json_cache)
GLOB.json_cache[json_to_decode] = json_decode(json_to_decode)
. = GLOB.json_cache[json_to_decode]
catch(var/exception/e)
- log_error("Exception during JSON decoding ([json_to_decode]): [e]")
+ log_runtime("Exception during JSON decoding ([json_to_decode]): [e]")
return list()
//takes an input_key, as text, and the list of keys already used, outputting a replacement key in the format of "[input_key] ([number_of_duplicates])" if it finds a duplicate
diff --git a/code/_helpers/files.dm b/code/_helpers/files.dm
index a776c3363d..716df480f9 100644
--- a/code/_helpers/files.dm
+++ b/code/_helpers/files.dm
@@ -1,17 +1,3 @@
-//checks if a file exists and contains text
-//returns text as a string if these conditions are met
-/proc/return_file_text(filename)
- if(fexists(filename) == 0)
- error("File not found ([filename])")
- return
-
- var/text = file2text(filename)
- if(!text)
- error("File empty ([filename])")
- return
-
- return text
-
/**
* For FTP requests. (i.e. downloading runtime logs.)
*
diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm
index 1b02770eb2..96f6c6b140 100644
--- a/code/_helpers/global_lists.dm
+++ b/code/_helpers/global_lists.dm
@@ -193,7 +193,6 @@ GLOBAL_LIST_EMPTY(mannequins)
if (isnull(GLOB.all_languages[L.name]))
GLOB.all_languages[L.name] = L
else
- log_debug("Language name conflict! [T] is named [L.name], but that is taken by [GLOB.all_languages[L.name].type]")
if(isnull(GLOB.language_name_conflicts[L.name]))
GLOB.language_name_conflicts[L.name] = list(GLOB.all_languages[L.name])
GLOB.language_name_conflicts[L.name] += L
@@ -204,7 +203,6 @@ GLOBAL_LIST_EMPTY(mannequins)
if(isnull(GLOB.language_keys[L.key]))
GLOB.language_keys[L.key] = L
else
- log_debug("Language key conflict! [L] has key [L.key], but that is taken by [(GLOB.language_keys[L.key])]")
if(isnull(GLOB.language_key_conflicts[L.key]))
GLOB.language_key_conflicts[L.key] = list(GLOB.language_keys[L.key])
GLOB.language_key_conflicts[L.key] += L
diff --git a/code/_helpers/guid.dm b/code/_helpers/guid.dm
new file mode 100644
index 0000000000..49903cceb3
--- /dev/null
+++ b/code/_helpers/guid.dm
@@ -0,0 +1,19 @@
+/**
+ * returns a GUID like identifier (using a mostly made up record format)
+ * guids are not on their own suitable for access or security tokens, as most of their bits are predictable.
+ * (But may make a nice salt to one)
+**/
+/proc/GUID()
+ var/const/GUID_VERSION = "b"
+ var/const/GUID_VARIANT = "d"
+ var/node_id = copytext_char(md5("[rand()*rand(1,9999999)][world.name][world.hub][world.hub_password][world.internet_address][world.address][world.contents.len][world.status][world.port][rand()*rand(1,9999999)]"), 1, 13)
+
+ var/time_high = "[num2hex(text2num(time2text(world.realtime,"YYYY")), 2)][num2hex(world.realtime, 6)]"
+
+ var/time_mid = num2hex(world.timeofday, 4)
+
+ var/time_low = num2hex(world.time, 3)
+
+ var/time_clock = num2hex(TICK_DELTA_TO_MS(world.tick_usage), 3)
+
+ return "{[time_high]-[time_mid]-[GUID_VERSION][time_low]-[GUID_VARIANT][time_clock]-[node_id]}"
diff --git a/code/_helpers/logging.dm b/code/_helpers/logging.dm
deleted file mode 100644
index c410493a47..0000000000
--- a/code/_helpers/logging.dm
+++ /dev/null
@@ -1,315 +0,0 @@
-//print an error message to world.log
-
-//This is an external call, "true" and "false" are how rust parses out booleans
-#define WRITE_LOG(log, text) rustg_log_write(log, text, "true")
-#define WRITE_LOG_NO_FORMAT(log, text) rustg_log_write(log, text, "false")
-
-/* For logging round startup. */
-/proc/start_log(log)
- WRITE_LOG(log, "START: Starting up [GLOB.log_directory].")
- return log
-
-/* Close open log handles. This should be called as late as possible, and no logging should hapen after. */
-/proc/shutdown_logging()
- rustg_log_close_all()
-
-/proc/error(msg)
- to_world_log("## ERROR: [msg]")
-
-#define WARNING(MSG) warning("[MSG] in [__FILE__] at line [__LINE__] src: [src] usr: [usr].")
-//print a warning message to world.log
-/proc/warning(msg)
- to_world_log("## WARNING: [msg]")
-
-//print a testing-mode debug message to world.log
-/proc/testing(msg)
- to_world_log("## TESTING: [msg]")
-
-/proc/log_admin(text)
- GLOB.admin_log.Add(text)
- if (CONFIG_GET(flag/log_admin))
- WRITE_LOG(GLOB.diary, "ADMIN: [text]")
-
-/proc/log_admin_private(text)
- GLOB.admin_log.Add(text)
- if (CONFIG_GET(flag/log_admin))
- WRITE_LOG(GLOB.diary, "ADMINPRIVATE: [text]")
-
-/proc/log_adminpm(text, client/source, client/dest)
- GLOB.admin_log.Add(text)
- if (CONFIG_GET(flag/log_admin))
- WRITE_LOG(GLOB.diary, "ADMINPM: [key_name(source)]->[key_name(dest)]: [html_decode(text)]")
-
-/proc/log_pray(text, client/source)
- GLOB.admin_log.Add(text)
- if (CONFIG_GET(flag/log_admin))
- WRITE_LOG(GLOB.diary, "PRAY: [key_name(source)]: [text]")
-
-/proc/log_debug(text)
- if (CONFIG_GET(flag/log_debug))
- WRITE_LOG(GLOB.debug_log, "DEBUG: [sanitize(text)]")
-
- for(var/client/C in GLOB.admins)
- if(C.prefs?.read_preference(/datum/preference/toggle/show_debug_logs))
- to_chat(C,
- type = MESSAGE_TYPE_DEBUG,
- html = span_filter_debuglogs("DEBUG: [text]"))
-
-/proc/log_game(text)
- if (CONFIG_GET(flag/log_game))
- WRITE_LOG(GLOB.diary, "GAME: [text]")
-
-/proc/log_vote(text)
- if (CONFIG_GET(flag/log_vote))
- WRITE_LOG(GLOB.diary, "VOTE: [text]")
-
-/proc/log_access_in(client/new_client)
- if (CONFIG_GET(flag/log_access))
- var/message = "[key_name(new_client)] - IP:[new_client.address] - CID:[new_client.computer_id] - BYOND v[new_client.byond_version]"
- WRITE_LOG(GLOB.diary, "ACCESS IN: [message]") //VOREStation Edit
-
-/proc/log_access_out(mob/last_mob)
- if (CONFIG_GET(flag/log_access))
- var/message = "[key_name(last_mob)] - IP:[last_mob.lastKnownIP] - CID:Logged Out - BYOND Logged Out"
- WRITE_LOG(GLOB.diary, "ACCESS OUT: [message]")
-
-/proc/log_say(text, mob/speaker)
- if (CONFIG_GET(flag/log_say))
- WRITE_LOG(GLOB.diary, "SAY: [speaker.simple_info_line()]: [html_decode(text)]")
-
- //Log the message to in-game dialogue logs, as well.
- if(speaker.client)
- speaker.dialogue_log += span_bold("([time_stamp()])") + " (" + span_bold("[speaker]/[speaker.client]") + ") " + span_underline("SAY:") + " - " + span_green("[text]")
- GLOB.round_text_log += span_bold("([time_stamp()])") + " (" + span_bold("[speaker]/[speaker.client]") + ") " + span_underline("SAY:") + " - " + span_green("[text]")
-
-/proc/log_ooc(text, client/user)
- if (CONFIG_GET(flag/log_ooc))
- WRITE_LOG(GLOB.diary, "OOC: [user.simple_info_line()]: [html_decode(text)]")
-
- GLOB.round_text_log += span_bold("([time_stamp()])") + " (" + span_bold("[user]") + ") " + span_underline("OOC:") + " - " + span_blue(span_bold("[text]"))
-
-/proc/log_aooc(text, client/user)
- if (CONFIG_GET(flag/log_ooc))
- WRITE_LOG(GLOB.diary, "AOOC: [user.simple_info_line()]: [html_decode(text)]")
-
- GLOB.round_text_log += span_bold("([time_stamp()])") + " (" + span_bold("[user]") + ") " + span_underline("AOOC:") + " - " + span_red(span_bold("[text]"))
-
-/proc/log_looc(text, client/user)
- if (CONFIG_GET(flag/log_ooc))
- WRITE_LOG(GLOB.diary, "LOOC: [user.simple_info_line()]: [html_decode(text)]")
-
- GLOB.round_text_log += span_bold("([time_stamp()])") + " (" + span_bold("[user]") + ") " + span_underline("LOOC:") + " - " + span_orange(span_bold("[text]"))
-
-/proc/log_whisper(text, mob/speaker)
- if (CONFIG_GET(flag/log_whisper))
- WRITE_LOG(GLOB.diary, "WHISPER: [speaker.simple_info_line()]: [html_decode(text)]")
-
- if(speaker.client)
- speaker.dialogue_log += span_bold("([time_stamp()])") + " (" + span_bold("[speaker]/[speaker.client]") + ") " + span_underline("SAY:") + " - " + span_gray(span_italics("[text]"))
- GLOB.round_text_log += span_bold("([time_stamp()])") + " (" + span_bold("[speaker]/[speaker.client]") + ") " + span_underline("SAY:") + " - " + span_gray(span_italics("[text]"))
-
-/proc/log_emote(text, mob/speaker)
- if (CONFIG_GET(flag/log_emote))
- WRITE_LOG(GLOB.diary, "EMOTE: [speaker.simple_info_line()]: [html_decode(text)]")
-
- if(speaker.client)
- speaker.dialogue_log += span_bold("([time_stamp()])") + " (" + span_bold("[speaker]/[speaker.client]") + ") " + span_underline("EMOTE:") + " - " + span_pink("[text]")
- GLOB.round_text_log += span_bold("([time_stamp()])") + " (" + span_bold("[speaker]/[speaker.client]") + ") " + span_underline("EMOTE:") + " - " + span_pink("[text]")
-
-/proc/log_attack(attacker, defender, message)
- if (CONFIG_GET(flag/log_attack))
- WRITE_LOG(GLOB.diary, "ATTACK: [attacker] against [defender]: [message]")
-
-/proc/log_adminsay(text, mob/speaker)
- if (CONFIG_GET(flag/log_adminchat))
- WRITE_LOG(GLOB.diary, "ADMINSAY: [speaker.simple_info_line()]: [html_decode(text)]")
-
-/proc/log_modsay(text, mob/speaker)
- if (CONFIG_GET(flag/log_adminchat))
- WRITE_LOG(GLOB.diary, "MODSAY: [speaker.simple_info_line()]: [html_decode(text)]")
-
-/proc/log_eventsay(text, mob/speaker)
- if (CONFIG_GET(flag/log_adminchat))
- WRITE_LOG(GLOB.diary, "EVENTSAY: [speaker.simple_info_line()]: [html_decode(text)]")
-
-/proc/log_ghostsay(text, mob/speaker)
- if (CONFIG_GET(flag/log_say))
- WRITE_LOG(GLOB.diary, "DEADCHAT: [speaker.simple_info_line()]: [html_decode(text)]")
-
- speaker.dialogue_log += span_bold("([time_stamp()])") + " (" + span_bold("[speaker]/[speaker.client]") + ") " + span_underline("DEADSAY:") + " - " + span_green("[text]")
- GLOB.round_text_log += span_small(span_purple(span_bold("([time_stamp()])") + " (" + span_bold("[speaker]/[speaker.client]") + ") " + span_underline("DEADSAY:") + " - [text]"))
-
-/proc/log_ghostemote(text, mob/speaker)
- if (CONFIG_GET(flag/log_emote))
- WRITE_LOG(GLOB.diary, "DEADEMOTE: [speaker.simple_info_line()]: [html_decode(text)]")
-
-/proc/log_adminwarn(text)
- if (CONFIG_GET(flag/log_adminwarn))
- WRITE_LOG(GLOB.diary, "ADMINWARN: [html_decode(text)]")
-
-/proc/log_pda(text, mob/speaker)
- if (CONFIG_GET(flag/log_pda))
- WRITE_LOG(GLOB.diary, "PDA: [speaker.simple_info_line()]: [html_decode(text)]")
-
- speaker.dialogue_log += span_bold("([time_stamp()])") + " (" + span_bold("[speaker]/[speaker.client]") + ") " + span_underline("MSG:") + " - " + span_darkgreen("[text]")
- GLOB.round_text_log += span_bold("([time_stamp()])") + " (" + span_bold("[speaker]/[speaker.client]") + ") " + span_underline("MSG:") + " - " + span_darkgreen("[text]")
-
-/proc/log_to_dd(text)
- to_world_log(text) //this comes before the config check because it can't possibly runtime
- if(config?.loaded && CONFIG_GET(flag/log_world_output))
- WRITE_LOG(GLOB.diary, "DD_OUTPUT: [text]")
-
-/proc/log_error(text)
- to_world_log(text)
- WRITE_LOG(GLOB.error_log, "RUNTIME: [text]")
-
-/proc/log_misc(text)
- WRITE_LOG(GLOB.diary, "MISC: [text]")
-
-/proc/log_sql(text)
- WRITE_LOG(GLOB.sql_error_log, "SQL: [text]")
-
-/proc/log_query_debug(text)
- WRITE_LOG(GLOB.query_debug_log, "SQL: [text]")
-
-/proc/log_topic(text)
- if(GLOB.Debug2)
- WRITE_LOG(GLOB.diary, "TOPIC: [text]")
-
-/proc/log_unit_test(text)
- to_world_log("## UNIT_TESTS: [text]")
-
-#ifdef REFERENCE_TRACKING_LOG
-#define log_reftracker(msg) WRITE_LOG(GLOB.diary, "## REF SEARCH [msg]")
-#else
-#define log_reftracker(msg)
-#endif
-
-/proc/log_asset(text)
- WRITE_LOG(GLOB.diary, "ASSET: [text]")
-
-/// Puts the text into the research html file, not log. See [INVESTIGATE_RESEARCH] for [/atom/proc/investigate_log]
-/proc/log_research(text)
- if(!text)
- return
- var/html_file = file("[GLOB.log_directory]/[INVESTIGATE_RESEARCH].html")
- WRITE_FILE(html_file, "[time_stamp()] [text]
")
-
-/proc/report_progress(var/progress_message)
- admin_notice(span_boldannounce("[progress_message]"), R_DEBUG)
- to_world_log(progress_message)
-
-//pretty print a direction bitflag, can be useful for debugging.
-/proc/print_dir(var/dir)
- var/list/comps = list()
- if(dir & NORTH) comps += "NORTH"
- if(dir & SOUTH) comps += "SOUTH"
- if(dir & EAST) comps += "EAST"
- if(dir & WEST) comps += "WEST"
- if(dir & UP) comps += "UP"
- if(dir & DOWN) comps += "DOWN"
-
- return english_list(comps, nothing_text="0", and_text="|", comma_text="|")
-
-//more or less a logging utility
-//Always return "Something/(Something)", even if it's an error message.
-/proc/key_name(var/whom, var/include_link = FALSE, var/include_name = TRUE, var/highlight_special_characters = TRUE)
- var/mob/M
- var/client/C
- var/key
-
- if(!whom)
- return "INVALID/INVALID"
- if(istype(whom, /client))
- C = whom
- M = C.mob
- key = C.key
- else if(ismob(whom))
- M = whom
- C = M.client
- key = M.key
- else if(istype(whom, /datum/mind))
- var/datum/mind/D = whom
- key = D.key
- M = D.current
- if(D.current)
- C = D.current.client
- else if(istype(whom, /datum))
- var/datum/D = whom
- return "INVALID/([D.type])"
- else if(istext(whom))
- return "AUTOMATED/[whom]" //Just give them the text back
- else
- return "INVALID/INVALID"
-
- . = ""
-
- if(key)
- if(include_link && C)
- . += ""
-
- if(C && C.holder && C.holder.fakekey)
- . += "Administrator"
- else
- . += key
-
- if(include_link)
- if(C) . += ""
- else . += " (DC)"
- else
- . += "INVALID"
-
- if(include_name)
- var/name = "INVALID"
- if(M)
- if(M.real_name)
- name = M.real_name
- else if(M.name)
- name = M.name
-
- if(include_link && is_special_character(M) && highlight_special_characters)
- name = span_orange("[name]") //Orange
-
- . += "/([name])"
-
- return .
-
-/proc/key_name_admin(var/whom, var/include_name = 1)
- return key_name(whom, 1, include_name)
-
-// Helper procs for building detailed log lines
-//
-// These procs must not fail under ANY CIRCUMSTANCES!
-//
-
-/datum/proc/log_info_line()
- return "[src] ([type])"
-
-/atom/log_info_line()
- . = ..()
- var/turf/t = get_turf(src)
- if(istype(t))
- return "[.] @ [t.log_info_line()]"
- else if(loc)
- return "[.] @ ([loc]) (0,0,0) ([loc.type])"
- else
- return "[.] @ (NULL) (0,0,0) (NULL)"
-
-/turf/log_info_line()
- return "([src]) ([x],[y],[z]) ([type])"
-
-/mob/log_info_line()
- return "[..()] (ckey=[ckey])"
-
-/proc/log_info_line(var/datum/d)
- if(!d)
- return "*null*"
- if(!istype(d))
- return json_encode(d)
- return d.log_info_line()
-
-/mob/proc/simple_info_line()
- return "[key_name(src)] ([x],[y],[z])"
-
-/client/proc/simple_info_line()
- return "[key_name(src)] ([mob.x],[mob.y],[mob.z])"
diff --git a/code/_helpers/logging/_logging.dm b/code/_helpers/logging/_logging.dm
new file mode 100644
index 0000000000..b38409a1d3
--- /dev/null
+++ b/code/_helpers/logging/_logging.dm
@@ -0,0 +1,274 @@
+//print a warning message to world.log
+#define WARNING(MSG) warning("[MSG] in [__FILE__] at line [__LINE__] src: [UNLINT(src)] usr: [usr].")
+/proc/warning(msg)
+ msg = "## WARNING: [msg]"
+ log_world(msg)
+
+//not an error or a warning, but worth to mention on the world log, just in case.
+#define NOTICE(MSG) notice(MSG)
+/proc/notice(msg)
+ msg = "## NOTICE: [msg]"
+ log_world(msg)
+
+#define SET_SERIALIZATION_SEMVER(semver_list, semver) semver_list[type] = semver
+#define CHECK_SERIALIZATION_SEMVER(wanted, actual) (__check_serialization_semver(wanted, actual))
+
+/// Checks if the actual semver is equal or later than the wanted semver
+/// Must be passed as TEXT; you're probably looking for CHECK_SERIALIZATION_SEMVER, look right above
+/proc/__check_serialization_semver(wanted, actual)
+ if(wanted == actual)
+ return TRUE
+
+ var/list/wanted_versions = semver_to_list(wanted)
+ var/list/actual_versions = semver_to_list(actual)
+
+ if(!wanted_versions || !actual_versions)
+ stack_trace("Invalid semver string(s) passed to __check_serialization_semver: '[wanted]' and '[actual]'")
+ return FALSE
+
+ if(wanted_versions[1] != actual_versions[1])
+ return FALSE // major must always
+
+ if(wanted_versions[2] > actual_versions[2])
+ return FALSE // actual must be later than wanted
+
+ // patch is not checked
+ return TRUE
+
+//print a testing-mode debug message to world.log and world
+#ifdef TESTING
+#define testing(msg) log_world("## TESTING: [msg]"); to_chat(world, "## TESTING: [msg]")
+
+GLOBAL_LIST_INIT(testing_global_profiler, list("_PROFILE_NAME" = "Global"))
+// we don't really check if a word or name is used twice, be aware of that
+#define testing_profile_start(NAME, LIST) LIST[NAME] = world.timeofday
+#define testing_profile_current(NAME, LIST) round((world.timeofday - LIST[NAME])/10,0.1)
+#define testing_profile_output(NAME, LIST) testing("[LIST["_PROFILE_NAME"]] profile of [NAME] is [testing_profile_current(NAME,LIST)]s")
+#define testing_profile_output_all(LIST) { for(var/_NAME in LIST) { testing_profile_current(,_NAME,LIST); }; };
+#else
+#define testing(msg)
+#define testing_profile_start(NAME, LIST)
+#define testing_profile_current(NAME, LIST)
+#define testing_profile_output(NAME, LIST)
+#define testing_profile_output_all(LIST)
+#endif
+
+#if defined(UNIT_TESTS) || defined(SPACEMAN_DMM)
+/proc/log_test(text)
+ WRITE_LOG(GLOB.test_log, text)
+ SEND_TEXT(world.log, text)
+#endif
+
+#if defined(REFERENCE_TRACKING_LOG_APART)
+#define log_reftracker(msg) log_harddel("## REF SEARCH [msg]")
+
+/proc/log_harddel(text)
+ WRITE_LOG(GLOB.harddel_log, text)
+
+#elif defined(REFERENCE_TRACKING) // Doing it locally
+#define log_reftracker(msg) log_world("## REF SEARCH [msg]")
+
+#else //Not tracking at all
+#define log_reftracker(msg)
+#endif
+
+/**
+ * Generic logging helper
+ *
+ * reads the type of the log
+ * and writes it to the respective log file
+ * unless log_globally is FALSE
+ * Arguments:
+ * * message - The message being logged
+ * * message_type - the type of log the message is(ATTACK, SAY, etc)
+ * * color - color of the log text
+ * * log_globally - boolean checking whether or not we write this log to the log file
+ */
+/atom/proc/log_message(message, message_type, color = null, log_globally = TRUE, list/data)
+ if(!log_globally)
+ return
+
+ var/log_text = "[key_name_and_tag(src)] [message] [loc_name(src)]"
+ switch(message_type)
+ /// ship both attack logs and victim logs to the end of round attack.log just to ensure we don't lose information
+ if(LOG_ATTACK, LOG_VICTIM)
+ log_attack(log_text, data)
+ if(LOG_SAY)
+ log_say(log_text, data)
+ if(LOG_WHISPER)
+ log_whisper(log_text, data)
+ if(LOG_EMOTE)
+ log_emote(log_text, data)
+ if(LOG_PDA)
+ log_pda(log_text, data)
+ if(LOG_OOC)
+ log_ooc(log_text, data)
+ if(LOG_LOOC)
+ log_looc(log_text, data)
+ if(LOG_ADMIN)
+ log_admin(log_text, data)
+ if(LOG_ADMIN_PRIVATE)
+ log_admin_private(log_text, data)
+ if(LOG_ASAY)
+ log_adminsay(log_text, data)
+ if(LOG_GAME)
+ log_game(log_text, data)
+ else
+ stack_trace("Invalid individual logging type: [message_type]. Defaulting to [LOG_GAME] (LOG_GAME).")
+ log_game(log_text, data)
+
+/* For logging round startup. */
+/proc/start_log(log)
+ WRITE_LOG(log, "Starting up round ID [GLOB.round_id].\n-------------------------")
+
+/* Close open log handles. This should be called as late as possible, and no logging should hapen after. */
+/proc/shutdown_logging()
+ rustg_log_close_all()
+ logger.shutdown_logging()
+
+/* Helper procs for building detailed log lines */
+/proc/key_name(whom, include_link = null, include_name = TRUE)
+ var/mob/M
+ var/client/C
+ var/key
+ var/ckey
+ var/fallback_name
+
+ if(!whom)
+ return "*null*"
+ if(istype(whom, /client))
+ C = whom
+ M = C.mob
+ key = C.key
+ ckey = C.ckey
+ else if(ismob(whom))
+ M = whom
+ C = M.client
+ key = M.key
+ ckey = M.ckey
+ else if(istext(whom))
+ key = whom
+ ckey = ckey(whom)
+ C = GLOB.directory[ckey]
+ if(C)
+ M = C.mob
+ else if(istype(whom,/datum/mind))
+ var/datum/mind/mind = whom
+ key = mind.key
+ ckey = ckey(key)
+ if(mind.current)
+ M = mind.current
+ if(M.client)
+ C = M.client
+ else
+ fallback_name = mind.name
+ else // Catch-all cases if none of the types above match
+ var/swhom = null
+
+ if(istype(whom, /atom))
+ var/atom/A = whom
+ swhom = "[A.name]"
+ else if(isdatum(whom))
+ swhom = "[whom]"
+
+ if(!swhom)
+ swhom = "*invalid*"
+
+ return "\[[swhom]\]"
+
+ . = ""
+
+ if(!ckey)
+ include_link = FALSE
+
+ if(key)
+ if(C?.holder && C.holder.fakekey && !include_name)
+ if(include_link)
+ . += ""
+ . += "Administrator"
+ else
+ if(include_link)
+ . += ""
+ . += key
+ if(!C)
+ . += "\[DC\]"
+
+ if(include_link)
+ . += ""
+ else
+ . += "*no key*"
+
+ if(include_name)
+ if(M)
+ if(M.real_name)
+ . += "/([M.real_name])"
+ else if(M.name)
+ . += "/([M.name])"
+ else if(fallback_name)
+ . += "/([fallback_name])"
+
+ return .
+
+/proc/key_name_admin(whom, include_name = TRUE)
+ return key_name(whom, TRUE, include_name)
+
+/proc/key_name_and_tag(whom, include_link = null, include_name = TRUE)
+ var/tag = "!tagless!" // whom can be null in key_name() so lets set this as a safety
+ if(isatom(whom))
+ var/atom/subject = whom
+ tag = subject.tag
+ return "[key_name(whom, include_link, include_name)] ([tag])"
+
+/proc/loc_name(atom/A)
+ if(!istype(A))
+ return "(INVALID LOCATION)"
+
+ var/turf/T = A
+ if (!istype(T))
+ T = get_turf(A)
+
+ if(istype(T))
+ return "([AREACOORD(T)])"
+ else if(A.loc)
+ return "(UNKNOWN (?, ?, ?))"
+
+// Virgo specific Helper procs for building detailed log lines
+//
+// These procs must not fail under ANY CIRCUMSTANCES!
+// Are these even still required?
+
+/proc/report_progress(var/progress_message)
+ admin_notice(span_boldannounce("[progress_message]"), R_DEBUG)
+ log_world(progress_message)
+
+/datum/proc/log_info_line()
+ return "[src] ([type])"
+
+/atom/log_info_line()
+ . = ..()
+ var/turf/t = get_turf(src)
+ if(istype(t))
+ return "[.] @ [t.log_info_line()]"
+ else if(loc)
+ return "[.] @ ([loc]) (0,0,0) ([loc.type])"
+ else
+ return "[.] @ (NULL) (0,0,0) (NULL)"
+
+/turf/log_info_line()
+ return "([src]) ([x],[y],[z]) ([type])"
+
+/mob/log_info_line()
+ return "[..()] (ckey=[ckey])"
+
+/proc/log_info_line(var/datum/d)
+ if(!d)
+ return "*null*"
+ if(!istype(d))
+ return json_encode(d)
+ return d.log_info_line()
+
+/mob/proc/simple_info_line()
+ return "[key_name(src)] ([x],[y],[z])"
+
+/client/proc/simple_info_line()
+ return "[key_name(src)] ([mob.x],[mob.y],[mob.z])"
diff --git a/code/_helpers/logging/admin.dm b/code/_helpers/logging/admin.dm
new file mode 100644
index 0000000000..cff42007ac
--- /dev/null
+++ b/code/_helpers/logging/admin.dm
@@ -0,0 +1,42 @@
+/* Items with ADMINPRIVATE prefixed are stripped from public logs. */
+
+// For backwards compatibility these are currently also added to LOG_CATEGORY_GAME with their respective prefix
+// This is to avoid breaking any existing tools that rely on the old format, but should be removed in the future
+
+/// General logging for admin actions
+/proc/log_admin(text, list/data)
+ GLOB.admin_activities.Add(text)
+ logger.Log(LOG_CATEGORY_ADMIN, text, data)
+ logger.Log(LOG_CATEGORY_COMPAT_GAME, "ADMIN: [text]")
+
+/// General logging for admin actions
+/proc/log_admin_private(text, list/data)
+ GLOB.admin_activities.Add(text)
+ logger.Log(LOG_CATEGORY_ADMIN_PRIVATE, text, data)
+ logger.Log(LOG_CATEGORY_COMPAT_GAME, "ADMINPRIVATE: [text]")
+
+/// Logging for AdminSay (ASAY) messages
+/proc/log_adminsay(text, list/data)
+ GLOB.admin_activities.Add(text)
+ logger.Log(LOG_CATEGORY_ADMIN_PRIVATE_ASAY, text, data)
+ logger.Log(LOG_CATEGORY_COMPAT_GAME, "ADMINPRIVATE: ASAY: [text]")
+
+/proc/log_modsay(text, list/data)
+ logger.Log(LOG_CATEGORY_ADMIN_PRIVATE_MSAY, text, data)
+ logger.Log(LOG_CATEGORY_COMPAT_GAME, "ADMINPRIVATE: MODSAY: [text]")
+
+/proc/log_eventsay(text, list/data)
+ logger.Log(LOG_CATEGORY_ADMIN_PRIVATE_ESAY, text, data)
+ logger.Log(LOG_CATEGORY_COMPAT_GAME, "ADMINPRIVATE: EVENTSAY: [text]")
+
+/**
+ * Writes to a special log file if the log_suspicious_login config flag is set,
+ * which is intended to contain all logins that failed under suspicious circumstances.
+ *
+ * Mirrors this log entry to log_access when access_log_mirror is TRUE, so this proc
+ * doesn't need to be used alongside log_access and can replace it where appropriate.
+ */
+/proc/log_suspicious_login(text, list/data, access_log_mirror = TRUE)
+ logger.Log(LOG_CATEGORY_SUSPICIOUS_LOGIN, text)
+ if(access_log_mirror)
+ log_access(text)
diff --git a/code/_helpers/logging/attack.dm b/code/_helpers/logging/attack.dm
new file mode 100644
index 0000000000..69a843023b
--- /dev/null
+++ b/code/_helpers/logging/attack.dm
@@ -0,0 +1,40 @@
+/// Generic attack logging
+/proc/log_attack(text, list/data)
+ logger.Log(LOG_CATEGORY_ATTACK, text, data)
+
+/**
+ * Log a combat message in the attack log
+ *
+ * Arguments:
+ * * atom/user - argument is the actor performing the action
+ * * atom/target - argument is the target of the action
+ * * what_done - is a verb describing the action (e.g. punched, throwed, kicked, etc.)
+ * * atom/object - is a tool with which the action was made (usually an item)
+ * * addition - is any additional text, which will be appended to the rest of the log line
+ */
+/proc/log_combat(atom/user, atom/target, what_done, atom/object=null, addition=null)
+ var/ssource = key_name(user)
+ var/starget = key_name(target)
+
+ var/mob/living/living_target = target
+ var/hp = istype(living_target) ? " (NEWHP: [living_target.health]) " : ""
+
+ var/sobject = ""
+ if(object)
+ sobject = " with [object]"
+ var/saddition = ""
+ if(addition)
+ saddition = " [addition]"
+
+ var/postfix = "[sobject][saddition][hp]"
+
+ var/message = "[what_done] [starget][postfix]"
+ user.log_message(message, LOG_ATTACK, color="red")
+
+ if(user != target)
+ var/reverse_message = "was [what_done] by [ssource][postfix]"
+ target.log_message(reverse_message, LOG_VICTIM, color="orange", log_globally=FALSE)
+
+/// Log for vore interactions
+/proc/log_vore(text, list/data)
+ logger.Log(LOG_CATEGORY_VORE, text, data)
diff --git a/code/_helpers/logging/debug.dm b/code/_helpers/logging/debug.dm
index 18bce9523f..752a606956 100644
--- a/code/_helpers/logging/debug.dm
+++ b/code/_helpers/logging/debug.dm
@@ -1,11 +1,50 @@
+/// Logging for loading and caching assets
+/proc/log_asset(text, list/data)
+ logger.Log(LOG_CATEGORY_DEBUG_ASSET, text, data)
+
/// Logging for config errors
/// Rarely gets called; just here in case the config breaks.
/proc/log_config(text, list/data)
- var/entry = "CONFIG: "
-
- entry += text
- entry += " | DATA: "
- entry += data
-
- WRITE_LOG(GLOB.diary, entry)
+ logger.Log(LOG_CATEGORY_CONFIG, text, data)
+ SEND_TEXT(world.log, text)
+
+/// Logging for mapping errors
+/proc/log_mapping(text, skip_world_log)
+#ifdef UNIT_TESTS
+ GLOB.unit_test_mapping_logs += text
+#endif
+#ifdef MAP_TEST
+ message_admins("Mapping: [text]")
+#endif
+ logger.Log(LOG_CATEGORY_DEBUG_MAPPING, text)
+ if(skip_world_log)
+ return
+ SEND_TEXT(world.log, text)
+
+/// Logging for game performance
+/proc/log_perf(list/perf_info)
+ . = "[perf_info.Join(",")]\n"
+ WRITE_LOG_NO_FORMAT(GLOB.perf_log, .)
+
+/// Logging for hard deletes
+/proc/log_qdel(text, list/data)
+ logger.Log(LOG_CATEGORY_QDEL, text, data)
+
+/* Log to the logfile only. */
+/proc/log_runtime(text, list/data)
+ logger.Log(LOG_CATEGORY_RUNTIME, text, data)
+
+/// Logging for DB errors
+/proc/log_sql(text, list/data)
+ logger.Log(LOG_CATEGORY_DEBUG_SQL, text, data)
+
+/// Logging for world/Topic
+/proc/log_topic(text, list/data)
+ logger.Log(LOG_CATEGORY_GAME_TOPIC, text, data)
+
+/// Log to both DD and the logfile.
+/proc/log_world(text, list/data)
+#ifdef USE_CUSTOM_ERROR_HANDLER
+ logger.Log(LOG_CATEGORY_RUNTIME, text, data)
+#endif
SEND_TEXT(world.log, text)
diff --git a/code/_helpers/logging/game.dm b/code/_helpers/logging/game.dm
new file mode 100644
index 0000000000..dc825141d8
--- /dev/null
+++ b/code/_helpers/logging/game.dm
@@ -0,0 +1,27 @@
+/// Logging for generic/unsorted game messages
+/proc/log_game(text, list/data)
+ logger.Log(LOG_CATEGORY_GAME, text, data)
+
+/// Logging for emotes
+/proc/log_emote(text, list/data)
+ logger.Log(LOG_CATEGORY_GAME_EMOTE, text, data)
+
+/// Logging for messages sent in OOC
+/proc/log_ooc(text, list/data)
+ logger.Log(LOG_CATEGORY_GAME_OOC, text, data)
+
+/// Logging for messages sent in LOOC
+/proc/log_looc(text, list/data)
+ logger.Log(LOG_CATEGORY_GAME_LOOC, text, data)
+
+/// Logging for prayed messages
+/proc/log_prayer(text, list/data)
+ logger.Log(LOG_CATEGORY_GAME_PRAYER, text, data)
+
+/// Logging for logging in & out of the game, with error messages.
+/proc/log_access(text, list/data)
+ logger.Log(LOG_CATEGORY_GAME_ACCESS, text, data)
+
+/// Logging for OOC votes
+/proc/log_vote(text, list/data)
+ logger.Log(LOG_CATEGORY_GAME_VOTE, text, data)
diff --git a/code/_helpers/logging/mob.dm b/code/_helpers/logging/mob.dm
new file mode 100644
index 0000000000..9db2f0f6db
--- /dev/null
+++ b/code/_helpers/logging/mob.dm
@@ -0,0 +1,54 @@
+/**
+ * Logs a message to the mob_tags log, including the mobs tag
+ * Arguments:
+ * * text - text to log.
+ */
+/mob/proc/log_mob_tag(text, list/data)
+ logger.Log(LOG_CATEGORY_DEBUG_MOBTAG, text, data)
+
+/// Logs a message in a mob's individual log, and in the global logs as well if log_globally is true
+/mob/log_message(message, message_type, color = null, log_globally = TRUE, list/data)
+ if(!LAZYLEN(message))
+ stack_trace("Empty message")
+ return
+
+ // Cannot use the list as a map if the key is a number, so we stringify it (thank you BYOND)
+ var/smessage_type = num2text(message_type, MAX_BITFLAG_DIGITS)
+
+ if(HAS_CONNECTED_PLAYER(src))
+ if(!islist(persistent_client.logging[smessage_type]))
+ persistent_client.logging[smessage_type] = list()
+
+ if(!islist(logging[smessage_type]))
+ logging[smessage_type] = list()
+
+ var/colored_message = message
+ if(color)
+ if(color[1] == "#")
+ colored_message = "[message]"
+ else
+ colored_message = "[message]"
+
+ //This makes readability a bit better for admins.
+ switch(message_type)
+ if(LOG_WHISPER)
+ colored_message = "(WHISPER) [colored_message]"
+ if(LOG_OOC)
+ colored_message = "(OOC) [colored_message]"
+ if(LOG_LOOC)
+ colored_message = "(LOOC) [colored_message]"
+ if(LOG_ASAY)
+ colored_message = "(ASAY) [colored_message]"
+ if(LOG_EMOTE)
+ colored_message = "(EMOTE) [colored_message]"
+ if(LOG_RADIO_EMOTE)
+ colored_message = "(RADIOEMOTE) [colored_message]"
+
+ var/list/timestamped_message = list("\[[time_stamp(format = "YYYY-MM-DD hh:mm:ss")]\] [key_name_and_tag(src)] [loc_name(src)] (Event #[LAZYLEN(logging[smessage_type])])" = colored_message)
+
+ logging[smessage_type] += timestamped_message
+
+ if(HAS_CONNECTED_PLAYER(src))
+ persistent_client.logging[smessage_type] += timestamped_message
+
+ ..()
diff --git a/code/_helpers/logging/pda.dm b/code/_helpers/logging/pda.dm
new file mode 100644
index 0000000000..f37aea47ad
--- /dev/null
+++ b/code/_helpers/logging/pda.dm
@@ -0,0 +1,3 @@
+/// Logging for PDA messages sent
+/proc/log_pda(text, list/data)
+ logger.Log(LOG_CATEGORY_PDA, text, data)
diff --git a/code/_helpers/logging/research.dm b/code/_helpers/logging/research.dm
new file mode 100644
index 0000000000..f352123f9a
--- /dev/null
+++ b/code/_helpers/logging/research.dm
@@ -0,0 +1,6 @@
+/// Puts the text into the research html file, not log. See [INVESTIGATE_RESEARCH] for [/atom/proc/investigate_log]
+/proc/log_research(text)
+ if(!text)
+ return
+ var/html_file = file("[GLOB.log_directory]/[INVESTIGATE_RESEARCH].html")
+ WRITE_FILE(html_file, "[time_stamp(format = "YYYY-MM-DD hh:mm:ss")] [text]
")
diff --git a/code/_helpers/logging/talk.dm b/code/_helpers/logging/talk.dm
new file mode 100644
index 0000000000..36e8dfb3d8
--- /dev/null
+++ b/code/_helpers/logging/talk.dm
@@ -0,0 +1,25 @@
+/**
+ * Helper for logging chat messages or other logs with arbitrary inputs (e.g. announcements)
+ *
+ * This proc compiles a log string by prefixing the tag to the message
+ * and suffixing what it was forced_by if anything
+ * if the message lacks a tag and suffix then it is logged on its own
+ * Arguments:
+ * * message - The message being logged
+ * * message_type - the type of log the message is(ATTACK, SAY, etc)
+ * * tag - tag that indicates the type of text(announcement, telepathy, etc)
+ * * log_globally - boolean checking whether or not we write this log to the log file
+ * * forced_by - source that forced the dialogue if any
+ */
+/atom/proc/log_talk(message, message_type, tag = null, log_globally = TRUE, forced_by = null, custom_say_emote = null)
+ var/prefix = tag ? "([tag]) " : ""
+ var/suffix = forced_by ? " FORCED by [forced_by]" : ""
+ log_message("[prefix][custom_say_emote ? "*[custom_say_emote]*, " : ""]\"[message]\"[suffix]", message_type, log_globally = log_globally)
+
+/// Logging for generic spoken messages
+/proc/log_say(text, list/data)
+ logger.Log(LOG_CATEGORY_GAME_SAY, text, data)
+
+/// Logging for whispered messages
+/proc/log_whisper(text, list/data)
+ logger.Log(LOG_CATEGORY_GAME_WHISPER, text, data)
diff --git a/code/_helpers/logging/ui.dm b/code/_helpers/logging/ui.dm
index 57e927c5b3..1c72f314f3 100644
--- a/code/_helpers/logging/ui.dm
+++ b/code/_helpers/logging/ui.dm
@@ -1,13 +1,17 @@
-/proc/log_href(text)
- //WRITE_LOG(GLOB.world_href_log, "HREF: [text]")
- WRITE_LOG(GLOB.href_logfile, "HREF: [text]")
+/proc/log_href(text, list/data)
+ logger.Log(LOG_CATEGORY_HREF, text, data)
/**
* Appends a tgui-related log entry. All arguments are optional.
*/
-/proc/log_tgui(user, message, context,
- datum/tgui_window/window,
- datum/src_object)
+/proc/log_tgui(
+ user,
+ message,
+ context,
+ datum/tgui_window/window,
+ datum/src_object,
+)
+
var/entry = ""
// Insert user info
if(!user)
@@ -32,5 +36,4 @@
// Insert message
if(message)
entry += "\n[message]"
- //WRITE_LOG(GLOB.tgui_log, entry)
- WRITE_LOG(GLOB.diary, entry)
+ logger.Log(LOG_CATEGORY_HREF_TGUI, entry)
diff --git a/code/_helpers/logging_vr.dm b/code/_helpers/logging_vr.dm
deleted file mode 100644
index 8b23c0396b..0000000000
--- a/code/_helpers/logging_vr.dm
+++ /dev/null
@@ -1,11 +0,0 @@
-/proc/log_nsay(text, inside, mob/speaker)
- if (CONFIG_GET(flag/log_say))
- WRITE_LOG(GLOB.diary, "NSAY (NIF:[inside]): [speaker.simple_info_line()]: [html_decode(text)]")
-
-/proc/log_nme(text, inside, mob/speaker)
- if (CONFIG_GET(flag/log_emote))
- WRITE_LOG(GLOB.diary, "NME (NIF:[inside]): [speaker.simple_info_line()]: [html_decode(text)]")
-
-/proc/log_subtle(text, mob/speaker)
- if (CONFIG_GET(flag/log_emote))
- WRITE_LOG(GLOB.diary, "SUBTLE: [speaker.simple_info_line()]: [html_decode(text)]")
diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm
index 67dfa6c54f..a7b35878a1 100644
--- a/code/_helpers/mobs.dm
+++ b/code/_helpers/mobs.dm
@@ -165,7 +165,7 @@ Proc for attack log creation, because really why not
user.attack_log += text("\[[time_stamp()]\] [span_red("Attacked [target_str]: [what_done]")]")
if(ismob(target))
target.attack_log += text("\[[time_stamp()]\] [span_orange("Attacked by [user_str]: [what_done]")]")
- log_attack(user_str,target_str,what_done)
+ log_combat(user, target, what_done)
if(admin_notify)
msg_admin_attack("[key_name_admin(user)] vs [target_str]: [what_done]")
diff --git a/code/_helpers/stack_trace.dm b/code/_helpers/stack_trace.dm
new file mode 100644
index 0000000000..bb2d78de11
--- /dev/null
+++ b/code/_helpers/stack_trace.dm
@@ -0,0 +1,4 @@
+/// gives us the stack trace from CRASH() without ending the current proc.
+/// Do not call directly, use the [stack_trace] macro instead.
+/proc/_stack_trace(message, file, line)
+ CRASH("[message][WORKAROUND_IDENTIFIER][json_encode(list(file, line))][WORKAROUND_IDENTIFIER]")
diff --git a/code/_helpers/text.dm b/code/_helpers/text.dm
index 10497416e6..400959bfa4 100644
--- a/code/_helpers/text.dm
+++ b/code/_helpers/text.dm
@@ -669,3 +669,15 @@ GLOBAL_LIST_EMPTY(text_tag_cache)
temp = findtextEx(haystack, ascii2text(text2ascii(needles,i)), start, end) //Note: ascii2text(text2ascii) is faster than copytext()
if(temp) end = temp
return end
+
+/// Converts a semver string into a list of numbers
+/proc/semver_to_list(semver_string)
+ var/static/regex/semver_regex = regex(@"(\d+)\.(\d+)\.(\d+)", "")
+ if(!semver_regex.Find(semver_string))
+ return null
+
+ return list(
+ text2num(semver_regex.group[1]),
+ text2num(semver_regex.group[2]),
+ text2num(semver_regex.group[3]),
+ )
diff --git a/code/_helpers/time.dm b/code/_helpers/time.dm
index 99c0e61409..8500b7b3b8 100644
--- a/code/_helpers/time.dm
+++ b/code/_helpers/time.dm
@@ -50,11 +50,10 @@ var/next_station_date_change = 1 DAY
station_date = num2text((text2num(time2text(REALTIMEOFDAY, "YYYY"))+300)) + "-" + time2text(REALTIMEOFDAY, "MM-DD") //VOREStation Edit
return station_date
-//ISO 8601
-/proc/time_stamp()
- var/date_portion = time2text(world.timeofday, "YYYY-MM-DD")
- var/time_portion = time2text(world.timeofday, "hh:mm:ss")
- return "[date_portion]T[time_portion]"
+/// Returns UTC timestamp with the specifified format and optionally deciseconds
+/proc/time_stamp(format = "hh:mm:ss", show_ds)
+ var/time_string = time2text(world.timeofday, format, TIMEZONE_UTC)
+ return show_ds ? "[time_string]:[world.timeofday % 10]" : time_string
/proc/get_timezone_offset()
var/midnight_gmt_here = text2num(time2text(0,"hh")) * 36000
diff --git a/code/_helpers/turfs.dm b/code/_helpers/turfs.dm
index 47d6995e4d..d4e1b08e6d 100644
--- a/code/_helpers/turfs.dm
+++ b/code/_helpers/turfs.dm
@@ -79,7 +79,7 @@
var/turf/target = locate(dst_origin.x + x_pos, dst_origin.y + y_pos, dst_origin.z + z_pos)
if(!target)
- error("Null turf in translation @ ([dst_origin.x + x_pos], [dst_origin.y + y_pos], [dst_origin.z + z_pos])")
+ log_world("## ERROR Null turf in translation @ ([dst_origin.x + x_pos], [dst_origin.y + y_pos], [dst_origin.z + z_pos])")
turf_map[source] = target //if target is null, preserve that information in the turf map
return turf_map
@@ -106,7 +106,7 @@
//You can stay, though.
if(istype(T,/turf/space))
- error("Tried to translate a space turf: src=[log_info_line(T)] dst=[log_info_line(B)]")
+ log_world("## ERROR Tried to translate a space turf: src=[log_info_line(T)] dst=[log_info_line(B)]")
return FALSE // TODO - Is this really okay to do nothing?
var/turf/X //New Destination Turf
diff --git a/code/_helpers/type2type.dm b/code/_helpers/type2type.dm
index 026c0e8b99..59cd38a927 100644
--- a/code/_helpers/type2type.dm
+++ b/code/_helpers/type2type.dm
@@ -8,13 +8,6 @@
* angle2dir
*/
-//Splits the text of a file at seperator and returns them in a list.
-//returns an empty list if the file doesn't exist
-/world/proc/file2list(filename, seperator="\n", trim = TRUE)
- if (trim)
- return splittext(trim(file2text(filename)),seperator)
- return splittext(file2text(filename),seperator)
-
//returns a string the last bit of a type, without the preceeding '/'
/proc/type2top(the_type)
//handle the builtins manually
@@ -36,54 +29,18 @@
else //regex everything else (works for /proc too)
return lowertext(replacetext("[the_type]", "[type2parent(the_type)]/", ""))
-// Returns an integer given a hexadecimal number string as input.
-/proc/hex2num(hex)
- if (!istext(hex))
- return
-
- var/num = 0
- var/power = 1
- var/i = length(hex)
-
- while (i)
- var/char = text2ascii(hex, i)
- switch(char)
- if(48) pass() // 0 -- do nothing
- if(49 to 57) num += (char - 48) * power // 1-9
- if(97, 65) num += power * 10 // A
- if(98, 66) num += power * 11 // B
- if(99, 67) num += power * 12 // C
- if(100, 68) num += power * 13 // D
- if(101, 69) num += power * 14 // E
- if(102, 70) num += power * 15 // F
- else
- return
- power *= 16
- i--
- return num
-
-// Returns the hex value of a number given a value assumed to be a base-ten value
-/proc/num2hex(num, padlength)
- . = ""
- while(num > 0)
- var/hexdigit = GLOB.hexNums[(num & 0xF) + 1]
- . = "[hexdigit][.]"
- num >>= 4 //go to the next half-byte
-
- //pad with zeroes
- var/left = padlength - length(.)
- while (left-- > 0)
- . = "0[.]"
-
/proc/text2numlist(text, delimiter="\n")
var/list/num_list = list()
for(var/x in splittext(text, delimiter))
num_list += text2num(x)
return num_list
-// Splits the text of a file at seperator and returns them in a list.
-/proc/file2list(filename, seperator="\n")
- return splittext(return_file_text(filename),seperator)
+//Splits the text of a file at seperator and returns them in a list.
+//returns an empty list if the file doesn't exist
+/world/proc/file2list(filename, seperator="\n", trim = TRUE)
+ if (trim)
+ return splittext(trim(file2text(filename)),seperator)
+ return splittext(file2text(filename),seperator)
// Turns a direction into text
/proc/num2dir(direction)
@@ -93,7 +50,7 @@
if (4.0) return EAST
if (8.0) return WEST
else
- to_world_log("UNKNOWN DIRECTION: [direction]")
+ log_world("UNKNOWN DIRECTION: [direction]")
// Turns a direction into text
/proc/dir2text(direction)
@@ -597,12 +554,13 @@
if(fexists(filename))
. = file2text(filename)
if(!. && error_on_invalid_return)
- error("File empty ([filename])")
+ log_world("## ERROR File empty ([filename])")
else if(error_on_invalid_return)
- error("File not found ([filename])")
+ log_world("## ERROR File not found ([filename])")
catch(var/exception/E)
if(error_on_invalid_return)
- error("Exception when loading file as string: [E]")
+ log_world("## ERROR Exception when loading file as string: [E]")
+ log_runtime(E)
/// Return html to load a url.
diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm
index e1823914b8..ec53e06d9d 100644
--- a/code/_helpers/unsorted.dm
+++ b/code/_helpers/unsorted.dm
@@ -14,31 +14,6 @@
locate(min(CENTER.x+(RADIUS),world.maxx), min(CENTER.y+(RADIUS),world.maxy), CENTER.z) \
)
-//Inverts the colour of an HTML string
-/proc/invertHTML(HTMLstring)
-
- if (!( istext(HTMLstring) ))
- CRASH("Given non-text argument!")
- else
- if (length(HTMLstring) != 7)
- CRASH("Given non-HTML argument!")
- var/textr = copytext(HTMLstring, 2, 4)
- var/textg = copytext(HTMLstring, 4, 6)
- var/textb = copytext(HTMLstring, 6, 8)
- var/r = hex2num(textr)
- var/g = hex2num(textg)
- var/b = hex2num(textb)
- textr = num2hex(255 - r)
- textg = num2hex(255 - g)
- textb = num2hex(255 - b)
- if (length(textr) < 2)
- textr = text("0[]", textr)
- if (length(textg) < 2)
- textr = text("0[]", textg)
- if (length(textb) < 2)
- textr = text("0[]", textb)
- return text("#[][][]", textr, textg, textb)
-
//Returns the middle-most value
/proc/dd_range(var/low, var/high, var/num)
return max(low,min(high,num))
@@ -1180,7 +1155,7 @@ var/list/WALLITEMS = list(
colour = pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))
else
for(var/i=1;i<=3;i++)
- var/temp_col = "[num2hex(rand(lower,upper))]"
+ var/temp_col = "[num2hex(rand(lower,upper), 2)]"
if(length(temp_col )<2)
temp_col = "0[temp_col]"
colour += temp_col
@@ -1475,21 +1450,6 @@ var/mob/dview/dview_mob
/proc/pass(...)
return
-//gives us the stack trace from CRASH() without ending the current proc.
-/proc/stack_trace(msg)
- CRASH(msg)
-
-/datum/proc/stack_trace(msg)
- CRASH(msg)
-
-GLOBAL_REAL_VAR(list/stack_trace_storage)
-/proc/gib_stack_trace()
- stack_trace_storage = list()
- stack_trace()
- stack_trace_storage.Cut(1, min(3,stack_trace_storage.len))
- . = stack_trace_storage
- stack_trace_storage = null
-
// \ref behaviour got changed in 512 so this is necesary to replicate old behaviour.
// If it ever becomes necesary to get a more performant REF(), this lies here in wait
// #define REF(thing) (thing && istype(thing, /datum) && (thing:datum_flags & DF_USE_TAG) && thing:tag ? "[thing:tag]" : "\ref[thing]")
diff --git a/code/_macros.dm b/code/_macros.dm
index 7124629bb6..e423455e9a 100644
--- a/code/_macros.dm
+++ b/code/_macros.dm
@@ -9,34 +9,18 @@
#define RANDOM_BLOOD_TYPE pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+")
#define DEFAULT_BLOOD_TYPE "A+"
-// #define to_chat(target, message) target << message Not anymore!
-//#define to_chat to_chat_filename=__FILE__;to_chat_line=__LINE__;to_chat_src=src;__to_chat
-//#define to_chat __to_chat
-#define to_world(message) to_chat(world, message)
-#define to_world_log(message) world.log << message
-// TODO - Baystation has this log to crazy places. For now lets just world.log, but maybe look into it later.
-#define log_world(message) to_world_log(message)
#define to_file(file_entry, source_var) file_entry << source_var
#define from_file(file_entry, target_var) file_entry >> target_var
#define show_browser(target, browser_content, browser_name) target << browse(browser_content, browser_name)
#define send_rsc(target, rsc_content, rsc_name) target << browse_rsc(rsc_content, rsc_name)
#define open_link(target, url) target << link(url)
-// From TG, might be useful to have.
-#define DIRECT_OUTPUT(A, B) A << B
-#define DIRECT_INPUT(A, B) A >> B
-#define SEND_IMAGE(target, image) DIRECT_OUTPUT(target, image)
-#define SEND_SOUND(target, sound) DIRECT_OUTPUT(target, sound)
-//#define WRITE_LOG is in logging.dm
-
#define CanInteract(user, state) (CanUseTopic(user, state) == STATUS_INTERACTIVE)
#define sequential_id(key) uniqueness_repository.Generate(/datum/uniqueness_generator/id_sequential, key)
#define random_id(key,min_id,max_id) uniqueness_repository.Generate(/datum/uniqueness_generator/id_random, key, min_id, max_id)
-#define ARGS_DEBUG log_debug("[__FILE__] - [__LINE__]") ; for(var/arg in args) { log_debug("\t[log_info_line(arg)]") }
-
#define WORLD_ICON_SIZE 32 //Needed for the R-UST port
#define PIXEL_MULTIPLIER WORLD_ICON_SIZE/32 //Needed for the R-UST port
diff --git a/code/_onclick/hud/ability_screen_objects.dm b/code/_onclick/hud/ability_screen_objects.dm
index 05e48d8bd3..6dda894c59 100644
--- a/code/_onclick/hud/ability_screen_objects.dm
+++ b/code/_onclick/hud/ability_screen_objects.dm
@@ -273,7 +273,7 @@
// Makes the ability be triggered. The subclasses of this are responsible for carrying it out in whatever way it needs to.
/obj/screen/ability/proc/activate()
- to_world("[src] had activate() called.")
+ to_chat(world, "[src] had activate() called.")
return
// This checks if the ability can be used.
@@ -308,7 +308,7 @@
if(object_used && verb_to_call)
call(object_used,verb_to_call)(arguments_to_use)
// call(object_used,verb_to_call)(arguments_to_use)
-// to_world(span_world("Attempted to call([object_used],[verb_to_call])([arguments_to_use])"))
+// to_chat(world, span_world("Attempted to call([object_used],[verb_to_call])([arguments_to_use])"))
// if(hascall(object_used, verb_to_call))
// call(object_used,verb_to_call)(arguments_to_use)
// else
diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm
index b9cfe7a63f..70ee4df367 100644
--- a/code/_onclick/telekinesis.dm
+++ b/code/_onclick/telekinesis.dm
@@ -38,7 +38,7 @@
O.host = user
O.focus_object(src)
else
- warning("Strange attack_tk(): TK([user.has_telegrip()]) empty hand([!user.get_active_hand()])")
+ WARNING("Strange attack_tk(): TK([user.has_telegrip()]) empty hand([!user.get_active_hand()])")
return
diff --git a/code/controllers/autotransfer.dm b/code/controllers/autotransfer.dm
index 051ccf93e6..4c630c0a6d 100644
--- a/code/controllers/autotransfer.dm
+++ b/code/controllers/autotransfer.dm
@@ -21,7 +21,7 @@ var/datum/controller/transfer_controller/transfer_controller
//VOREStation Edit START
if (round_duration_in_ds >= shift_last_vote - 2 MINUTES)
shift_last_vote = 99999999 //Setting to a stupidly high number since it'll be not used again.
- to_world(span_world(span_notice("Warning: You have one hour left in the shift. Wrap up your scenes in the next 60 minutes before the transfer is called."))) //VOREStation Edit
+ to_chat(world, span_world(span_notice("Warning: You have one hour left in the shift. Wrap up your scenes in the next 60 minutes before the transfer is called."))) //VOREStation Edit
if (round_duration_in_ds >= shift_hard_end - 1 MINUTE)
init_shift_change(null, 1)
shift_hard_end = timerbuffer + CONFIG_GET(number/vote_autotransfer_interval) //If shuttle somehow gets recalled, let's force it to call again next time a vote would occur.
diff --git a/code/controllers/configuration/configuration.dm b/code/controllers/configuration/configuration.dm
index a2f5b2c9d1..116dbd811a 100644
--- a/code/controllers/configuration/configuration.dm
+++ b/code/controllers/configuration/configuration.dm
@@ -254,7 +254,7 @@
value = new_value
E = new_ver
else
- warning("[new_ver.type] is deprecated but gave no proper return for DeprecationUpdate()")
+ WARNING("[new_ver.type] is deprecated but gave no proper return for DeprecationUpdate()")
var/validated = E.ValidateAndSet(value)
if(!validated)
diff --git a/code/controllers/configuration/entries/general.dm b/code/controllers/configuration/entries/general.dm
index 6a638117b4..171d35f1df 100644
--- a/code/controllers/configuration/entries/general.dm
+++ b/code/controllers/configuration/entries/general.dm
@@ -22,6 +22,12 @@
/// log login/logout
/datum/config_entry/flag/log_access
+/// Config entry which special logging of failed logins under suspicious circumstances.
+/datum/config_entry/flag/log_suspicious_login
+
+/// log prayers
+/datum/config_entry/flag/log_prayer
+
/// log client say
/datum/config_entry/flag/log_say
@@ -29,13 +35,12 @@
/datum/config_entry/flag/log_admin
protection = CONFIG_ENTRY_LOCKED
-/// log debug output
-/datum/config_entry/flag/log_debug
- default = TRUE
-
/// log game events
/datum/config_entry/flag/log_game
+/// log assets
+/datum/config_entry/flag/log_asset
+
/// log voting
/datum/config_entry/flag/log_vote
@@ -51,8 +56,8 @@
/// log admin chat messages
/datum/config_entry/flag/log_adminchat
-/// log warnings admins get about bomb construction and such
-/datum/config_entry/flag/log_adminwarn
+/// log EVENT chat messages
+/datum/config_entry/flag/log_eventchat
/// log pda messages
/datum/config_entry/flag/log_pda
@@ -72,9 +77,16 @@
/// logs graffiti
/datum/config_entry/flag/log_graffiti
+/// log all world.Topic() calls
+/datum/config_entry/flag/log_world_topic
+
/// logs all timers in buckets on automatic bucket reset (Useful for timer debugging)
/datum/config_entry/flag/log_timers_on_bucket_reset
+/// Log human readable versions of json log entries
+/datum/config_entry/flag/log_as_human_readable
+ default = TRUE
+
// FIXME: Unused
///datum/config_entry/string/nudge_script_path // where the nudge.py script is located
// default = "nudge.py"
@@ -194,6 +206,22 @@
config_entry_value = 15
min_val = 0
+/datum/config_entry/number/error_cooldown // The "cooldown" time for each occurrence of a unique error
+ default = 600
+ integer = FALSE
+ min_val = 0
+
+/datum/config_entry/number/error_limit // How many occurrences before the next will silence them
+ default = 50
+
+/datum/config_entry/number/error_silence_time // How long a unique error will be silenced for
+ default = 6000
+ integer = FALSE
+
+/datum/config_entry/number/error_msg_delay // How long to wait between messaging admins about occurrences of a unique error
+ default = 50
+ integer = FALSE
+
/datum/config_entry/number/fps
default = 20
integer = FALSE
@@ -850,3 +878,6 @@
/// If admins with +DEBUG can queue byond-tracy to run the next round.
/datum/config_entry/flag/allow_tracy_queue
protection = CONFIG_ENTRY_LOCKED
+
+/// log vore interactions
+/datum/config_entry/flag/log_vore
diff --git a/code/controllers/globals.dm b/code/controllers/globals.dm
index b809fb7bd5..5ed37cff85 100644
--- a/code/controllers/globals.dm
+++ b/code/controllers/globals.dm
@@ -53,7 +53,7 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars)
var/list/global_procs = typesof(/datum/controller/global_vars/proc)
var/expected_len = vars.len - gvars_datum_in_built_vars.len
if(global_procs.len != expected_len)
- warning("Unable to detect all global initialization procs! Expected [expected_len] got [global_procs.len]!")
+ WARNING("Unable to detect all global initialization procs! Expected [expected_len] got [global_procs.len]!")
if(global_procs.len)
var/list/expected_global_procs = vars - gvars_datum_in_built_vars
for(var/I in global_procs)
@@ -65,7 +65,7 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars)
call(src, I)()
var/end_tick = world.time
if(end_tick - start_tick)
- warning("Global [replacetext("[I]", "InitGlobal", "")] slept during initialization!")
+ WARNING("Global [replacetext("[I]", "InitGlobal", "")] slept during initialization!")
// Someone make it so this call isn't necessary
populate_legacy_globals()
diff --git a/code/controllers/hooks.dm b/code/controllers/hooks.dm
index 20ba87735d..8cfaa59294 100644
--- a/code/controllers/hooks.dm
+++ b/code/controllers/hooks.dm
@@ -26,14 +26,14 @@
/proc/callHook(hook, list/arguments=null)
var/hook_path = text2path("/hook/[hook]")
if(!hook_path)
- error("Invalid hook '/hook/[hook]' called.")
+ log_world("## ERROR Invalid hook '/hook/[hook]' called.")
return 0
var/requester = new hook_path
var/status = 1
for(var/P in typesof("[hook_path]/proc"))
if(!call(requester, P)(arglist(arguments)))
- error("Hook '[P]' failed or runtimed.")
+ log_world("## ERROR Hook '[P]' failed or runtimed.")
status = 0
return status
diff --git a/code/controllers/master.dm b/code/controllers/master.dm
index 8730d0c27f..12c767a8f8 100644
--- a/code/controllers/master.dm
+++ b/code/controllers/master.dm
@@ -506,11 +506,11 @@ ADMIN_VERB(cmd_controller_view_ui, R_SERVER|R_DEBUG, "Controller Overview", "Vie
// Gave invalid return value.
if(result && !(result in valid_results))
- warning("[subsystem.name] subsystem initialized, returning invalid result [result]. This is a bug.")
+ WARNING("[subsystem.name] subsystem initialized, returning invalid result [result]. This is a bug.")
// just returned ..() or didn't implement Initialize() at all
if(result == SS_INIT_NONE)
- warning("[subsystem.name] subsystem does not implement Initialize() or it returns ..(). If the former is true, the SS_NO_INIT flag should be set for this subsystem.")
+ WARNING("[subsystem.name] subsystem does not implement Initialize() or it returns ..(). If the former is true, the SS_NO_INIT flag should be set for this subsystem.")
if(result != SS_INIT_FAILURE)
// Some form of success, implicit failure, or the SS in unused.
diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm
index 6f157b7bcf..6fcf3e8596 100644
--- a/code/controllers/master_controller.dm
+++ b/code/controllers/master_controller.dm
@@ -16,7 +16,7 @@ var/global/last_tick_duration = 0
/datum/controller/game_controller/New()
//There can be only one master_controller. Out with the old and in with the new.
if(master_controller != src)
- log_debug("Rebuilding Master Controller")
+ log_world("Rebuilding Master Controller")
if(istype(master_controller))
qdel(master_controller)
master_controller = src
diff --git a/code/controllers/subsystems/air.dm b/code/controllers/subsystems/air.dm
index 56feb0df98..77d2238e4e 100644
--- a/code/controllers/subsystems/air.dm
+++ b/code/controllers/subsystems/air.dm
@@ -166,7 +166,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
for(var/turf/T in E.connecting_turfs)
edge_log += "+--- Connecting Turf [T] ([T.type]) @ [T.x], [T.y], [T.z] ([T.loc])"
- log_debug("Active Edges on ZAS Startup\n" + edge_log.Join("\n"))
+ log_mapping("Active Edges on ZAS Startup\n" + edge_log.Join("\n"))
startup_active_edge_log = edge_log.Copy()
return SS_INIT_SUCCESS
diff --git a/code/controllers/subsystems/chemistry.dm b/code/controllers/subsystems/chemistry.dm
index 6de865b9fd..158b413b5d 100644
--- a/code/controllers/subsystems/chemistry.dm
+++ b/code/controllers/subsystems/chemistry.dm
@@ -15,7 +15,6 @@ SUBSYSTEM_DEF(chemistry)
var/list/chemical_reagents = list()
/datum/controller/subsystem/chemistry/Recover()
- log_debug("[name] subsystem Recover().")
chemical_reactions = SSchemistry.chemical_reactions
chemical_reagents = SSchemistry.chemical_reagents
diff --git a/code/controllers/subsystems/dbcore.dm b/code/controllers/subsystems/dbcore.dm
index b8acc18c9b..aaafbb0282 100644
--- a/code/controllers/subsystems/dbcore.dm
+++ b/code/controllers/subsystems/dbcore.dm
@@ -84,7 +84,7 @@ SUBSYSTEM_DEF(dbcore)
var/datum/db_query/query = popleft(processing_queries)
if(world.time - query.last_activity_time > (5 MINUTES))
stack_trace("Found undeleted query, check the sql.log for the undeleted query and add a delete call to the query datum.")
- log_debug("Undeleted query: \"[query.sql]\" LA: [query.last_activity] LAT: [query.last_activity_time]")
+ log_sql("Undeleted query: \"[query.sql]\" LA: [query.last_activity] LAT: [query.last_activity_time]")
qdel(query)
if(MC_TICK_CHECK)
return
@@ -141,7 +141,7 @@ SUBSYSTEM_DEF(dbcore)
/datum/controller/subsystem/dbcore/Shutdown()
shutting_down = TRUE
- log_debug("Clearing DB queries standby:[length(queries_standby)] active: [length(queries_active)] all: [length(all_queries)]")
+ log_sql("Clearing DB queries standby:[length(queries_standby)] active: [length(queries_active)] all: [length(all_queries)]")
//This is as close as we can get to the true round end before Disconnect() without changing where it's called, defeating the reason this is a subsystem
if(SSdbcore.Connect())
//Execute all waiting queries
@@ -162,7 +162,7 @@ SUBSYSTEM_DEF(dbcore)
query_round_shutdown.Execute(FALSE)
qdel(query_round_shutdown)
- log_debug("Done clearing DB queries standby:[length(queries_standby)] active: [length(queries_active)] all: [length(all_queries)]")
+ log_sql("Done clearing DB queries standby:[length(queries_standby)] active: [length(queries_active)] all: [length(all_queries)]")
if(IsConnected())
Disconnect()
//stop_db_daemon()
@@ -237,7 +237,7 @@ SUBSYSTEM_DEF(dbcore)
else
connection = null
last_error = result["data"]
- log_debug("Connect() failed | [last_error]")
+ log_sql("Connect() failed | [last_error]")
++failed_connections
/datum/controller/subsystem/dbcore/proc/CheckSchemaVersion()
@@ -245,9 +245,9 @@ SUBSYSTEM_DEF(dbcore)
if(Connect())
log_world("Database connection established.")
else
- log_debug("Your server failed to establish a connection with the database.")
+ log_sql("Your server failed to establish a connection with the database.")
else
- log_debug("Database is not enabled in configuration.")
+ log_sql("Database is not enabled in configuration.")
/datum/controller/subsystem/dbcore/proc/InitializeRound()
if(!Connect())
@@ -539,12 +539,12 @@ Ignore_errors instructes mysql to continue inserting rows if some of them have e
. = (status != DB_QUERY_BROKEN)
var/timed_out = !. && findtext(last_error, "Operation timed out")
if(!. && log_error)
- log_debug("[last_error] | Query used: [sql] | Arguments: [json_encode(arguments)]")
+ log_sql("[last_error] | Query used: [sql] | Arguments: [json_encode(arguments)]")
if(!async && timed_out)
- log_debug("Query execution started at [start_time]")
- log_debug("Query execution ended at [REALTIMEOFDAY]")
- log_debug("Slow query timeout detected.")
- log_debug("Query used: [sql]")
+ log_sql("Query execution started at [start_time]")
+ log_sql("Query execution ended at [REALTIMEOFDAY]")
+ log_sql("Slow query timeout detected.")
+ log_sql("Query used: [sql]")
slow_query_check()
/// Sleeps until execution of the query has finished.
diff --git a/code/controllers/subsystems/events.dm b/code/controllers/subsystems/events.dm
index f5b495b8a3..cc5e950913 100644
--- a/code/controllers/subsystems/events.dm
+++ b/code/controllers/subsystems/events.dm
@@ -58,7 +58,7 @@ SUBSYSTEM_DEF(events)
active_events -= E
if(!E.event_meta || !E.severity) // datum/event is used here and there for random reasons, maintaining "backwards compatibility"
- log_debug("Event of '[E.type]' with missing meta-data has completed.")
+ log_game("Event of '[E.type]' with missing meta-data has completed.")
return
finished_events += E
@@ -69,7 +69,7 @@ SUBSYSTEM_DEF(events)
if(EM.add_to_queue)
EC.available_events += EM
- log_debug("Event '[EM.name]' has completed at [stationtime2text()].")
+ log_game("Event '[EM.name]' has completed at [stationtime2text()].")
/datum/controller/subsystem/events/proc/delay_events(var/severity, var/delay)
var/datum/event_container/EC = event_containers[severity]
diff --git a/code/controllers/subsystems/events2.dm b/code/controllers/subsystems/events2.dm
index a30d2a970a..8f9f8bb1d8 100644
--- a/code/controllers/subsystems/events2.dm
+++ b/code/controllers/subsystems/events2.dm
@@ -30,10 +30,10 @@ SUBSYSTEM_DEF(event_ticker)
event_started(E)
/datum/controller/subsystem/event_ticker/proc/event_started(datum/event2/event/E)
- log_debug("Event [E.type] is now being ran.")
+ log_game("Event [E.type] is now being ran.")
active_events += E
/datum/controller/subsystem/event_ticker/proc/event_finished(datum/event2/event/E)
- log_debug("Event [E.type] has finished.")
+ log_game("Event [E.type] has finished.")
active_events -= E
finished_events += E
diff --git a/code/controllers/subsystems/game_master.dm b/code/controllers/subsystems/game_master.dm
index ec9ae6378b..7430187c81 100644
--- a/code/controllers/subsystems/game_master.dm
+++ b/code/controllers/subsystems/game_master.dm
@@ -21,7 +21,7 @@ SUBSYSTEM_DEF(game_master)
var/next_event = 0 // Minimum amount of time of nothingness until the GM can pick something again.
- var/debug_messages = FALSE // If true, debug information is written to `log_debug()`.
+ var/debug_messages = FALSE // If true, debug information is written to `log_world()`.
/datum/controller/subsystem/game_master/Initialize()
var/list/subtypes = subtypesof(/datum/event2/meta)
@@ -114,7 +114,7 @@ SUBSYSTEM_DEF(game_master)
// if(hours < 1 && mins <= 20) // Don't do anything for the first twenty minutes of the round.
// if(!quiet)
-// log_debug("Game Master unable to start event: It is too early.")
+// log_game_master("Game Master unable to start event: It is too early.")
// return FALSE
if(hours >= 2 && mins >= 40) // Don't do anything in the last twenty minutes of the round, as well.
if(!quiet)
@@ -131,7 +131,7 @@ SUBSYSTEM_DEF(game_master)
/datum/controller/subsystem/game_master/proc/log_game_master(message)
if(debug_messages)
- log_debug("GAME MASTER: [message]")
+ log_world("GAME MASTER: [message]")
// This object makes the actual decisions.
diff --git a/code/controllers/subsystems/garbage.dm b/code/controllers/subsystems/garbage.dm
index edd49b798f..eda5602107 100644
--- a/code/controllers/subsystems/garbage.dm
+++ b/code/controllers/subsystems/garbage.dm
@@ -113,7 +113,7 @@ SUBSYSTEM_DEF(garbage)
if(LAZYLEN(I.extra_details))
entry["Deleted Metadata"] = I.extra_details
- log_debug("", del_log)
+ log_qdel("", del_log)
/datum/controller/subsystem/garbage/fire()
//the fact that this resets its processing each fire (rather then resume where it left off) is intentional.
diff --git a/code/controllers/subsystems/job.dm b/code/controllers/subsystems/job.dm
index 0d610f195e..15b6e1ff98 100644
--- a/code/controllers/subsystems/job.dm
+++ b/code/controllers/subsystems/job.dm
@@ -142,4 +142,4 @@ SUBSYSTEM_DEF(job)
/datum/controller/subsystem/job/proc/job_debug_message(message)
if(debug_messages)
- log_debug("JOB DEBUG: [message]")
+ log_world("JOB DEBUG: [message]")
diff --git a/code/controllers/subsystems/machines.dm b/code/controllers/subsystems/machines.dm
index 991fac53f1..80ee1e4fc4 100644
--- a/code/controllers/subsystems/machines.dm
+++ b/code/controllers/subsystems/machines.dm
@@ -192,19 +192,19 @@ SUBSYSTEM_DEF(machines)
/datum/controller/subsystem/machines/Recover()
for(var/datum/D as anything in SSmachines.networks)
if(!istype(D, /datum/pipe_network))
- error("Found wrong type during SSmachinery recovery: list=SSmachines.networks, item=[D], type=[D?.type]")
+ log_world("## ERROR Found wrong type during SSmachinery recovery: list=SSmachines.networks, item=[D], type=[D?.type]")
SSmachines.networks -= D
for(var/datum/D as anything in SSmachines.processing_machines)
if(!istype(D, /obj/machinery))
- error("Found wrong type during SSmachinery recovery: list=SSmachines.machines, item=[D], type=[D?.type]")
+ log_world("## ERROR Found wrong type during SSmachinery recovery: list=SSmachines.machines, item=[D], type=[D?.type]")
SSmachines.processing_machines -= D
for(var/datum/D as anything in SSmachines.powernets)
if(!istype(D, /datum/powernet))
- error("Found wrong type during SSmachinery recovery: list=SSmachines.powernets, item=[D], type=[D?.type]")
+ log_world("## ERROR Found wrong type during SSmachinery recovery: list=SSmachines.powernets, item=[D], type=[D?.type]")
SSmachines.powernets -= D
for(var/datum/D as anything in SSmachines.powerobjs)
if(!istype(D, /obj/item))
- error("Found wrong type during SSmachinery recovery: list=SSmachines.powerobjs, item=[D], type=[D?.type]")
+ log_world("## ERROR Found wrong type during SSmachinery recovery: list=SSmachines.powerobjs, item=[D], type=[D?.type]")
SSmachines.powerobjs -= D
all_machines = SSmachines.all_machines
diff --git a/code/controllers/subsystems/mapping.dm b/code/controllers/subsystems/mapping.dm
index f49d004998..50fb5f2bc9 100644
--- a/code/controllers/subsystems/mapping.dm
+++ b/code/controllers/subsystems/mapping.dm
@@ -59,7 +59,7 @@ SUBSYSTEM_DEF(mapping)
var/turf/T = get_turf(engine_loader)
if(!isturf(T))
- to_world_log("[log_info_line(engine_loader)] not on a turf! Cannot place engine template.")
+ log_mapping("[log_info_line(engine_loader)] not on a turf! Cannot place engine template.")
return
// Choose an engine type
@@ -68,7 +68,7 @@ SUBSYSTEM_DEF(mapping)
var/chosen_name = pick(CONFIG_GET(str_list/engine_map))
chosen_type = map_templates[chosen_name]
if(!istype(chosen_type))
- error("Configured engine map [chosen_name] is not a valid engine map name!")
+ log_mapping("Configured engine map [chosen_name] is not a valid engine map name!")
if(!istype(chosen_type))
var/list/engine_types = list()
for(var/map in map_templates)
@@ -76,7 +76,7 @@ SUBSYSTEM_DEF(mapping)
if(istype(MT))
engine_types += MT
chosen_type = pick(engine_types)
- to_world_log("Chose Engine Map: [chosen_type.name]")
+ log_mapping("Chose Engine Map: [chosen_type.name]")
admin_notice(span_danger("Chose Engine Map: [chosen_type.name]"), R_DEBUG)
// Annihilate movable atoms
@@ -94,12 +94,12 @@ SUBSYSTEM_DEF(mapping)
for(var/list/maplist in deffo_load)
if(!islist(maplist))
- error("Lateload Z level [maplist] is not a list! Must be in a list!")
+ log_mapping("Lateload Z level [maplist] is not a list! Must be in a list!")
continue
for(var/mapname in maplist)
var/datum/map_template/MT = map_templates[mapname]
if(!istype(MT))
- error("Lateload Z level \"[mapname]\" is not a valid map!")
+ log_mapping("Lateload Z level \"[mapname]\" is not a valid map!")
continue
admin_notice("Lateload: [MT]", R_DEBUG)
MT.load_new_z(centered = FALSE)
@@ -112,7 +112,7 @@ SUBSYSTEM_DEF(mapping)
return
if(!islist(picklist)) //So you can have a 'chain' of z-levels that make up one away mission
- error("Randompick Z level [picklist] is not a list! Must be in a list!")
+ log_mapping("Randompick Z level [picklist] is not a list! Must be in a list!")
return
for(var/map in picklist)
@@ -122,7 +122,7 @@ SUBSYSTEM_DEF(mapping)
map = pick(map)
var/datum/map_template/MT = map_templates[map]
if(!istype(MT))
- error("Randompick Z level \"[map]\" is not a valid map!")
+ log_mapping("Randompick Z level \"[map]\" is not a valid map!")
else
admin_notice("Gateway: [MT]", R_DEBUG)
MT.load_new_z(centered = FALSE)
@@ -134,7 +134,7 @@ SUBSYSTEM_DEF(mapping)
return
if(!islist(picklist)) //So you can have a 'chain' of z-levels that make up one away mission
- error("Randompick Z level [picklist] is not a list! Must be in a list!")
+ log_mapping("Randompick Z level [picklist] is not a list! Must be in a list!")
return
for(var/map in picklist)
@@ -144,7 +144,7 @@ SUBSYSTEM_DEF(mapping)
map = pick(map)
var/datum/map_template/MT = map_templates[map]
if(!istype(MT))
- error("Randompick Z level \"[map]\" is not a valid map!")
+ log_mapping("Randompick Z level \"[map]\" is not a valid map!")
else
admin_notice("OM Adventure: [MT]", R_DEBUG)
MT.load_new_z(centered = FALSE)
@@ -156,7 +156,7 @@ SUBSYSTEM_DEF(mapping)
return
if(!islist(picklist)) //So you can have a 'chain' of z-levels that make up one away mission
- error("Randompick Z level [picklist] is not a list! Must be in a list!")
+ log_mapping("Randompick Z level [picklist] is not a list! Must be in a list!")
return
for(var/map in picklist)
@@ -166,7 +166,7 @@ SUBSYSTEM_DEF(mapping)
map = pick(map)
var/datum/map_template/MT = map_templates[map]
if(!istype(MT))
- error("Randompick Z level \"[map]\" is not a valid map!")
+ log_mapping("Randompick Z level \"[map]\" is not a valid map!")
else
admin_notice("Redgate: [MT]", R_DEBUG)
MT.load_new_z(centered = FALSE)
diff --git a/code/controllers/subsystems/media_tracks.dm b/code/controllers/subsystems/media_tracks.dm
index 0c567cf63c..0843847ee7 100644
--- a/code/controllers/subsystems/media_tracks.dm
+++ b/code/controllers/subsystems/media_tracks.dm
@@ -20,33 +20,33 @@ SUBSYSTEM_DEF(media_tracks)
report_progress("Loading jukebox track: [filename]")
if(!fexists(filename))
- error("File not found: [filename]")
+ log_world("## ERROR File not found: [filename]")
continue
var/list/jsonData = json_decode(file2text(filename))
if(!istype(jsonData))
- error("Failed to read tracks from [filename], json_decode failed.")
+ log_world("## ERROR Failed to read tracks from [filename], json_decode failed.")
continue
for(var/entry in jsonData)
// Critical problems that will prevent the track from working
if(!istext(entry["url"]))
- error("Jukebox entry in [filename]: bad or missing 'url'. Tracks must have a URL.")
+ log_world("## ERROR Jukebox entry in [filename]: bad or missing 'url'. Tracks must have a URL.")
continue
if(!istext(entry["title"]))
- error("Jukebox entry in [filename]: bad or missing 'title'. Tracks must have a title.")
+ log_world("## ERROR Jukebox entry in [filename]: bad or missing 'title'. Tracks must have a title.")
continue
if(!isnum(entry["duration"]))
- error("Jukebox entry in [filename]: bad or missing 'duration'. Tracks must have a duration (in deciseconds).")
+ log_world("## ERROR Jukebox entry in [filename]: bad or missing 'duration'. Tracks must have a duration (in deciseconds).")
continue
// Noncritical problems, we can keep going anyway, but warn so it can be fixed
if(!istext(entry["artist"]))
- warning("Jukebox entry in [filename], [entry["title"]]: bad or missing 'artist'. Please consider crediting the artist.")
+ WARNING("Jukebox entry in [filename], [entry["title"]]: bad or missing 'artist'. Please consider crediting the artist.")
if(!istext(entry["genre"]))
- warning("Jukebox entry in [filename], [entry["title"]]: bad or missing 'genre'. Please consider adding a genre.")
+ WARNING("Jukebox entry in [filename], [entry["title"]]: bad or missing 'genre'. Please consider adding a genre.")
var/datum/track/T = new(entry["url"], entry["title"], entry["duration"], entry["artist"], entry["genre"])
diff --git a/code/controllers/subsystems/overmap_renamer_vr.dm b/code/controllers/subsystems/overmap_renamer_vr.dm
index 4880dbbdc9..5004a24944 100644
--- a/code/controllers/subsystems/overmap_renamer_vr.dm
+++ b/code/controllers/subsystems/overmap_renamer_vr.dm
@@ -28,8 +28,8 @@ if we end up with multiple renamable lateload overmap objects.*/
V.modify_descriptors()
if(V.visitable_renamed) //could just if(D.modify_descriptors()), but having a var recording renaming is useful for debugging and stuff!
if(V.known)
- to_world_log("##Overmap Renamer: Renamed Debris Field as: [V.name]")
+ log_mapping("##Overmap Renamer: Renamed Debris Field as: [V.name]")
admin_notice(span_danger("Debris Field name chosen as [V.name]"), R_DEBUG)
else
- to_world_log("##Overmap Renamer: Renamed Debris Field as: [V.real_name]")
+ log_mapping("##Overmap Renamer: Renamed Debris Field as: [V.real_name]")
admin_notice(span_danger("Debris Field name chosen as [V.real_name]"), R_DEBUG)
diff --git a/code/controllers/subsystems/pois.dm b/code/controllers/subsystems/pois.dm
index 053e6abfc1..f63f19d152 100644
--- a/code/controllers/subsystems/pois.dm
+++ b/code/controllers/subsystems/pois.dm
@@ -12,7 +12,7 @@ SUBSYSTEM_DEF(points_of_interest)
/datum/controller/subsystem/points_of_interest/Initialize()
while (poi_queue.len)
load_next_poi()
- to_world_log("Initializing POIs")
+ log_mapping("Initializing POIs")
admin_notice(span_danger("Initializing POIs"), R_DEBUG)
return SS_INIT_SUCCESS
@@ -50,7 +50,7 @@ SUBSYSTEM_DEF(points_of_interest)
return
var/turf/T = get_turf(poi_to_load)
if(!isturf(T))
- to_world_log("[log_info_line(poi_to_load)] not on a turf! Cannot place poi template.")
+ log_mapping("[log_info_line(poi_to_load)] not on a turf! Cannot place poi template.")
return
// Choose a poi
diff --git a/code/controllers/subsystems/processing/bellies_vr.dm b/code/controllers/subsystems/processing/bellies_vr.dm
index ad2a3e23e8..11b49b570c 100644
--- a/code/controllers/subsystems/processing/bellies_vr.dm
+++ b/code/controllers/subsystems/processing/bellies_vr.dm
@@ -9,12 +9,12 @@ PROCESSING_SUBSYSTEM_DEF(bellies)
runlevels = RUNLEVEL_GAME|RUNLEVEL_POSTGAME
/datum/controller/subsystem/processing/bellies/Recover()
- log_debug("[name] subsystem Recover().")
+ log_runtime("[name] subsystem Recover().")
if(SSbellies.current_thing)
- log_debug("current_thing was: (\ref[SSbellies.current_thing])[SSbellies.current_thing]([SSbellies.current_thing.type]) - currentrun: [SSbellies.currentrun.len] vs total: [SSbellies.processing.len]")
+ log_runtime("current_thing was: (\ref[SSbellies.current_thing])[SSbellies.current_thing]([SSbellies.current_thing.type]) - currentrun: [SSbellies.currentrun.len] vs total: [SSbellies.processing.len]")
var/list/old_processing = SSbellies.processing.Copy()
for(var/datum/D in old_processing)
if(!isbelly(D))
- log_debug("[name] subsystem Recover() found inappropriate item in list: [D.type]")
+ log_runtime("[name] subsystem Recover() found inappropriate item in list: [D.type]")
if(CHECK_BITFIELD(D.datum_flags, DF_ISPROCESSING))
processing |= D
diff --git a/code/controllers/subsystems/processing/fastprocess.dm b/code/controllers/subsystems/processing/fastprocess.dm
index 407477f9b0..91e0de8775 100644
--- a/code/controllers/subsystems/processing/fastprocess.dm
+++ b/code/controllers/subsystems/processing/fastprocess.dm
@@ -7,9 +7,9 @@ PROCESSING_SUBSYSTEM_DEF(fastprocess)
flags = SS_NO_INIT
/datum/controller/subsystem/processing/fastprocess/Recover()
- log_debug("[name] subsystem Recover().")
+ log_runtime("[name] subsystem Recover().")
if(SSfastprocess.current_thing)
- log_debug("current_thing was: (\ref[SSfastprocess.current_thing])[SSfastprocess.current_thing]([SSfastprocess.current_thing.type]) - currentrun: [SSfastprocess.currentrun.len] vs total: [SSfastprocess.processing.len]")
+ log_runtime("current_thing was: (\ref[SSfastprocess.current_thing])[SSfastprocess.current_thing]([SSfastprocess.current_thing.type]) - currentrun: [SSfastprocess.currentrun.len] vs total: [SSfastprocess.processing.len]")
var/list/old_processing = SSfastprocess.processing.Copy()
for(var/datum/D in old_processing)
if(CHECK_BITFIELD(D.datum_flags, DF_ISPROCESSING))
diff --git a/code/controllers/subsystems/processing/obj.dm b/code/controllers/subsystems/processing/obj.dm
index 8812a59663..8f4f562e1d 100644
--- a/code/controllers/subsystems/processing/obj.dm
+++ b/code/controllers/subsystems/processing/obj.dm
@@ -5,12 +5,12 @@ PROCESSING_SUBSYSTEM_DEF(obj)
wait = 20
/datum/controller/subsystem/processing/obj/Recover()
- log_debug("[name] subsystem Recover().")
+ log_runtime("[name] subsystem Recover().")
if(SSobj.current_thing)
- log_debug("current_thing was: (\ref[SSobj.current_thing])[SSobj.current_thing]([SSobj.current_thing.type]) - currentrun: [SSobj.currentrun.len] vs total: [SSobj.processing.len]")
+ log_runtime("current_thing was: (\ref[SSobj.current_thing])[SSobj.current_thing]([SSobj.current_thing.type]) - currentrun: [SSobj.currentrun.len] vs total: [SSobj.processing.len]")
var/list/old_processing = SSobj.processing.Copy()
for(var/datum/D in old_processing)
if(!isobj(D))
- log_debug("[name] subsystem Recover() found inappropriate item in list: [D.type]")
+ log_runtime("[name] subsystem Recover() found inappropriate item in list: [D.type]")
if(CHECK_BITFIELD(D.datum_flags, DF_ISPROCESSING))
processing |= D
diff --git a/code/controllers/subsystems/processing/processing.dm b/code/controllers/subsystems/processing/processing.dm
index 42ebfba08c..fb9d6d16e6 100644
--- a/code/controllers/subsystems/processing/processing.dm
+++ b/code/controllers/subsystems/processing/processing.dm
@@ -16,9 +16,9 @@ SUBSYSTEM_DEF(processing)
var/datum/current_thing
/datum/controller/subsystem/processing/Recover()
- log_debug("[name] subsystem Recover().")
+ log_runtime("[name] subsystem Recover().")
if(SSprocessing.current_thing)
- log_debug("current_thing was: (\ref[SSprocessing.current_thing])[SSprocessing.current_thing]([SSprocessing.current_thing.type]) - currentrun: [SSprocessing.currentrun.len] vs total: [SSprocessing.processing.len]")
+ log_runtime("current_thing was: (\ref[SSprocessing.current_thing])[SSprocessing.current_thing]([SSprocessing.current_thing.type]) - currentrun: [SSprocessing.currentrun.len] vs total: [SSprocessing.processing.len]")
var/list/old_processing = SSprocessing.processing.Copy()
for(var/datum/D in old_processing)
if(CHECK_BITFIELD(D.datum_flags, DF_ISPROCESSING))
@@ -66,7 +66,6 @@ SUBSYSTEM_DEF(processing)
msg += "- Process subsystems are processed tail-first -\n"
if(!currentrun || !processing)
msg += "ERROR: A critical list [currentrun ? "processing" : "currentrun"] is gone!"
- log_game(msg)
log_world(msg)
return
msg += "Lists: current_run: [currentrun.len], processing: [processing.len]\n"
@@ -93,7 +92,6 @@ SUBSYSTEM_DEF(processing)
for(var/i in start to end)
msg += "[describeThis(processing[i])][i == position ? " << TAIL" : ""]\n"
msg += "---\n"
- log_game(msg)
log_world(msg)
/datum/proc/DebugSubsystemProcess(var/wait, var/times_fired, var/datum/controller/subsystem/processing/subsystem)
diff --git a/code/controllers/subsystems/processing/projectiles.dm b/code/controllers/subsystems/processing/projectiles.dm
index 3e5e1b2127..f901b3125a 100644
--- a/code/controllers/subsystems/processing/projectiles.dm
+++ b/code/controllers/subsystems/processing/projectiles.dm
@@ -9,9 +9,9 @@ PROCESSING_SUBSYSTEM_DEF(projectiles)
var/global_iterations_per_move = 16
/datum/controller/subsystem/processing/projectiles/Recover()
- log_debug("[name] subsystem Recover().")
+ log_runtime("[name] subsystem Recover().")
if(SSprojectiles.current_thing)
- log_debug("current_thing was: (\ref[SSprojectiles.current_thing])[SSprojectiles.current_thing]([SSprojectiles.current_thing.type]) - currentrun: [SSprojectiles.currentrun.len] vs total: [SSprojectiles.processing.len]")
+ log_runtime("current_thing was: (\ref[SSprojectiles.current_thing])[SSprojectiles.current_thing]([SSprojectiles.current_thing.type]) - currentrun: [SSprojectiles.currentrun.len] vs total: [SSprojectiles.processing.len]")
var/list/old_processing = SSprojectiles.processing.Copy()
for(var/datum/D in old_processing)
if(CHECK_BITFIELD(D.datum_flags, DF_ISPROCESSING))
diff --git a/code/controllers/subsystems/processing/turfs.dm b/code/controllers/subsystems/processing/turfs.dm
index 509ec4f17b..bb1044bc43 100644
--- a/code/controllers/subsystems/processing/turfs.dm
+++ b/code/controllers/subsystems/processing/turfs.dm
@@ -4,12 +4,12 @@ PROCESSING_SUBSYSTEM_DEF(turfs)
flags = SS_NO_INIT
/datum/controller/subsystem/processing/turfs/Recover()
- log_debug("[name] subsystem Recover().")
+ log_runtime("[name] subsystem Recover().")
if(SSturfs.current_thing)
- log_debug("current_thing was: (\ref[SSturfs.current_thing])[SSturfs.current_thing]([SSturfs.current_thing.type]) - currentrun: [SSturfs.currentrun.len] vs total: [SSturfs.processing.len]")
+ log_runtime("current_thing was: (\ref[SSturfs.current_thing])[SSturfs.current_thing]([SSturfs.current_thing.type]) - currentrun: [SSturfs.currentrun.len] vs total: [SSturfs.processing.len]")
var/list/old_processing = SSturfs.processing.Copy()
for(var/datum/D in old_processing)
if(!isturf(D))
- log_debug("[name] subsystem Recover() found inappropriate item in list: [D.type]")
+ log_runtime("[name] subsystem Recover() found inappropriate item in list: [D.type]")
if(CHECK_BITFIELD(D.datum_flags, DF_ISPROCESSING))
processing |= D
diff --git a/code/controllers/subsystems/shuttles.dm b/code/controllers/subsystems/shuttles.dm
index ac8825feb4..ded9b4c462 100644
--- a/code/controllers/subsystems/shuttles.dm
+++ b/code/controllers/subsystems/shuttles.dm
@@ -58,7 +58,7 @@ SUBSYSTEM_DEF(shuttles)
var/datum/shuttle/S = working_shuttles[working_shuttles.len]
working_shuttles.len--
if(!istype(S) || QDELETED(S))
- error("Bad entry in SSshuttles.process_shuttles - [log_info_line(S)] ")
+ log_world("## ERROR Bad entry in SSshuttles.process_shuttles - [log_info_line(S)] ")
process_shuttles -= S
continue
// NOTE - In old system, /datum/shuttle/ferry was processed only if (F.process_state || F.always_process)
@@ -147,7 +147,7 @@ SUBSYSTEM_DEF(shuttles)
if(initial(shuttle.category) != shuttle_type) // Skip if its an "abstract class" datum
shuttle = new shuttle()
shuttle_areas |= shuttle.shuttle_area
- log_debug("Initialized shuttle [shuttle] ([shuttle.type])")
+ log_world("Initialized shuttle [shuttle] ([shuttle.type])")
return shuttle
// Historical note: No need to call shuttle.init_docking_controllers(), controllers register themselves
// and shuttles fetch refs in New(). Shuttles also dock() themselves in new if they want.
@@ -161,7 +161,7 @@ SUBSYSTEM_DEF(shuttles)
S.motherdock = S.current_location.landmark_tag
mothership.shuttle_area |= S.shuttle_area
else
- error("Shuttle [S] was unable to find mothership [mothership]!")
+ log_world("## ERROR Shuttle [S] was unable to find mothership [mothership]!")
// Let shuttles scan their owned areas for objects they want to configure (Called after mothership hookup)
/datum/controller/subsystem/shuttles/proc/hook_up_shuttle_objects(shuttles_list)
diff --git a/code/controllers/subsystems/sqlite.dm b/code/controllers/subsystems/sqlite.dm
index bb2da0b118..1857a7db6f 100644
--- a/code/controllers/subsystems/sqlite.dm
+++ b/code/controllers/subsystems/sqlite.dm
@@ -24,10 +24,10 @@ SUBSYSTEM_DEF(sqlite)
if(!sqlite_db)
- to_world_log("Failed to load or create a SQLite database.")
- log_debug("ERROR: SQLite database is active in config but failed to load.")
+ log_sql("Failed to load or create a SQLite database.")
+ log_sql("ERROR: SQLite database is active in config but failed to load.")
else
- to_world_log("Sqlite database connected.")
+ log_sql("Sqlite database connected.")
// Makes the tables, if they do not already exist in the sqlite file.
/datum/controller/subsystem/sqlite/proc/init_schema(database/sqlite_object)
@@ -66,7 +66,7 @@ SUBSYSTEM_DEF(sqlite)
// The desc parameter should be unique for each call, to make it easier to track down where the error occured.
/datum/controller/subsystem/sqlite/proc/sqlite_check_for_errors(var/database/query/query_used, var/desc)
if(query_used && query_used.ErrorMsg())
- log_debug("SQLite Error: [desc] : [query_used.ErrorMsg()]")
+ log_sql("SQLite Error: [desc] : [query_used.ErrorMsg()]")
return TRUE
return FALSE
@@ -171,7 +171,7 @@ SUBSYSTEM_DEF(sqlite)
// This stops mods/admins/etc from guessing the author by shoving names in an MD5 hasher until they pick the right one.
// Don't use this for things needing actual security.
/datum/controller/subsystem/sqlite/proc/get_feedback_pepper()
- var/pepper_file = file2list("config/sqlite_feedback_pepper.txt")
+ var/pepper_file = world.file2list("config/sqlite_feedback_pepper.txt")
var/pepper = null
for(var/line in pepper_file)
if(!line)
diff --git a/code/controllers/subsystems/supply.dm b/code/controllers/subsystems/supply.dm
index 36f60c2fc3..05a3e34028 100644
--- a/code/controllers/subsystems/supply.dm
+++ b/code/controllers/subsystems/supply.dm
@@ -168,7 +168,7 @@ SUBSYSTEM_DEF(supply)
A.req_access = L.Copy()
LAZYCLEARLIST(A.req_one_access)
else
- log_debug(span_danger("Supply pack with invalid access restriction [SP.access] encountered!"))
+ log_runtime(span_danger("Supply pack with invalid access restriction [SP.access] encountered!"))
//supply manifest generation begin
var/obj/item/paper/manifest/slip
diff --git a/code/controllers/subsystems/ticker.dm b/code/controllers/subsystems/ticker.dm
index d25a8aa500..5f94f93234 100644
--- a/code/controllers/subsystems/ticker.dm
+++ b/code/controllers/subsystems/ticker.dm
@@ -176,7 +176,7 @@ SUBSYSTEM_DEF(ticker)
end_game_state = END_GAME_MODE_FINISHED // Only do this cleanup once!
mode.cleanup()
//call a transfer shuttle vote
- to_world(span_boldannounce("The round has ended!"))
+ to_chat(world, span_boldannounce("The round has ended!"))
SSvote.start_vote(new /datum/vote/crew_transfer)
// FIXME: IMPROVE THIS LATER!
@@ -184,7 +184,7 @@ SUBSYSTEM_DEF(ticker)
post_game_tick()
if (world.time - last_restart_notify >= 1 MINUTE && !delay_end)
- to_world(span_boldannounce("Restarting in [round(restart_timeleft/600, 1)] minute\s."))
+ to_chat(world, span_boldannounce("Restarting in [round(restart_timeleft/600, 1)] minute\s."))
last_restart_notify = world.time
/datum/controller/subsystem/ticker/proc/setup()
@@ -276,7 +276,7 @@ SUBSYSTEM_DEF(ticker)
var/list/runnable_modes = config.get_runnable_modes()
if((GLOB.master_mode == "random") || (GLOB.master_mode == "secret"))
if(!runnable_modes.len)
- to_world(span_filter_system(span_bold("Unable to choose playable game mode.") + " Reverting to pregame lobby."))
+ to_chat(world, span_filter_system(span_bold("Unable to choose playable game mode.") + " Reverting to pregame lobby."))
return 0
if(GLOB.secret_force_mode != "secret")
src.mode = config.pick_mode(GLOB.secret_force_mode)
@@ -289,7 +289,7 @@ SUBSYSTEM_DEF(ticker)
src.mode = config.pick_mode(GLOB.master_mode)
if(!src.mode)
- to_world(span_boldannounce("Serious error in mode setup! Reverting to pregame lobby.")) //Uses setup instead of set up due to computational context.
+ to_chat(world, span_boldannounce("Serious error in mode setup! Reverting to pregame lobby.")) //Uses setup instead of set up due to computational context.
return 0
job_master.ResetOccupations()
@@ -298,21 +298,21 @@ SUBSYSTEM_DEF(ticker)
job_master.DivideOccupations() // Apparently important for new antagonist system to register specific job antags properly.
if(!src.mode.can_start())
- to_world(span_filter_system(span_bold("Unable to start [mode.name].") + " Not enough players readied, [CONFIG_GET(keyed_list/player_requirements)[mode.config_tag]] players needed. Reverting to pregame lobby."))
+ to_chat(world, span_filter_system(span_bold("Unable to start [mode.name].") + " Not enough players readied, [CONFIG_GET(keyed_list/player_requirements)[mode.config_tag]] players needed. Reverting to pregame lobby."))
mode.fail_setup()
mode = null
job_master.ResetOccupations()
return 0
if(hide_mode)
- to_world(span_world(span_notice("The current game mode is - Secret!")))
+ to_chat(world, span_world(span_notice("The current game mode is - Secret!")))
if(runnable_modes.len)
var/list/tmpmodes = list()
for (var/datum/game_mode/M in runnable_modes)
tmpmodes+=M.name
tmpmodes = sortList(tmpmodes)
if(tmpmodes.len)
- to_world(span_filter_system(span_bold("Possibilities:") + " [english_list(tmpmodes, and_text= "; ", comma_text = "; ")]"))
+ to_chat(world, span_filter_system(span_bold("Possibilities:") + " [english_list(tmpmodes, and_text= "; ", comma_text = "; ")]"))
else
src.mode.announce()
return 1
@@ -327,7 +327,7 @@ SUBSYSTEM_DEF(ticker)
feedback_set_details("end_proper", "nuke")
restart_timeleft = 1 MINUTE // No point waiting five minutes if everyone's dead.
if(!delay_end)
- to_world(span_boldannounce("Rebooting due to destruction of [station_name()] in [round(restart_timeleft/600)] minute\s."))
+ to_chat(world, span_boldannounce("Rebooting due to destruction of [station_name()] in [round(restart_timeleft/600)] minute\s."))
last_restart_notify = world.time
else
feedback_set_details("end_proper", "proper completion")
diff --git a/code/controllers/subsystems/time_track.dm b/code/controllers/subsystems/time_track.dm
index 239e99c0b6..eed18d3e27 100644
--- a/code/controllers/subsystems/time_track.dm
+++ b/code/controllers/subsystems/time_track.dm
@@ -1,7 +1,6 @@
SUBSYSTEM_DEF(time_track)
name = "Time Tracking"
- wait = 600
- flags = SS_NO_INIT|SS_NO_TICK_CHECK
+ wait = 100
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
var/time_dilation_current = 0
@@ -15,6 +14,70 @@ SUBSYSTEM_DEF(time_track)
var/last_tick_realtime = 0
var/last_tick_byond_time = 0
var/last_tick_tickcount = 0
+ var/list/sendmaps_names_map = list(
+ "SendMaps" = "send_maps",
+ "SendMaps: Initial housekeeping" = "initial_house",
+ "SendMaps: Cleanup" = "cleanup",
+ "SendMaps: Client loop" = "client_loop",
+ "SendMaps: Per client" = "per_client",
+ "SendMaps: Per client: Deleted images" = "deleted_images",
+ "SendMaps: Per client: HUD update" = "hud_update",
+ "SendMaps: Per client: Statpanel update" = "statpanel_update",
+ "SendMaps: Per client: Map data" = "map_data",
+ "SendMaps: Per client: Map data: Check eye position" = "check_eye_pos",
+ "SendMaps: Per client: Map data: Update chunks" = "update_chunks",
+ "SendMaps: Per client: Map data: Send turfmap updates" = "turfmap_updates",
+ "SendMaps: Per client: Map data: Send changed turfs" = "changed_turfs",
+ "SendMaps: Per client: Map data: Send turf chunk info" = "turf_chunk_info",
+ "SendMaps: Per client: Map data: Send obj changes" = "obj_changes",
+ "SendMaps: Per client: Map data: Send mob changes" = "mob_changes",
+ "SendMaps: Per client: Map data: Send notable turf visual contents" = "send_turf_vis_conts",
+ "SendMaps: Per client: Map data: Send pending animations" = "pending_animations",
+ "SendMaps: Per client: Map data: Look for movable changes" = "look_for_movable_changes",
+ "SendMaps: Per client: Map data: Look for movable changes: Check notable turf visual contents" = "check_turf_vis_conts",
+ "SendMaps: Per client: Map data: Look for movable changes: Check HUD/image visual contents" = "check_hud/image_vis_contents",
+ "SendMaps: Per client: Map data: Look for movable changes: Loop through turfs in range" = "turfs_in_range",
+ "SendMaps: Per client: Map data: Look for movable changes: Movables examined" = "movables_examined",
+ )
+
+/datum/controller/subsystem/time_track/Initialize()
+ //GLOB.perf_log = "[GLOB.log_directory]/perf-[GLOB.round_id ? GLOB.round_id : "NULL"]-[SSmapping.current_map.map_name].csv"
+ GLOB.perf_log = "[GLOB.log_directory]/perf-[GLOB.round_id ? GLOB.round_id : "NULL"]-[using_map.name].csv"
+ world.Profile(PROFILE_RESTART, type = "sendmaps")
+ //Need to do the sendmaps stuff in its own file, since it works different then everything else
+ var/list/sendmaps_headers = list()
+ for(var/proper_name in sendmaps_names_map)
+ sendmaps_headers += sendmaps_names_map[proper_name]
+ sendmaps_headers += "[sendmaps_names_map[proper_name]]_count"
+ log_perf(
+ list(
+ "time",
+ "players",
+ "tidi",
+ "tidi_fastavg",
+ "tidi_avg",
+ "tidi_slowavg",
+ "maptick",
+ "num_timers",
+ "air_turf_cost",
+ "air_eg_cost",
+ "air_highpressure_cost",
+ "air_hotspots_cost",
+ "air_superconductivity_cost",
+ "air_pipenets_cost",
+ "air_rebuilds_cost",
+ "air_turf_count",
+ "air_eg_count",
+ "air_hotspot_count",
+ "air_network_count",
+ "air_delta_count",
+ "air_superconductive_count",
+ "all_queries",
+ "queries_active",
+ "queries_standby"
+ ) + sendmaps_headers
+ )
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/time_track/fire()
@@ -30,11 +93,64 @@ SUBSYSTEM_DEF(time_track)
time_dilation_avg_fast = MC_AVERAGE_FAST(time_dilation_avg_fast, time_dilation_current)
time_dilation_avg = MC_AVERAGE(time_dilation_avg, time_dilation_avg_fast)
time_dilation_avg_slow = MC_AVERAGE_SLOW(time_dilation_avg_slow, time_dilation_avg)
-
- log_game("TIDI: [time_dilation_current];[time_dilation_avg_fast];[time_dilation_avg];[time_dilation_avg_slow]")
+ //GLOB.glide_size_multiplier = (current_byondtime - last_tick_byond_time) / (current_realtime - last_tick_realtime)
else
first_run = FALSE
- log_debug("TiDi Starting Log")
last_tick_realtime = current_realtime
last_tick_byond_time = current_byondtime
last_tick_tickcount = current_tickcount
+
+ var/sendmaps_json = world.Profile(PROFILE_REFRESH, type = "sendmaps", format="json")
+ var/list/send_maps_data = null
+ try
+ send_maps_data = json_decode(sendmaps_json)
+ catch
+ text2file(sendmaps_json,"bad_sendmaps.json")
+ can_fire = FALSE
+ return
+ var/send_maps_sort = send_maps_data.Copy() //Doing it like this guarantees us a properly sorted list
+
+ for(var/list/packet in send_maps_data)
+ send_maps_sort[packet["name"]] = packet
+
+ var/list/send_maps_values = list()
+ for(var/entry_name in sendmaps_names_map)
+ var/list/packet = send_maps_sort[entry_name]
+ if(!packet) //If the entry does not have a value for us, just put in 0 for both
+ send_maps_values += 0
+ send_maps_values += 0
+ continue
+ send_maps_values += packet["value"]
+ send_maps_values += packet["calls"]
+
+ //SSblackbox.record_feedback("associative", "time_dilation_current", 1, list("[ISOtime()]" = list("current" = "[time_dilation_current]", "avg_fast" = "[time_dilation_avg_fast]", "avg" = "[time_dilation_avg]", "avg_slow" = "[time_dilation_avg_slow]")))
+ log_perf(
+ list(
+ world.time,
+ length(GLOB.clients),
+ time_dilation_current,
+ time_dilation_avg_fast,
+ time_dilation_avg,
+ time_dilation_avg_slow,
+ MAPTICK_LAST_INTERNAL_TICK_USAGE,
+ length(SStimer.timer_id_dict),
+ SSair.cost_turfs,
+ //SSair.cost_groups,
+ //SSair.cost_highpressure,
+ SSair.cost_hotspots,
+ //SSair.cost_superconductivity,
+ //SSair.cost_pipenets,
+ //SSair.cost_rebuilds,
+ //length(SSair.active_turfs),
+ //length(SSair.excited_groups),
+ //length(SSair.hotspots),
+ //length(SSair.networks),
+ //length(SSair.high_pressure_delta),
+ //length(SSair.active_super_conductivity),
+ SSdbcore.all_queries_num,
+ SSdbcore.queries_active_num,
+ SSdbcore.queries_standby_num
+ ) + send_maps_values
+ )
+
+ SSdbcore.reset_tracking()
diff --git a/code/controllers/subsystems/transcore_vr.dm b/code/controllers/subsystems/transcore_vr.dm
index 23948787ea..fec9dc87a4 100644
--- a/code/controllers/subsystems/transcore_vr.dm
+++ b/code/controllers/subsystems/transcore_vr.dm
@@ -35,7 +35,7 @@ SUBSYSTEM_DEF(transcore)
for(var/t in subtypesof(/datum/transcore_db))
var/datum/transcore_db/db = new t()
if(!db.key)
- warning("Instantiated transcore DB without a key: [t]")
+ WARNING("Instantiated transcore DB without a key: [t]")
continue
databases[db.key] = db
return SS_INIT_SUCCESS
@@ -100,7 +100,7 @@ SUBSYSTEM_DEF(transcore)
//Invalid record
if(!curr_MR)
- log_debug("Tried to process [name] in transcore w/o a record!")
+ log_runtime("Tried to process [name] in transcore w/o a record!")
db.backed_up -= curr_MR.mindname
continue
@@ -142,7 +142,7 @@ SUBSYSTEM_DEF(transcore)
/datum/controller/subsystem/transcore/Recover()
for(var/key in SStranscore.databases)
if(!SStranscore.databases[key])
- warning("SStranscore recovery found missing database value for key: [key]")
+ WARNING("SStranscore recovery found missing database value for key: [key]")
continue
if(key == "default")
default_db = SStranscore.databases[key]
@@ -151,10 +151,10 @@ SUBSYSTEM_DEF(transcore)
/datum/controller/subsystem/transcore/proc/leave_round(var/mob/M)
if(!istype(M))
- warning("Non-mob asked to be removed from transcore: [M] [M?.type]")
+ WARNING("Non-mob asked to be removed from transcore: [M] [M?.type]")
return
if(!M.mind)
- warning("No mind mob asked to be removed from transcore: [M] [M?.type]")
+ WARNING("No mind mob asked to be removed from transcore: [M] [M?.type]")
return
for(var/key in databases)
@@ -170,7 +170,7 @@ SUBSYSTEM_DEF(transcore)
if(isnull(key))
return default_db
if(!databases[key])
- warning("Tried to find invalid transcore database: [key]")
+ WARNING("Tried to find invalid transcore database: [key]")
return default_db
return databases[key]
@@ -266,7 +266,6 @@ SUBSYSTEM_DEF(transcore)
ASSERT(MR)
backed_up[MR.mindname] = MR
backed_up = sortAssoc(backed_up)
- log_debug("Added [MR.mindname] to transcore DB.")
// Remove a mind_record from the backup-checking list. Keeps track of it in has_left // Why do we do that? ~Leshana
/datum/transcore_db/proc/stop_backup(var/datum/transhuman/mind_record/MR)
@@ -274,7 +273,6 @@ SUBSYSTEM_DEF(transcore)
has_left[MR.mindname] = MR
backed_up.Remove("[MR.mindname]")
MR.cryo_at = world.time
- log_debug("Put [MR.mindname] in transcore suspended DB.")
// Called from body_record to add itself to the transcore.
/datum/transcore_db/proc/add_body(var/datum/transhuman/body_record/BR)
@@ -283,13 +281,11 @@ SUBSYSTEM_DEF(transcore)
qdel(body_scans[BR.mydna.name])
body_scans[BR.mydna.name] = BR
body_scans = sortAssoc(body_scans)
- log_debug("Added [BR.mydna.name] to transcore body DB.")
// Remove a body record from the database (Usually done when someone cryos) // Why? ~Leshana
/datum/transcore_db/proc/remove_body(var/datum/transhuman/body_record/BR)
ASSERT(BR)
body_scans.Remove("[BR.mydna.name]")
- log_debug("Removed [BR.mydna.name] from transcore body DB.")
// Moves all mind records from the databaes into the disk and shuts down all backup canary processing.
/datum/transcore_db/proc/core_dump(var/obj/item/disk/transcore/disk)
diff --git a/code/controllers/subsystems/vote.dm b/code/controllers/subsystems/vote.dm
index d462073c80..754d623650 100644
--- a/code/controllers/subsystems/vote.dm
+++ b/code/controllers/subsystems/vote.dm
@@ -46,16 +46,16 @@ SUBSYSTEM_DEF(vote)
break
if(!players_are_in_round)
- log_debug("The crew transfer shuttle was automatically called at vote time due to no players being present.")
+ log_game("The crew transfer shuttle was automatically called at vote time due to no players being present.")
init_shift_change(null, 1)
return
initiate_vote(VOTE_CREW_TRANSFER, "the server", 1)
- log_debug("The server has called a crew transfer vote.")
+ log_game("The server has called a crew transfer vote.")
/datum/controller/subsystem/vote/proc/autogamemode()
initiate_vote(VOTE_GAMEMODE, "the server", 1)
- log_debug("The server has called a gamemode vote.")
+ log_game("The server has called a gamemode vote.")
/datum/controller/subsystem/vote/proc/reset()
initiator = null
diff --git a/code/controllers/subsystems/webhooks.dm b/code/controllers/subsystems/webhooks.dm
index 17a12f6f77..9b9d53bbe3 100644
--- a/code/controllers/subsystems/webhooks.dm
+++ b/code/controllers/subsystems/webhooks.dm
@@ -13,7 +13,7 @@ SUBSYSTEM_DEF(webhooks)
/datum/controller/subsystem/webhooks/proc/load_webhooks()
if(!fexists(HTTP_POST_DLL_LOCATION))
- to_world_log("Unable to locate HTTP POST lib at [HTTP_POST_DLL_LOCATION], webhooks will not function on this run.")
+ log_world("Unable to locate HTTP POST lib at [HTTP_POST_DLL_LOCATION], webhooks will not function on this run.")
return
var/list/all_webhooks_by_id = list()
@@ -32,7 +32,7 @@ SUBSYSTEM_DEF(webhooks)
var/list/wmention = webhook_data["mentions"]
if(wmention && !islist(wmention))
wmention = list(wmention)
- to_world_log("Setting up webhook [wid].")
+ log_world("Setting up webhook [wid].")
if(wid && wurl && all_webhooks_by_id[wid])
var/decl/webhook/webhook = all_webhooks_by_id[wid]
webhook.urls = islist(wurl) ? wurl : list(wurl)
@@ -44,19 +44,19 @@ SUBSYSTEM_DEF(webhooks)
if(wmention)
webhook.mentions = wmention?.Copy()
webhook_decls[wid] = webhook
- to_world_log("Webhook [wid] ready.")
+ log_world("Webhook [wid] ready.")
else
- to_world_log("Failed to set up webhook [wid].")
+ log_world("Failed to set up webhook [wid].")
/datum/controller/subsystem/webhooks/proc/send(var/wid, var/wdata)
var/decl/webhook/webhook = webhook_decls[wid]
if(webhook)
if(webhook.send(wdata))
- to_world_log("Sent webhook [webhook.id].")
- log_debug("Webhook sent: [webhook.id].")
+ log_world("Sent webhook [webhook.id].")
+ // to_chat(world, "Webhook sent: [webhook.id].")
else
- to_world_log("Failed to send webhook [webhook.id].")
- log_debug("Webhook failed to send: [webhook.id].")
+ log_world("Failed to send webhook [webhook.id].")
+ // to_chat(world, "Webhook failed to send: [webhook.id].")
/client/proc/reload_webhooks()
set name = "Reload Webhooks"
@@ -69,7 +69,7 @@ SUBSYSTEM_DEF(webhooks)
to_chat(usr, span_warning("Let the webhook subsystem initialize before trying to reload it."))
return
- to_world_log("[usr.key] has reloaded webhooks.")
+ log_world("[usr.key] has reloaded webhooks.")
log_and_message_admins("has reloaded webhooks.")
SSwebhooks.load_webhooks()
@@ -88,7 +88,7 @@ SUBSYSTEM_DEF(webhooks)
if(choice && SSwebhooks.webhook_decls[choice])
var/decl/webhook/webhook = SSwebhooks.webhook_decls[choice]
log_and_message_admins("has pinged webhook [choice].", usr)
- to_world_log("[usr.key] has pinged webhook [choice].")
+ log_world("[usr.key] has pinged webhook [choice].")
webhook.send()
/hook/roundstart/proc/run_webhook()
diff --git a/code/datums/autolathe/autolathe.dm b/code/datums/autolathe/autolathe.dm
index 6684c9404d..d24e49f291 100644
--- a/code/datums/autolathe/autolathe.dm
+++ b/code/datums/autolathe/autolathe.dm
@@ -5,7 +5,7 @@
I = new path()
if(!isitem(I)) // Something has gone horribly wrong, or right.
- log_debug("[name] created an Autolathe design without an assigned path or illegal item. Item = [I]")
+ log_runtime("[name] created an Autolathe design without an assigned path or illegal item. Item = [I]")
return
if(I.matter && !resources)
diff --git a/code/datums/components/antags/changeling/changeling.dm b/code/datums/components/antags/changeling/changeling.dm
index 8ade0ecd92..1fd9b870bf 100644
--- a/code/datums/components/antags/changeling/changeling.dm
+++ b/code/datums/components/antags/changeling/changeling.dm
@@ -228,7 +228,7 @@ var/list/datum/power/changeling/powerinstances = list()
var/datum/component/antag/changeling/comp = is_changeling(src)
if(!comp)
- to_world_log("[src] used a changeling verb but is not a changeling.")
+ log_world("[src] used a changeling verb but is not a changeling.")
return
if(src.stat > max_stat)
diff --git a/code/datums/components/recursive_move.dm b/code/datums/components/recursive_move.dm
index a3e1b70d44..e76a0cdc4f 100644
--- a/code/datums/components/recursive_move.dm
+++ b/code/datums/components/recursive_move.dm
@@ -25,11 +25,11 @@
var/recursion = 0 // safety check - max iterations
while(istype(cur_parent) && (recursion < 64))
if(cur_parent == cur_parent.loc) //safety check incase a thing is somehow inside itself, cancel
- log_debug("RECURSIVE_MOVE: Parent is inside itself. ([holder]) ([holder.type])")
+ log_runtime("RECURSIVE_MOVE: Parent is inside itself. ([holder]) ([holder.type])")
reset_parents()
break
if(cur_parent in parents) //safety check incase of circular contents. (A inside B, B inside C, C inside A), cancel
- log_debug("RECURSIVE_MOVE: Parent is inside a circular inventory. ([holder]) ([holder.type])")
+ log_runtime("RECURSIVE_MOVE: Parent is inside a circular inventory. ([holder]) ([holder.type])")
reset_parents()
break
recursion++
@@ -40,7 +40,7 @@
cur_parent = cur_parent.loc
if(recursion >= 64) // If we escaped due to iteration limit, cancel
- log_debug("RECURSIVE_MOVE: Parent hit recursion limit. ([holder]) ([holder.type])")
+ log_runtime("RECURSIVE_MOVE: Parent hit recursion limit. ([holder]) ([holder.type])")
reset_parents()
parents.Cut()
@@ -109,15 +109,15 @@
parents.Cut()
//the banana peel of testing stays
-/obj/item/bananapeel/testing
+/obj/item/bananapeel/test
name = "banana peel of testing"
desc = "spams world log with debugging information"
-/obj/item/bananapeel/testing/proc/shmove(var/atom/source, var/atom/old_loc, var/atom/new_loc)
+/obj/item/bananapeel/test/proc/shmove(var/atom/source, var/atom/old_loc, var/atom/new_loc)
SIGNAL_HANDLER
world.log << "the [source] moved from [old_loc]([old_loc.x],[old_loc.y],[old_loc.z]) to [new_loc]([new_loc.x],[new_loc.y],[new_loc.z])"
-/obj/item/bananapeel/testing/Initialize(mapload)
+/obj/item/bananapeel/test/Initialize(mapload)
. = ..()
AddComponent(/datum/component/recursive_move)
RegisterSignal(src, COMSIG_OBSERVER_MOVED, PROC_REF(shmove))
diff --git a/code/datums/components/species/shadekin/powers/phase_shift.dm b/code/datums/components/species/shadekin/powers/phase_shift.dm
index f7f2966818..8c96379bd0 100644
--- a/code/datums/components/species/shadekin/powers/phase_shift.dm
+++ b/code/datums/components/species/shadekin/powers/phase_shift.dm
@@ -76,7 +76,7 @@
ability_cost = ability_cost + ( 15 * watcher )
/*
if(!(SK.in_phase))
- log_debug("[src] attempted to shift with [watcher] visible Carbons with a cost of [ability_cost] in a darkness level of [darkness]")
+ to_chat(world, "[src] attempted to shift with [watcher] visible Carbons with a cost of [ability_cost] in a darkness level of [darkness]")
*/
if(SK.doing_phase)
diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm
index 47c28c6741..e2e4ff27cc 100644
--- a/code/datums/datacore.dm
+++ b/code/datums/datacore.dm
@@ -439,7 +439,7 @@ GLOBAL_LIST_EMPTY(PDA_Manifest)
return
/proc/generate_record_id()
- return add_zero(num2hex(rand(1, 65535)), 4) //no point generating higher numbers because of the limitations of num2hex
+ return add_zero(num2hex(rand(1, 65535), 5), 4) //no point generating higher numbers because of the limitations of num2hex
/datum/datacore/proc/CreateGeneralRecord(var/mob/living/carbon/human/H, var/id, var/hidden)
ResetPDAManifest()
@@ -454,7 +454,7 @@ GLOBAL_LIST_EMPTY(PDA_Manifest)
side = icon('html/images/no_image32.png')
if(!id)
- id = text("[]", add_zero(num2hex(rand(1, 65536)), 4))
+ id = text("[]", add_zero(num2hex(rand(1, 65536), 5), 4))
var/datum/data/record/G = new /datum/data/record()
G.name = "Employee Record #[id]"
G.fields["name"] = "New Record"
diff --git a/code/datums/datum.dm b/code/datums/datum.dm
index 334502de2d..8a2f0d7b72 100644
--- a/code/datums/datum.dm
+++ b/code/datums/datum.dm
@@ -168,6 +168,16 @@
for(var/target in _signal_procs)
UnregisterSignal(target, _signal_procs[target])
+/// Return a list of data which can be used to investigate the datum, also ensure that you set the semver in the options list
+/datum/proc/serialize_list(list/options, list/semvers)
+ SHOULD_CALL_PARENT(TRUE)
+
+ . = list()
+ .["tag"] = tag
+
+ SET_SERIALIZATION_SEMVER(semvers, "1.0.0")
+ return .
+
/**
* Callback called by a timer to end an associative-list-indexed cooldown.
*
diff --git a/code/datums/elements/turf_transparency.dm b/code/datums/elements/turf_transparency.dm
index 8b2ac8f918..bb105080c3 100644
--- a/code/datums/elements/turf_transparency.dm
+++ b/code/datums/elements/turf_transparency.dm
@@ -73,7 +73,7 @@
if(!ispath(path))
path = text2path(path)
if(!ispath(path))
- warning("Z-level [our_turf] has invalid baseturf '[get_base_turf_by_area(our_turf)]' in area '[get_area(our_turf)]'")
+ WARNING("Z-level [our_turf] has invalid baseturf '[get_base_turf_by_area(our_turf)]' in area '[get_area(our_turf)]'")
path = /turf/space
var/do_plane = ispath(path, /turf/space) ? SPACE_PLANE : null
diff --git a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm
index 1ecd7da806..51da2c6e56 100644
--- a/code/datums/helper_datums/getrev.dm
+++ b/code/datums/helper_datums/getrev.dm
@@ -23,7 +23,7 @@
/datum/getrev/proc/get_log_message()
var/list/msg = list()
- msg += "Running /tg/ revision: [date]"
+ msg += "Running VOREStation revision: [date]"
if(originmastercommit)
msg += "origin/master: [originmastercommit]"
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index a6626511ea..fd34288e90 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -76,7 +76,7 @@
/datum/mind/proc/transfer_to(mob/living/new_character, force = FALSE)
if(!istype(new_character))
- to_world_log("## DEBUG: transfer_to(): Some idiot has tried to transfer_to() a non mob/living mob. Please inform Carn")
+ log_world("## DEBUG: transfer_to(): Some idiot has tried to transfer_to() a non mob/living mob. Please inform Carn")
var/datum/component/antag/changeling/comp
if(current)
comp = is_changeling(current) //remove ourself from our old body's mind variable
@@ -512,7 +512,7 @@
if(SSticker)
SSticker.minds += mind
else
- to_world_log("## DEBUG: mind_initialize(): No ticker ready yet! Please inform Carn")
+ log_world("## DEBUG: mind_initialize(): No ticker ready yet! Please inform Carn")
if(!mind.name) mind.name = real_name
mind.current = src
if(player_is_antag(mind))
diff --git a/code/datums/repositories/unique.dm b/code/datums/repositories/unique.dm
index a53111cb24..bd7b58cb8b 100644
--- a/code/datums/repositories/unique.dm
+++ b/code/datums/repositories/unique.dm
@@ -51,7 +51,7 @@ var/repository/unique/uniqueness_repository = new()
ids_by_key[key] = ids
if(ids.len >= (max - min) + 1)
- error("Random ID limit reached for key [key].")
+ log_world("## ERROR Random ID limit reached for key [key].")
ids.Cut()
if(ids.len >= 0.6 * ((max-min) + 1)) // if more than 60% of possible ids used
diff --git a/code/defines/procs/announce.dm b/code/defines/procs/announce.dm
index b1df8246b9..18a5bd57e5 100644
--- a/code/defines/procs/announce.dm
+++ b/code/defines/procs/announce.dm
@@ -62,14 +62,14 @@
// You'll need to update these to_world usages if you want to make these z-level specific ~Aro
/datum/announcement/minor/Message(message as text, message_title as text)
- to_world(span_bold("[message]"))
+ to_chat(world, span_bold("[message]"))
/datum/announcement/priority/Message(message as text, message_title as text)
- to_world("
[message_title]
")
- to_world(span_alert("[message]"))
+ to_chat(world, "[message_title]
")
+ to_chat(world, span_alert("[message]"))
if(announcer)
- to_world(span_alert(" -[html_encode(announcer)]"))
- to_world(span_alert("
"))
+ to_chat(world, span_alert(" -[html_encode(announcer)]"))
+ to_chat(world, span_alert("
"))
/datum/announcement/priority/command/Message(message as text, message_title as text, var/list/zlevels)
var/command
diff --git a/code/game/antagonist/antagonist.dm b/code/game/antagonist/antagonist.dm
index 493a127c14..43f1301f18 100644
--- a/code/game/antagonist/antagonist.dm
+++ b/code/game/antagonist/antagonist.dm
@@ -111,22 +111,22 @@
for(var/datum/mind/player in candidates)
if(ghosts_only && !isobserver(player.current))
candidates -= player
- log_debug("[key_name(player)] is not eligible to become a [role_text]: Only ghosts may join as this role! They have been removed from the draft.")
+ log_game("[key_name(player)] is not eligible to become a [role_text]: Only ghosts may join as this role! They have been removed from the draft.")
else if(CONFIG_GET(flag/use_age_restriction_for_antags) && player.current.client.player_age < minimum_player_age)
candidates -= player
- log_debug("[key_name(player)] is not eligible to become a [role_text]: Is only [player.current.client.player_age] day\s old, has to be [minimum_player_age] day\s!")
+ log_game("[key_name(player)] is not eligible to become a [role_text]: Is only [player.current.client.player_age] day\s old, has to be [minimum_player_age] day\s!")
else if(player.special_role)
candidates -= player
- log_debug("[key_name(player)] is not eligible to become a [role_text]: They already have a special role ([player.special_role])! They have been removed from the draft.")
+ log_game("[key_name(player)] is not eligible to become a [role_text]: They already have a special role ([player.special_role])! They have been removed from the draft.")
else if (player in pending_antagonists)
candidates -= player
- log_debug("[key_name(player)] is not eligible to become a [role_text]: They have already been selected for this role! They have been removed from the draft.")
+ log_game("[key_name(player)] is not eligible to become a [role_text]: They have already been selected for this role! They have been removed from the draft.")
else if(!can_become_antag(player))
candidates -= player
- log_debug("[key_name(player)] is not eligible to become a [role_text]: They are blacklisted for this role! They have been removed from the draft.")
+ log_game("[key_name(player)] is not eligible to become a [role_text]: They are blacklisted for this role! They have been removed from the draft.")
else if(player_is_antag(player))
candidates -= player
- log_debug("[key_name(player)] is not eligible to become a [role_text]: They are already an antagonist! They have been removed from the draft.")
+ log_game("[key_name(player)] is not eligible to become a [role_text]: They are already an antagonist! They have been removed from the draft.")
return candidates
@@ -180,17 +180,17 @@
/datum/antagonist/proc/draft_antagonist(var/datum/mind/player)
//Check if the player can join in this antag role, or if the player has already been given an antag role.
if(!can_become_antag(player) || (player.assigned_role in roundstart_restricted))
- log_debug("[player.key] was selected for [role_text] by lottery, but is not allowed to be that role.")
+ log_game("[player.key] was selected for [role_text] by lottery, but is not allowed to be that role.")
return 0
if(player.special_role)
- log_debug("[player.key] was selected for [role_text] by lottery, but they already have a special role.")
+ log_game("[player.key] was selected for [role_text] by lottery, but they already have a special role.")
return 0
if(!(flags & ANTAG_OVERRIDE_JOB) && (!player.current || isnewplayer(player.current)))
- log_debug("[player.key] was selected for [role_text] by lottery, but they have not joined the game.")
+ log_game("[player.key] was selected for [role_text] by lottery, but they have not joined the game.")
return 0
pending_antagonists |= player
- log_debug("[player.key] has been selected for [role_text] by lottery.")
+ log_game("[player.key] has been selected for [role_text] by lottery.")
//Ensure that antags with ANTAG_OVERRIDE_JOB do not occupy job slots.
if(flags & ANTAG_OVERRIDE_JOB)
diff --git a/code/game/antagonist/antagonist_objectives.dm b/code/game/antagonist/antagonist_objectives.dm
index 2926fcde42..cda117daa4 100644
--- a/code/game/antagonist/antagonist_objectives.dm
+++ b/code/game/antagonist/antagonist_objectives.dm
@@ -24,10 +24,10 @@
if(!O.completed && !O.check_completion())
result = 0
if(result && victory_text)
- to_world(span_boldannounce(span_large("[victory_text]")))
+ to_chat(world, span_boldannounce(span_large("[victory_text]")))
if(victory_feedback_tag) feedback_set_details("round_end_result","[victory_feedback_tag]")
else if(loss_text)
- to_world(span_boldannounce(span_large("[loss_text]")))
+ to_chat(world, span_boldannounce(span_large("[loss_text]")))
if(loss_feedback_tag) feedback_set_details("round_end_result","[loss_feedback_tag]")
/mob/living/proc/write_ambition()
diff --git a/code/game/antagonist/antagonist_print.dm b/code/game/antagonist/antagonist_print.dm
index c8d6493bc8..fbd01206c1 100644
--- a/code/game/antagonist/antagonist_print.dm
+++ b/code/game/antagonist/antagonist_print.dm
@@ -38,7 +38,7 @@
num++
// Display the results.
- to_world(text)
+ to_chat(world, text)
/datum/antagonist/proc/print_objective(var/datum/objective/O, var/num, var/append_success)
var/text = "
" + span_bold("Objective [num]:") + " [O.explanation_text] "
diff --git a/code/game/antagonist/outsider/raider.dm b/code/game/antagonist/outsider/raider.dm
index afdc49d211..bd0630eaef 100644
--- a/code/game/antagonist/outsider/raider.dm
+++ b/code/game/antagonist/outsider/raider.dm
@@ -187,8 +187,8 @@ var/datum/antagonist/raider/raiders
else
win_msg += span_bold("The Raiders were repelled!")
- to_world(span_boldannounce(span_large("[win_type] [win_group] victory!")))
- to_world(span_filter_system("[win_msg]"))
+ to_chat(world, span_boldannounce(span_large("[win_type] [win_group] victory!")))
+ to_chat(world, span_filter_system("[win_msg]"))
feedback_set_details("round_end_result","heist - [win_type] [win_group]")
/datum/antagonist/raider/proc/is_raider_crew_safe()
diff --git a/code/game/antagonist/outsider/technomancer.dm b/code/game/antagonist/outsider/technomancer.dm
index 38083baa65..7a6b88bbb3 100644
--- a/code/game/antagonist/outsider/technomancer.dm
+++ b/code/game/antagonist/outsider/technomancer.dm
@@ -78,7 +78,7 @@ var/datum/antagonist/technomancer/technomancers
break
if(!survivor)
feedback_set_details("round_end_result","loss - technomancer killed")
- to_world(span_boldannounce(span_large("The [(current_antagonists.len>1)?"[role_text_plural] have":"[role_text] has"] been killed!")))
+ to_chat(world, span_boldannounce(span_large("The [(current_antagonists.len>1)?"[role_text_plural] have":"[role_text] has"] been killed!")))
/datum/antagonist/technomancer/print_player_summary()
..()
@@ -87,7 +87,7 @@ var/datum/antagonist/technomancer/technomancers
continue // Only want abandoned cores.
if(!core.spells.len)
continue // Cores containing spells only.
- to_world(span_filter_system("Abandoned [core] had [english_list(core.spells)].
"))
+ to_chat(world, span_filter_system("Abandoned [core] had [english_list(core.spells)].
"))
/datum/antagonist/technomancer/print_player_full(var/datum/mind/player)
var/text = print_player_lite(player)
diff --git a/code/game/antagonist/outsider/wizard.dm b/code/game/antagonist/outsider/wizard.dm
index 0543ac718b..88668f403a 100644
--- a/code/game/antagonist/outsider/wizard.dm
+++ b/code/game/antagonist/outsider/wizard.dm
@@ -99,7 +99,7 @@ var/datum/antagonist/wizard/wizards
break
if(!survivor)
feedback_set_details("round_end_result","loss - wizard killed")
- to_world(span_boldannounce(span_large("The [(current_antagonists.len>1)?"[role_text_plural] have":"[role_text] has"] been killed by the crew!")))
+ to_chat(world, span_boldannounce(span_large("The [(current_antagonists.len>1)?"[role_text_plural] have":"[role_text] has"] been killed by the crew!")))
// Removing antag should remove spells
/datum/antagonist/wizard/remove_antagonist(datum/mind/player, show_message, implanted)
diff --git a/code/game/antagonist/station/rogue_ai.dm b/code/game/antagonist/station/rogue_ai.dm
index 2521943c26..5632c4c3a1 100644
--- a/code/game/antagonist/station/rogue_ai.dm
+++ b/code/game/antagonist/station/rogue_ai.dm
@@ -52,8 +52,8 @@ var/datum/antagonist/rogue_ai/malf
var/mob/living/silicon/ai/A = player.current
if(!istype(A))
- error("Non-AI mob designated malf AI! Report this.")
- to_world(span_filter_system("##ERROR: Non-AI mob designated malf AI! Report this."))
+ log_world("## ERROR Non-AI mob designated malf AI! Report this.")
+ to_chat(world, span_filter_system("##ERROR: Non-AI mob designated malf AI! Report this."))
return
A.setup_for_malf()
diff --git a/code/game/area/Away Mission areas.dm b/code/game/area/Away Mission areas.dm
index 3d57984241..c203fc5751 100644
--- a/code/game/area/Away Mission areas.dm
+++ b/code/game/area/Away Mission areas.dm
@@ -39,7 +39,7 @@
/area/proc/spawn_mob_on_turf()
if(!valid_mobs.len)
- to_world_log("[src] does not have a set valid mobs list!")
+ log_mapping("[src] does not have a set valid mobs list!")
return TRUE
var/mob/M
@@ -87,7 +87,7 @@
/area/proc/spawn_flora_on_turf()
if(!valid_flora.len)
- to_world_log("[src] does not have a set valid flora list!")
+ log_mapping("[src] does not have a set valid flora list!")
return TRUE
var/obj/F
diff --git a/code/game/gamemodes/calamity/calamity.dm b/code/game/gamemodes/calamity/calamity.dm
index 2295d07ebd..987eda3214 100644
--- a/code/game/gamemodes/calamity/calamity.dm
+++ b/code/game/gamemodes/calamity/calamity.dm
@@ -23,6 +23,6 @@
..()
/datum/game_mode/calamity/check_victory()
- to_world(span_world(span_large("This terrible, terrible day has finally ended!")))
+ to_chat(world, span_world(span_large("This terrible, terrible day has finally ended!")))
#undef ANTAG_TYPE_RATIO
diff --git a/code/game/gamemodes/cult/narsie.dm b/code/game/gamemodes/cult/narsie.dm
index d245ecaece..4c7e4f0367 100644
--- a/code/game/gamemodes/cult/narsie.dm
+++ b/code/game/gamemodes/cult/narsie.dm
@@ -42,7 +42,7 @@ var/global/narsie_cometh = 0
/obj/singularity/narsie/large/Initialize(mapload)
. = ..()
if(announce)
- to_world(span_world(span_narsie(span_red("[uppertext(name)] HAS RISEN"))))
+ to_chat(world, span_world(span_narsie(span_red("[uppertext(name)] HAS RISEN"))))
world << sound('sound/effects/weather/wind/wind_5_1.ogg')
narsie_spawn_animation()
diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm
index 2536f1cf02..c99ac38594 100644
--- a/code/game/gamemodes/cult/runes.dm
+++ b/code/game/gamemodes/cult/runes.dm
@@ -197,7 +197,7 @@ var/list/sacrificed = list()
cultists.Add(M)
if(cultists.len >= 9)
if(!narsie_cometh)//so we don't initiate Hell more than one time.
- to_world(span_world(span_narsie(span_red("THE VEIL HAS BEEN SHATTERED!"))))
+ to_chat(world, span_world(span_narsie(span_red("THE VEIL HAS BEEN SHATTERED!"))))
world << sound('sound/effects/weather/wind/wind_5_1.ogg')
SetUniversalState(/datum/universal_state/hell)
diff --git a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm
index 923066ed7d..8872dc8565 100644
--- a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm
+++ b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm
@@ -37,7 +37,7 @@ GLOBAL_VAR_INIT(universe_has_ended, 0)
// Apply changes when entering state
/datum/universal_state/supermatter_cascade/OnEnter()
set background = 1
- to_world(span_sinister(span_cascade("You are blinded by a brilliant flash of energy.")))
+ to_chat(world, span_sinister(span_cascade("You are blinded by a brilliant flash of energy.")))
world << sound('sound/effects/cascade.ogg')
diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm
index 7868fd9802..473508468c 100644
--- a/code/game/gamemodes/events.dm
+++ b/code/game/gamemodes/events.dm
@@ -202,7 +202,7 @@ GLOBAL_VAR_INIT(hadevent, 0)
sleep(150)
command_announcement.Announce("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
else
- to_world_log("ERROR: Could not initate grey-tide. Unable find prison or brig area.")
+ log_world("ERROR: Could not initate grey-tide. Unable find prison or brig area.")
/proc/carp_migration() // -- Darem
for(var/obj/effect/landmark/C in GLOB.landmarks_list)
diff --git a/code/game/gamemodes/events/holidays/Holidays.dm b/code/game/gamemodes/events/holidays/Holidays.dm
index eddf86ab89..2af9e9d3b8 100644
--- a/code/game/gamemodes/events/holidays/Holidays.dm
+++ b/code/game/gamemodes/events/holidays/Holidays.dm
@@ -266,11 +266,11 @@ GLOBAL_LIST_EMPTY(Holiday) //Holidays are lists now, so we can have more than on
holidays.Add(p)
holiday_blurbs.Add("[GLOB.Holiday[p]]")
var/holidays_string = english_list(holidays, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
- to_world(span_filter_system(span_blue("and...")))
- to_world(span_filter_system("Happy [holidays_string] Everybody!
"))
+ to_chat(world, span_filter_system(span_blue("and...")))
+ to_chat(world, span_filter_system("Happy [holidays_string] Everybody!
"))
if(holiday_blurbs.len != 0)
for(var/blurb in holiday_blurbs)
- to_world(span_filter_system(span_blue("[blurb]
")))
+ to_chat(world, span_filter_system(span_blue("[blurb]
")))
switch(GLOB.Holiday) //special holidays
//if("Easter")
//do easter stuff
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 99a193a120..40f2771c37 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -117,11 +117,11 @@ GLOBAL_LIST_EMPTY(additional_antag_types)
return
/datum/game_mode/proc/announce() //to be called when round starts
- to_world(span_world("The current game mode is [capitalize(name)]!"))
+ to_chat(world, span_world("The current game mode is [capitalize(name)]!"))
if(round_description)
- to_world(span_filter_system("[round_description]"))
+ to_chat(world, span_filter_system("[round_description]"))
if(round_autoantag)
- to_world(span_filter_system("Antagonists will be added to the round automagically as needed."))
+ to_chat(world, span_filter_system("Antagonists will be added to the round automagically as needed."))
if(antag_templates && antag_templates.len)
var/antag_summary = span_bold("Possible antagonist types:") + " "
var/i = 1
@@ -135,7 +135,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types)
i++
antag_summary += "."
if(antag_templates.len > 1 && GLOB.master_mode != "secret")
- to_world(span_filter_system("[antag_summary]"))
+ to_chat(world, span_filter_system("[antag_summary]"))
else
message_admins("[antag_summary]")
@@ -348,7 +348,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types)
text += ".
"
else
text += "There were " + span_bold("no survivors") + " (" + span_bold("[ghosts] ghosts") + ")."
- to_world(span_filter_system(text))
+ to_chat(world, span_filter_system(text))
if(clients > 0)
feedback_set("round_end_clients",clients)
@@ -405,7 +405,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types)
if(isobserver(player) && !ghosts_only)
continue
if(!role || (player.client.prefs.be_special & role))
- log_debug("[player.key] had [antag_id] enabled, so we are drafting them.")
+ log_game("[player.key] had [antag_id] enabled, so we are drafting them.")
candidates |= player.mind
else
// Assemble a list of active players without jobbans.
@@ -416,7 +416,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types)
// Get a list of all the people who want to be the antagonist for this round
for(var/mob/new_player/player in players)
if(!role || (player.client.prefs.be_special & role))
- log_debug("[player.key] had [antag_id] enabled, so we are drafting them.")
+ log_game("[player.key] had [antag_id] enabled, so we are drafting them.")
candidates += player.mind
players -= player
@@ -426,7 +426,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types)
if(candidates.len < required_enemies)
for(var/mob/new_player/player in players)
if(player.ckey in round_voters)
- log_debug("[player.key] voted for this round, so we are drafting them.")
+ log_game("[player.key] voted for this round, so we are drafting them.")
candidates += player.mind
players -= player
break
diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm
index 4b11c18204..64361ec1b1 100644
--- a/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm
+++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm
@@ -43,7 +43,7 @@
if(!note)
- error("Hardware without description: [C]")
+ log_world("## ERROR Hardware without description: [C]")
return
var/confirmation = tgui_alert(user, "[note] - Is this what you want?", "Hardware selection", list("Yes", "No"))
diff --git a/code/game/gamemodes/meteor/meteor.dm b/code/game/gamemodes/meteor/meteor.dm
index e9668895c1..2ca52158e3 100644
--- a/code/game/gamemodes/meteor/meteor.dm
+++ b/code/game/gamemodes/meteor/meteor.dm
@@ -35,9 +35,9 @@
survivors++
if(survivors)
- to_world(span_world("The following survived the meteor storm") + ":[text]")
+ to_chat(world, span_world("The following survived the meteor storm") + ":[text]")
else
- to_world(span_boldannounce("Nobody survived the meteor storm!"))
+ to_chat(world, span_boldannounce("Nobody survived the meteor storm!"))
feedback_set_details("round_end_result","end - evacuation")
feedback_set("round_end_result",survivors)
diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm
index 5ebde0347e..ce920e2d19 100644
--- a/code/game/gamemodes/meteor/meteors.dm
+++ b/code/game/gamemodes/meteor/meteors.dm
@@ -38,7 +38,7 @@ GLOBAL_VAR_INIT(meteor_wave_delay, 625) //minimum wait between waves in tenths o
///////////////////////////////
/proc/spawn_meteors(var/number = 10, var/list/meteortypes, var/startSide, var/zlevel)
- log_debug("Spawning [number] meteors on the [dir2text(startSide)] of [zlevel]")
+ log_game("Spawning [number] meteors on the [dir2text(startSide)] of [zlevel]")
for(var/i = 0; i < number; i++)
spawn_meteor(meteortypes, startSide, zlevel)
diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm
index 33ab06034d..bf13630dbe 100644
--- a/code/game/gamemodes/nuclear/nuclear.dm
+++ b/code/game/gamemodes/nuclear/nuclear.dm
@@ -45,47 +45,47 @@ GLOBAL_LIST_EMPTY(nuke_disks)
if(!disk_rescued && station_was_nuked && !syndies_didnt_escape)
feedback_set_details("round_end_result","win - syndicate nuke")
- to_world(span_filter_system(span_large(span_bold("Mercenary Major Victory!"))))
- to_world(span_filter_system(span_bold("[syndicate_name()] operatives have destroyed [station_name()]!")))
+ to_chat(world, span_filter_system(span_large(span_bold("Mercenary Major Victory!"))))
+ to_chat(world, span_filter_system(span_bold("[syndicate_name()] operatives have destroyed [station_name()]!")))
else if (!disk_rescued && station_was_nuked && syndies_didnt_escape)
feedback_set_details("round_end_result","halfwin - syndicate nuke - did not evacuate in time")
- to_world(span_filter_system(span_large(span_bold("Total Annihilation"))))
- to_world(span_filter_system(span_bold("[syndicate_name()] operatives destroyed [station_name()] but did not leave the area in time and got caught in the explosion.") + " Next time, don't lose the disk!"))
+ to_chat(world, span_filter_system(span_large(span_bold("Total Annihilation"))))
+ to_chat(world, span_filter_system(span_bold("[syndicate_name()] operatives destroyed [station_name()] but did not leave the area in time and got caught in the explosion.") + " Next time, don't lose the disk!"))
else if (!disk_rescued && !station_was_nuked && nuke_off_station && !syndies_didnt_escape)
feedback_set_details("round_end_result","halfwin - blew wrong station")
- to_world(span_filter_system(span_large(span_bold("Crew Minor Victory"))))
- to_world(span_filter_system(span_bold("[syndicate_name()] operatives secured the authentication disk but blew up something that wasn't [station_name()].") + " Next time, don't lose the disk!"))
+ to_chat(world, span_filter_system(span_large(span_bold("Crew Minor Victory"))))
+ to_chat(world, span_filter_system(span_bold("[syndicate_name()] operatives secured the authentication disk but blew up something that wasn't [station_name()].") + " Next time, don't lose the disk!"))
else if (!disk_rescued && !station_was_nuked && nuke_off_station && syndies_didnt_escape)
feedback_set_details("round_end_result","halfwin - blew wrong station - did not evacuate in time")
- to_world(span_filter_system(span_large(span_bold("[syndicate_name()] operatives have earned Darwin Award!"))))
- to_world(span_filter_system(span_bold("[syndicate_name()] operatives blew up something that wasn't [station_name()] and got caught in the explosion.") + " Next time, don't lose the disk!"))
+ to_chat(world, span_filter_system(span_large(span_bold("[syndicate_name()] operatives have earned Darwin Award!"))))
+ to_chat(world, span_filter_system(span_bold("[syndicate_name()] operatives blew up something that wasn't [station_name()] and got caught in the explosion.") + " Next time, don't lose the disk!"))
else if (disk_rescued && mercs.antags_are_dead())
feedback_set_details("round_end_result","loss - evacuation - disk secured - syndi team dead")
- to_world(span_filter_system(span_large(span_bold("Crew Major Victory!"))))
- to_world(span_filter_system(span_bold("The Research Staff has saved the disc and killed the [syndicate_name()] Operatives")))
+ to_chat(world, span_filter_system(span_large(span_bold("Crew Major Victory!"))))
+ to_chat(world, span_filter_system(span_bold("The Research Staff has saved the disc and killed the [syndicate_name()] Operatives")))
else if ( disk_rescued )
feedback_set_details("round_end_result","loss - evacuation - disk secured")
- to_world(span_filter_system(span_large(span_bold("Crew Major Victory"))))
- to_world(span_filter_system(span_bold("The Research Staff has saved the disc and stopped the [syndicate_name()] Operatives!")))
+ to_chat(world, span_filter_system(span_large(span_bold("Crew Major Victory"))))
+ to_chat(world, span_filter_system(span_bold("The Research Staff has saved the disc and stopped the [syndicate_name()] Operatives!")))
else if (!disk_rescued && mercs.antags_are_dead())
feedback_set_details("round_end_result","loss - evacuation - disk not secured")
- to_world(span_filter_system(span_large(span_bold("Mercenary Minor Victory!"))))
- to_world(span_filter_system(span_bold("The Research Staff failed to secure the authentication disk but did manage to kill most of the [syndicate_name()] Operatives!")))
+ to_chat(world, span_filter_system(span_large(span_bold("Mercenary Minor Victory!"))))
+ to_chat(world, span_filter_system(span_bold("The Research Staff failed to secure the authentication disk but did manage to kill most of the [syndicate_name()] Operatives!")))
else if (!disk_rescued && crew_evacuated)
feedback_set_details("round_end_result","halfwin - detonation averted")
- to_world(span_filter_system(span_large(span_bold("Mercenary Minor Victory!"))))
- to_world(span_filter_system(span_bold("[syndicate_name()] operatives recovered the abandoned authentication disk but detonation of [station_name()] was averted.") + " Next time, don't lose the disk!"))
+ to_chat(world, span_filter_system(span_large(span_bold("Mercenary Minor Victory!"))))
+ to_chat(world, span_filter_system(span_bold("[syndicate_name()] operatives recovered the abandoned authentication disk but detonation of [station_name()] was averted.") + " Next time, don't lose the disk!"))
else if (!disk_rescued && !crew_evacuated)
feedback_set_details("round_end_result","halfwin - interrupted")
- to_world(span_filter_system(span_large(span_bold("Neutral Victory"))))
- to_world(span_filter_system(span_bold("Round was mysteriously interrupted!")))
+ to_chat(world, span_filter_system(span_large(span_bold("Neutral Victory"))))
+ to_chat(world, span_filter_system(span_bold("Round was mysteriously interrupted!")))
return ..()
diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm
index 45c4bfe29c..5e3293703a 100644
--- a/code/game/gamemodes/setupgame.dm
+++ b/code/game/gamemodes/setupgame.dm
@@ -39,7 +39,7 @@
GLOB.dna_genes_good.Add(G)
log_world("DNA2: Created traitgenes with [blocks_remaining.len] remaining blocks. Used [DNA_SE_LENGTH - blocks_remaining.len] out of [DNA_SE_LENGTH] ")
if(blocks_remaining.len < 10)
- warning("DNA2: Blocks remaining is less than 10. The DNA_SE_LENGTH should be raised in dna.dm.")
+ WARNING("DNA2: Blocks remaining is less than 10. The DNA_SE_LENGTH should be raised in dna.dm.")
// Run conflict-o-tron on each traitgene all other traits... Lets setup an initial database of conflicts.
log_world("DNA2: Checking trait gene conflicts")
for(var/datum/gene/trait/gene in GLOB.dna_genes)
diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm
index b52d7158be..52c5d01d25 100644
--- a/code/game/jobs/job_controller.dm
+++ b/code/game/jobs/job_controller.dm
@@ -15,7 +15,7 @@ var/global/datum/controller/occupations/job_master
//var/list/all_jobs = typesof(/datum/job)
var/list/all_jobs = list(/datum/job/assistant) | using_map.allowed_jobs
if(!all_jobs.len)
- to_world(span_boldannounce("Error setting up jobs, no job datums found!"))
+ to_chat(world, span_boldannounce("Error setting up jobs, no job datums found!"))
return 0
for(var/J in all_jobs)
var/datum/job/job = new J()
@@ -593,7 +593,7 @@ var/global/datum/controller/occupations/job_master
if(!CONFIG_GET(flag/load_jobs_from_txt))
return 0
- var/list/jobEntries = file2list(jobsfile)
+ var/list/jobEntries = world.file2list(jobsfile)
for(var/job in jobEntries)
if(!job)
diff --git a/code/game/jobs/whitelist.dm b/code/game/jobs/whitelist.dm
index c275ee7b18..21b636021f 100644
--- a/code/game/jobs/whitelist.dm
+++ b/code/game/jobs/whitelist.dm
@@ -8,7 +8,7 @@ GLOBAL_LIST_EMPTY(whitelist)
return 1
/proc/load_whitelist()
- GLOB.whitelist = file2list(WHITELISTFILE)
+ GLOB.whitelist = world.file2list(WHITELISTFILE)
if(!GLOB.whitelist.len) GLOB.whitelist = null
/proc/check_whitelist(mob/M /*, var/rank*/)
@@ -26,17 +26,17 @@ GLOBAL_LIST_EMPTY(alien_whitelist)
/proc/load_alienwhitelist()
var/text = file2text("config/alienwhitelist.txt")
if (!text)
- log_misc("Failed to load config/alienwhitelist.txt")
+ log_world("Failed to load config/alienwhitelist.txt")
else
var/lines = splittext(text, "\n") // Now we've got a bunch of "ckey = something" strings in a list
for(var/line in lines)
var/list/left_and_right = splittext(line, " - ") // Split it on the dash into left and right
if(LAZYLEN(left_and_right) != 2)
- warning("Alien whitelist entry is invalid: [line]") // If we didn't end up with a left and right, the line is bad
+ WARNING("Alien whitelist entry is invalid: [line]") // If we didn't end up with a left and right, the line is bad
continue
var/key = left_and_right[1]
if(key != ckey(key))
- warning("Alien whitelist entry appears to have key, not ckey: [line]") // The key contains invalid ckey characters
+ WARNING("Alien whitelist entry appears to have key, not ckey: [line]") // The key contains invalid ckey characters
continue
var/list/our_whitelists = GLOB.alien_whitelist[key] // Try to see if we have one already and add to it
if(!our_whitelists) // Guess this is their first/only whitelist entry
diff --git a/code/game/jobs/whitelist_vr.dm b/code/game/jobs/whitelist_vr.dm
index 45bcec4ec4..3750eebaf6 100644
--- a/code/game/jobs/whitelist_vr.dm
+++ b/code/game/jobs/whitelist_vr.dm
@@ -7,7 +7,7 @@ GLOBAL_LIST_EMPTY(job_whitelist)
/proc/load_jobwhitelist()
var/text = file2text("config/jobwhitelist.txt")
if (!text)
- log_misc("Failed to load config/jobwhitelist.txt")
+ log_world("Failed to load config/jobwhitelist.txt")
else
GLOB.job_whitelist = splittext(text, "\n")
diff --git a/code/game/machinery/atm_ret_field.dm b/code/game/machinery/atm_ret_field.dm
index 88159a5fac..83f40627f7 100644
--- a/code/game/machinery/atm_ret_field.dm
+++ b/code/game/machinery/atm_ret_field.dm
@@ -164,7 +164,7 @@
//Delete ourselves if we find extra mapped in arfgs
for(var/obj/machinery/atmospheric_field_generator/F in loc)
if(F != src)
- log_debug("Duplicate ARFGS at [x],[y],[z]")
+ log_mapping("Duplicate ARFGS at [x],[y],[z]")
return INITIALIZE_HINT_QDEL
var/area/A = get_area(src)
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index e142a696e3..5f2219d2cb 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -54,9 +54,9 @@
*/
if(!src.network || src.network.len < 1)
if(loc)
- error("[src.name] in [get_area(src)] (x:[src.x] y:[src.y] z:[src.z] has errored. [src.network?"Empty network list":"Null network list"]")
+ log_world("## ERROR [src.name] in [get_area(src)] (x:[src.x] y:[src.y] z:[src.z] has errored. [src.network?"Empty network list":"Null network list"]")
else
- error("[src.name] in [get_area(src)]has errored. [src.network?"Empty network list":"Null network list"]")
+ log_world("## ERROR [src.name] in [get_area(src)]has errored. [src.network?"Empty network list":"Null network list"]")
ASSERT(src.network)
ASSERT(src.network.len > 0)
// VOREStation Edit Start - Make mapping with cameras easier
diff --git a/code/game/machinery/camera/motion.dm b/code/game/machinery/camera/motion.dm
index a4486af8ea..d89c123b4d 100644
--- a/code/game/machinery/camera/motion.dm
+++ b/code/game/machinery/camera/motion.dm
@@ -59,7 +59,7 @@
return
var/atom/movable/AM = WF.resolve()
if(isnull(AM))
- log_debug("DEBUG: HasProximity called without reference on [src].")
+ log_runtime("DEBUG: HasProximity called without reference on [src].")
return
// Motion cameras outside of an "ai monitored" area will use this to detect stuff.
if (!area_motion)
diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm
index be7f702f20..e3a38eeb41 100644
--- a/code/game/machinery/computer/guestpass.dm
+++ b/code/game/machinery/computer/guestpass.dm
@@ -216,7 +216,7 @@
accesses.Add(A)
else
to_chat(ui.user, span_warning("Invalid selection, please consult technical support if there are any issues."))
- log_debug("[key_name_admin(ui.user)] tried selecting an invalid guest pass terminal option.")
+ log_admin("[key_name_admin(ui.user)] tried selecting an invalid guest pass terminal option.")
if("id")
if(giver)
if(ishuman(ui.user))
diff --git a/code/game/machinery/computer/shuttle.dm b/code/game/machinery/computer/shuttle.dm
index 4fe8d40881..a48dfc100c 100644
--- a/code/game/machinery/computer/shuttle.dm
+++ b/code/game/machinery/computer/shuttle.dm
@@ -38,11 +38,11 @@
if (src.auth_need - src.authorized.len > 0)
message_admins("[key_name_admin(user)] has authorized early shuttle launch")
log_game("[user.ckey] has authorized early shuttle launch")
- to_world(span_boldnotice("Alert: [src.auth_need - src.authorized.len] authorizations needed until shuttle is launched early"))
+ to_chat(world, span_boldnotice("Alert: [src.auth_need - src.authorized.len] authorizations needed until shuttle is launched early"))
else
message_admins("[key_name_admin(user)] has launched the shuttle")
log_game("[user.ckey] has launched the shuttle early")
- to_world(span_boldnotice("Alert: Shuttle launch time shortened to 10 seconds!"))
+ to_chat(world, span_boldnotice("Alert: Shuttle launch time shortened to 10 seconds!"))
emergency_shuttle.set_launch_countdown(10)
//src.authorized = null
qdel(src.authorized)
@@ -50,10 +50,10 @@
if("Repeal")
src.authorized -= W:registered_name
- to_world(span_boldnotice("Alert: [src.auth_need - src.authorized.len] authorizations needed until shuttle is launched early"))
+ to_chat(world, span_boldnotice("Alert: [src.auth_need - src.authorized.len] authorizations needed until shuttle is launched early"))
if("Abort")
- to_world(span_boldnotice("All authorizations to shortening time for shuttle launch have been revoked!"))
+ to_chat(world, span_boldnotice("All authorizations to shortening time for shuttle launch have been revoked!"))
src.authorized.len = 0
src.authorized = list( )
@@ -63,7 +63,7 @@
if(!emagged && !emergency_shuttle.location() && user.get_active_hand() == W)
switch(choice)
if("Launch")
- to_world(span_boldnotice("Alert: Shuttle launch time shortened to 10 seconds!"))
+ to_chat(world, span_boldnotice("Alert: Shuttle launch time shortened to 10 seconds!"))
emergency_shuttle.set_launch_countdown(10)
emagged = 1
if("Cancel")
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index 95f7174053..5d6624bcad 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -54,7 +54,7 @@
//Delete ourselves if we find extra mapped in firedoors
for(var/obj/machinery/door/firedoor/F in loc)
if(F != src)
- log_debug("Duplicate firedoors at [x],[y],[z]")
+ log_mapping("Duplicate firedoors at [x],[y],[z]")
return INITIALIZE_HINT_QDEL
var/area/A = get_area(src)
diff --git a/code/game/machinery/embedded_controller/docking_program.dm b/code/game/machinery/embedded_controller/docking_program.dm
index 78dadca5e9..c5885e2727 100644
--- a/code/game/machinery/embedded_controller/docking_program.dm
+++ b/code/game/machinery/embedded_controller/docking_program.dm
@@ -117,7 +117,7 @@
if(docking_codes)
var/code = signal.data["code"]
if(code != docking_codes)
- log_debug("Controller [id_tag] got request_dock but code:[code] != docking_codes:[docking_codes]")
+ // to_chat(world, "Controller [id_tag] got request_dock but code:[code] != docking_codes:[docking_codes]")
return
control_mode = MODE_SERVER
diff --git a/code/game/machinery/embedded_controller/mapping_helpers.dm b/code/game/machinery/embedded_controller/mapping_helpers.dm
index 8f52f181d2..6ddd04c71b 100644
--- a/code/game/machinery/embedded_controller/mapping_helpers.dm
+++ b/code/game/machinery/embedded_controller/mapping_helpers.dm
@@ -26,11 +26,14 @@ Any frequency works, it's self-setting, but it seems like people have decided AU
my_controller = get_controller(get_area(src))
my_device = locate(my_device_type) in get_turf(src)
if(!my_device)
- to_world(span_world("[span_red("WARNING:")][span_black("Airlock helper '[name]' couldn't find what it wanted at: X:[x] Y:[y] Z:[z]")]"))
+ to_chat(world, span_world("[span_red("WARNING:")][span_black("Airlock helper '[name]' couldn't find what it wanted at: X:[x] Y:[y] Z:[z]")]"))
+ log_mapping("WARNING: Airlock helper '[name]' couldn't find what it wanted at: X:[x] Y:[y] Z:[z]")
else if(!my_controller)
- to_world(span_world("[span_red("WARNING:")][span_black("Airlock helper '[name]' couldn't find a controller at: X:[x] Y:[y] Z:[z]")]"))
+ to_chat(world, span_world("[span_red("WARNING:")][span_black("Airlock helper '[name]' couldn't find a controller at: X:[x] Y:[y] Z:[z]")]"))
+ log_mapping("WARNING: Airlock helper '[name]' couldn't find a controller at: X:[x] Y:[y] Z:[z]")
else if(!my_controller.id_tag)
- to_world(span_world("[span_red("WARNING:")][span_black("Airlock helper '[name]' found a controller without an 'id_tag' set: X:[x] Y:[y] Z:[z]")]"))
+ to_chat(world, span_world("[span_red("WARNING:")][span_black("Airlock helper '[name]' found a controller without an 'id_tag' set: X:[x] Y:[y] Z:[z]")]"))
+ log_mapping("WARNING: Airlock helper '[name]' found a controller without an 'id_tag' set: X:[x] Y:[y] Z:[z]")
else
setup()
return INITIALIZE_HINT_QDEL
diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm
index 22a3830574..fe2ff76b0f 100644
--- a/code/game/machinery/flasher.dm
+++ b/code/game/machinery/flasher.dm
@@ -113,7 +113,7 @@
var/atom/movable/AM = WF.resolve()
if(isnull(AM))
- log_debug("DEBUG: HasProximity called without reference on [src].")
+ log_runtime("DEBUG: HasProximity called without reference on [src].")
return
if(disable || !anchored || (last_flash && world.time < last_flash + 150))
return
diff --git a/code/game/machinery/gear_dispenser.dm b/code/game/machinery/gear_dispenser.dm
index 13d9a94690..e6b0f4d316 100644
--- a/code/game/machinery/gear_dispenser.dm
+++ b/code/game/machinery/gear_dispenser.dm
@@ -64,13 +64,13 @@ GLOBAL_LIST_EMPTY(dispenser_presets)
ASSERT(voidsuit_type)
. = ..()
if(voidsuit_type && !ispath(voidsuit_type, /obj/item/clothing/suit/space/void))
- error("[src] can't spawn type [voidsuit_type] as a voidsuit")
+ log_world("## ERROR [src] can't spawn type [voidsuit_type] as a voidsuit")
return
if(voidhelmet_type && !ispath(voidhelmet_type, /obj/item/clothing/head/helmet/space/void))
- error("[src] can't spawn type [voidsuit_type] as a voidhelmet")
+ log_world("## ERROR [src] can't spawn type [voidsuit_type] as a voidhelmet")
return
if(magboots_type && !ispath(magboots_type, /obj/item/clothing/shoes/magboots))
- error("[src] can't spawn type [magboots_type] as magboots")
+ log_world("## ERROR [src] can't spawn type [magboots_type] as magboots")
return
var/obj/item/clothing/suit/space/void/voidsuit
@@ -86,7 +86,7 @@ GLOBAL_LIST_EMPTY(dispenser_presets)
if(voidhelmet_type)
// The coder may not have realized this type spawns its own helmet
if(voidsuit.hood)
- error("[src] created a voidsuit [voidsuit] and wants to add a helmet but it already has one")
+ log_world("## ERROR [src] created a voidsuit [voidsuit] and wants to add a helmet but it already has one")
else
voidhelmet = new voidhelmet_type()
voidsuit.attach_helmet(voidhelmet)
@@ -94,7 +94,7 @@ GLOBAL_LIST_EMPTY(dispenser_presets)
if(magboots_type)
// The coder may not have realized thist ype spawns its own boots
if(voidsuit.boots)
- error("[src] created a voidsuit [voidsuit] and wants to add a helmet but it already has one")
+ log_world("## ERROR [src] created a voidsuit [voidsuit] and wants to add a helmet but it already has one")
else
magboots = new magboots_type(voidsuit)
voidsuit.boots = magboots
@@ -105,13 +105,13 @@ GLOBAL_LIST_EMPTY(dispenser_presets)
if(life_support)
if(user.isSynthetic())
if(voidsuit.cooler)
- error("[src] created a voidsuit [voidsuit] and wants to add a suit cooler but it already has one")
+ log_world("## ERROR [src] created a voidsuit [voidsuit] and wants to add a suit cooler but it already has one")
else
var/obj/item/life_support = new /obj/item/suit_cooling_unit(voidsuit)
voidsuit.cooler = life_support
else if(user.species?.breath_type)
if(voidsuit.tank)
- error("[src] created a voidsuit [voidsuit] and wants to add a tank but it already has one")
+ log_world("## ERROR [src] created a voidsuit [voidsuit] and wants to add a tank but it already has one")
else
//Create a tank (if such a thing exists for this species)
var/tanktext = "/obj/item/tank/" + "[user.species?.breath_type]"
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index 5b4c8aee6c..99a3df5eba 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -146,7 +146,7 @@ Class Procs:
if(A.loc == src) // If the components are inside the machine, delete them.
qdel(A)
else // Otherwise we assume they were dropped to the ground during deconstruction, and were not removed from the component_parts list by deconstruction code.
- warning("[A] was still in [src]'s component_parts when it was Destroy()'d")
+ WARNING("[A] was still in [src]'s component_parts when it was Destroy()'d")
component_parts.Cut()
component_parts = null
if(contents) // The same for contents.
diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm
index 3dbec11300..a630429127 100644
--- a/code/game/machinery/navbeacon.dm
+++ b/code/game/machinery/navbeacon.dm
@@ -22,7 +22,7 @@ GLOBAL_LIST_EMPTY(navbeacons) // no I don't like putting this in, but it will do
. = ..()
set_codes_from_txt(codes_txt)
if(freq)
- warning("[src] at [x],[y],[z] has deprecated var freq=[freq]. Replace it with proper type.")
+ WARNING("[src] at [x],[y],[z] has deprecated var freq=[freq]. Replace it with proper type.")
var/turf/T = loc
hide(!T.is_plating())
@@ -35,7 +35,7 @@ GLOBAL_LIST_EMPTY(navbeacons) // no I don't like putting this in, but it will do
/obj/machinery/navbeacon/proc/set_codes_from_txt()
if(!codes_txt)
return
- warning("[src] at [x],[y],[z] in [get_area(src)] is using the deprecated 'codes_txt' mapping method. Replace it with proper type.")
+ WARNING("[src] at [x],[y],[z] in [get_area(src)] is using the deprecated 'codes_txt' mapping method. Replace it with proper type.")
codes = list()
var/list/entries = splittext(codes_txt, ";") // entries are separated by semicolons
diff --git a/code/game/machinery/nuclear_bomb.dm b/code/game/machinery/nuclear_bomb.dm
index 8f1442cbcf..972a73f7f6 100644
--- a/code/game/machinery/nuclear_bomb.dm
+++ b/code/game/machinery/nuclear_bomb.dm
@@ -418,13 +418,13 @@ GLOBAL_VAR(bomb_set)
if(SSticker.mode)
SSticker.mode.explosion_in_progress = 0
- to_world(span_boldannounce("The station was destoyed by the nuclear blast!"))
+ to_chat(world, span_boldannounce("The station was destoyed by the nuclear blast!"))
SSticker.mode.station_was_nuked = (off_station<2) //offstation==1 is a draw. the station becomes irradiated and needs to be evacuated.
//kinda shit but I couldn't get permission to do what I wanted to do.
if(!SSticker.mode.check_finished())//If the mode does not deal with the nuke going off so just reboot because everyone is stuck as is
- to_world(span_boldannounce("Resetting in 30 seconds!"))
+ to_chat(world, span_boldannounce("Resetting in 30 seconds!"))
feedback_set_details("end_error","nuke - unhandled ending")
diff --git a/code/game/machinery/pointdefense.dm b/code/game/machinery/pointdefense.dm
index 8ac509b3de..e1704b43d6 100644
--- a/code/game/machinery/pointdefense.dm
+++ b/code/game/machinery/pointdefense.dm
@@ -27,7 +27,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/pointdefense)
//No more than 1 controller please.
for(var/obj/machinery/pointdefense_control/PC as anything in GLOB.pointdefense_controllers)
if(PC != src && PC.id_tag == id_tag)
- warning("Two [src] with the same id_tag of [id_tag]")
+ WARNING("Two [src] with the same id_tag of [id_tag]")
id_tag = null
default_apply_parts()
diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm
index 9e0896141d..49d2ef4794 100644
--- a/code/game/machinery/telecomms/telecomunications.dm
+++ b/code/game/machinery/telecomms/telecomunications.dm
@@ -676,7 +676,7 @@
//Generic telecomm connectivity test proc
/proc/can_telecomm(var/atom/A, var/atom/B, var/ad_hoc = FALSE)
if(!A || !B)
- log_debug("can_telecomm(): Undefined endpoints!")
+ log_mapping("can_telecomm(): Undefined endpoints!")
return FALSE
//Can't in this case, obviously!
diff --git a/code/game/machinery/virtual_reality/vr_procs.dm b/code/game/machinery/virtual_reality/vr_procs.dm
index 59d0631f1f..aacd8fd3cb 100644
--- a/code/game/machinery/virtual_reality/vr_procs.dm
+++ b/code/game/machinery/virtual_reality/vr_procs.dm
@@ -1,12 +1,12 @@
// Gross proc which is called on Life() to check for escaped VR mobs. Tried to do this with Exited() on area/vr but ended up being too heavy.
/mob/living/proc/handle_vr_derez()
if(virtual_reality_mob && !istype(get_area(src), /area/vr))
- log_debug("[src] escaped virtual reality")
+ log_admin("[src] escaped virtual reality")
visible_message("[src] blinks out of existence.")
return_from_vr()
for(var/obj/belly/B in vore_organs) // Assume anybody inside an escaped VR mob is also an escaped VR mob.
for(var/mob/living/L in B)
- log_debug("[L] was inside an escaped VR mob and has been deleted.")
+ log_vore("[L] was inside an escaped VR mob ([src]) and has been deleted.")
L.handle_vr_derez() //Recursive! Let's get EVERYONE properly out of here!
if(!QDELETED(L)) //This is so we don't double qdel() things when we're doing recursive removal.
qdel(L)
diff --git a/code/game/mecha/equipment/mecha_equipment.dm b/code/game/mecha/equipment/mecha_equipment.dm
index 9b96cecc9f..deccee9b04 100644
--- a/code/game/mecha/equipment/mecha_equipment.dm
+++ b/code/game/mecha/equipment/mecha_equipment.dm
@@ -106,7 +106,7 @@
/obj/item/mecha_parts/mecha_equipment/proc/critfail()
if(chassis)
- log_message("Critical failure",1)
+ src.mecha_log_message("Critical failure",1)
return
/obj/item/mecha_parts/mecha_equipment/proc/get_equip_info()
@@ -209,7 +209,7 @@
if(enable_special_checks(M))
enable_special = TRUE
- M.log_message("[src] initialized.")
+ M.mecha_log_message("[src] initialized.")
if(!M.selected)
M.selected = src
src.update_chassis_page()
@@ -245,7 +245,7 @@
if(chassis.selected == src)
chassis.selected = null
update_chassis_page()
- chassis.log_message("[src] removed from equipment.")
+ chassis.mecha_log_message("[src] removed from equipment.")
chassis = null
set_ready_state(TRUE)
enable_special = FALSE
@@ -267,9 +267,9 @@
chassis.occupant_message("[icon2html(src, chassis.occupant.client)] [message]")
return
-/obj/item/mecha_parts/mecha_equipment/proc/log_message(message)
+/obj/item/mecha_parts/mecha_equipment/proc/mecha_log_message(message)
if(chassis)
- chassis.log_message("[src]: [message]")
+ chassis.mecha_log_message("[src]: [message]")
return
/obj/item/mecha_parts/mecha_equipment/proc/MoveAction() //Allows mech equipment to do an action upon the mech moving
diff --git a/code/game/mecha/equipment/tools/cable_layer.dm b/code/game/mecha/equipment/tools/cable_layer.dm
index ec7c869a85..0b1ad624c3 100644
--- a/code/game/mecha/equipment/tools/cable_layer.dm
+++ b/code/game/mecha/equipment/tools/cable_layer.dm
@@ -34,7 +34,7 @@
if(href_list["toggle"])
set_ready_state(!equip_ready)
occupant_message("[src] [equip_ready?"dea":"a"]ctivated.")
- log_message("[equip_ready?"Dea":"A"]ctivated.")
+ src.mecha_log_message("[equip_ready?"Dea":"A"]ctivated.")
return
if(href_list["cut"])
if(cable && cable.get_amount())
@@ -73,7 +73,7 @@
if(!cable || cable.get_amount() < 1)
set_ready_state(TRUE)
occupant_message("Cable depleted, [src] deactivated.")
- log_message("Cable depleted, [src] deactivated.")
+ src.mecha_log_message("Cable depleted, [src] deactivated.")
return
if(cable.get_amount() < amount)
occupant_message("No enough cable to finish the task.")
diff --git a/code/game/mecha/equipment/tools/clamp.dm b/code/game/mecha/equipment/tools/clamp.dm
index 8c7e16ec97..1385797445 100644
--- a/code/game/mecha/equipment/tools/clamp.dm
+++ b/code/game/mecha/equipment/tools/clamp.dm
@@ -86,7 +86,7 @@
O.loc = chassis
O.anchored = FALSE
occupant_message(span_notice("[target] succesfully loaded."))
- log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
+ src.mecha_log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
else
occupant_message(span_warning("You must hold still while handling objects."))
O.anchored = initial(O.anchored)
@@ -147,7 +147,7 @@
O.loc = chassis
O.anchored = FALSE
chassis.occupant_message(span_notice("[target] succesfully loaded."))
- chassis.log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
+ chassis.mecha_log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
else
chassis.occupant_message(span_warning("You must hold still while handling objects."))
O.anchored = initial(O.anchored)
diff --git a/code/game/mecha/equipment/tools/cloak.dm b/code/game/mecha/equipment/tools/cloak.dm
index 44f32ac3a9..9a71de318d 100644
--- a/code/game/mecha/equipment/tools/cloak.dm
+++ b/code/game/mecha/equipment/tools/cloak.dm
@@ -36,7 +36,7 @@
/obj/item/mecha_parts/mecha_equipment/cloak/proc/start_cloak()
if(chassis)
chassis.cloak()
- log_message("Activated.")
+ src.mecha_log_message("Activated.")
START_PROCESSING(SSobj, src)
set_ready_state(FALSE)
playsound(src, 'sound/effects/EMPulse.ogg', 100, 1)
@@ -44,7 +44,7 @@
/obj/item/mecha_parts/mecha_equipment/cloak/proc/stop_cloak()
if(chassis)
chassis.uncloak()
- log_message("Deactivated.")
+ src.mecha_log_message("Deactivated.")
STOP_PROCESSING(SSobj, src)
set_ready_state(TRUE)
playsound(src, 'sound/effects/EMPulse.ogg', 100, 1)
diff --git a/code/game/mecha/equipment/tools/drill.dm b/code/game/mecha/equipment/tools/drill.dm
index c2cdb0955e..3838583a92 100644
--- a/code/game/mecha/equipment/tools/drill.dm
+++ b/code/game/mecha/equipment/tools/drill.dm
@@ -28,10 +28,10 @@
return
else if((W.reinf_material && advanced) || do_after_cooldown(target))//R wall with good drill
- log_message("Drilled through [target]")
+ src.mecha_log_message("Drilled through [target]")
target.ex_act(3)
else
- log_message("Drilled through [target]")
+ src.mecha_log_message("Drilled through [target]")
target.ex_act(2)
else if(ismineralturf(target))
@@ -42,7 +42,7 @@
else
var/turf/simulated/mineral/M1 = target
M1.GetDrilled()
- log_message("Drilled through [target]")
+ src.mecha_log_message("Drilled through [target]")
if(locate(/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp) in chassis.equipment)
var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in chassis:cargo
if(ore_box)
@@ -54,7 +54,7 @@
drill_mob(target, chassis.occupant)
return 1
else if(target.loc == C)
- log_message("Drilled through [target]")
+ src.mecha_log_message("Drilled through [target]")
target.ex_act(2)
return 1
@@ -114,16 +114,16 @@
if(W.reinf_material)
occupant_message(span_warning("[target] is too durable to bore through."))
else
- log_message("Bored through [target]")
+ src.mecha_log_message("Bored through [target]")
target.ex_act(2)
else if(ismineralturf(target))
var/turf/simulated/mineral/M = target
if(enable_special && !M.density)
M.ex_act(2)
- log_message("Bored into [target]")
+ src.mecha_log_message("Bored into [target]")
else
M.GetDrilled()
- log_message("Bored through [target]")
+ src.mecha_log_message("Bored through [target]")
if(locate(/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp) in chassis.equipment)
var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in chassis:cargo
if(ore_box)
@@ -131,6 +131,6 @@
if(get_dir(chassis,ore)&chassis.dir)
ore.forceMove(ore_box)
else if(target.loc == C)
- log_message("Drilled through [target]")
+ src.mecha_log_message("Drilled through [target]")
target.ex_act(2)
return 1
diff --git a/code/game/mecha/equipment/tools/energy_relay.dm b/code/game/mecha/equipment/tools/energy_relay.dm
index 0f64531983..44b848a2ab 100644
--- a/code/game/mecha/equipment/tools/energy_relay.dm
+++ b/code/game/mecha/equipment/tools/energy_relay.dm
@@ -83,11 +83,11 @@
if(datum_flags & DF_ISPROCESSING)
STOP_PROCESSING(SSfastprocess, src)
set_ready_state(TRUE)
- log_message("Deactivated.")
+ src.mecha_log_message("Deactivated.")
else
START_PROCESSING(SSfastprocess, src)
set_ready_state(FALSE)
- log_message("Activated.")
+ src.mecha_log_message("Activated.")
return
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/get_equip_info()
diff --git a/code/game/mecha/equipment/tools/generator.dm b/code/game/mecha/equipment/tools/generator.dm
index a616ad799b..e373b9a25b 100644
--- a/code/game/mecha/equipment/tools/generator.dm
+++ b/code/game/mecha/equipment/tools/generator.dm
@@ -29,14 +29,14 @@
set_ready_state(TRUE)
return PROCESS_KILL
if(fuel.get_amount() <= 0)
- log_message("Deactivated - no fuel.")
+ src.mecha_log_message("Deactivated - no fuel.")
set_ready_state(TRUE)
return PROCESS_KILL
var/cur_charge = chassis.get_charge()
if(isnull(cur_charge))
set_ready_state(TRUE)
occupant_message("No powercell detected.")
- log_message("Deactivated.")
+ src.mecha_log_message("Deactivated.")
return PROCESS_KILL
var/use_fuel = fuel_per_cycle_idle
if(cur_charge= reagents.maximum_volume || !chassis.has_charge(energy_drain))
occupant_message(span_warning("Reagent processing stopped."))
- log_message("Reagent processing stopped.")
+ src.mecha_log_message("Reagent processing stopped.")
return PROCESS_KILL
var/amount = synth_speed / processed_reagents.len
for(var/reagent in processed_reagents)
@@ -331,7 +331,7 @@
shut_down()
if(chassis && chassis.occupant)
to_chat(chassis.occupant, span_notice("\The [chassis] shudders as something jams!"))
- log_message("[src.name] has malfunctioned. Maintenance required.")
+ src.mecha_log_message("[src.name] has malfunctioned. Maintenance required.")
/obj/item/mecha_parts/mecha_equipment/crisis_drone/process() // Will continually try to find the nearest person above the threshold that is a valid target, and try to heal them.
if(chassis && enabled && chassis.has_charge(energy_drain) && (chassis.occupant || enable_special))
@@ -455,10 +455,10 @@
enabled = !enabled
if(enabled)
set_ready_state(FALSE)
- log_message("Activated.")
+ src.mecha_log_message("Activated.")
else
set_ready_state(TRUE)
- log_message("Deactivated.")
+ src.mecha_log_message("Deactivated.")
/obj/item/mecha_parts/mecha_equipment/crisis_drone/add_equip_overlay(obj/mecha/M as obj)
..()
diff --git a/code/game/mecha/equipment/weapons/ballistic/ballistic.dm b/code/game/mecha/equipment/weapons/ballistic/ballistic.dm
index 83b23bd98e..e1773adc48 100644
--- a/code/game/mecha/equipment/weapons/ballistic/ballistic.dm
+++ b/code/game/mecha/equipment/weapons/ballistic/ballistic.dm
@@ -13,7 +13,7 @@
projectiles_to_add--
chassis.use_power(projectile_energy_cost)
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",src.get_equip_info())
- log_message("Rearmed [src.name].")
+ src.mecha_log_message("Rearmed [src.name].")
return
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/Topic(href, href_list)
diff --git a/code/game/mecha/equipment/weapons/honk.dm b/code/game/mecha/equipment/weapons/honk.dm
index 5452efe6bb..95f9a18c2b 100644
--- a/code/game/mecha/equipment/weapons/honk.dm
+++ b/code/game/mecha/equipment/weapons/honk.dm
@@ -32,6 +32,6 @@
M.Weaken(3)
M.Stun(5)
chassis.use_power(energy_drain)
- log_message("Used a sound emission device.")
+ src.mecha_log_message("Used a sound emission device.")
do_after_cooldown()
return
diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm
index 53aabdf67e..14c0b33da6 100644
--- a/code/game/mecha/equipment/weapons/weapons.dm
+++ b/code/game/mecha/equipment/weapons/weapons.dm
@@ -32,7 +32,7 @@
chassis.use_power(energy_drain)
chassis.visible_message(span_warning("[chassis] fires [src]!"))
occupant_message(span_warning("You fire [src]!"))
- log_message("Fired from [src], targeting [target].")
+ src.mecha_log_message("Fired from [src], targeting [target].")
var/target_for_log = "unknown"
if(ismob(target))
target_for_log = target
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index fb516ab4f9..8c7503ca74 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -231,7 +231,7 @@
add_cell()
removeVerb(/obj/mecha/verb/disconnect_from_port)
- log_message("[src.name] created.")
+ src.mecha_log_message("[src.name] created.")
loc.Entered(src)
GLOB.mechas_list += src //global mech list
@@ -581,7 +581,7 @@
if("Toggle Airtank")
use_internal_tank = !use_internal_tank
occupant_message("Now taking air from [use_internal_tank?"internal airtank":"environment"].")
- log_message("Now taking air from [use_internal_tank?"internal airtank":"environment"].")
+ src.mecha_log_message("Now taking air from [use_internal_tank?"internal airtank":"environment"].")
if("Toggle Light")
lights = !lights
if(lights)
@@ -589,7 +589,7 @@
else
set_light(light_range - lights_power)
occupant_message("Toggled lights [lights?"on":"off"].")
- log_message("Toggled lights [lights?"on":"off"].")
+ src.mecha_log_message("Toggled lights [lights?"on":"off"].")
playsound(src, 'sound/mecha/heavylightswitch.ogg', 50, 1)
if("View Stats")
occupant << browse(src.get_stats_html(), "window=exosuit")
@@ -659,7 +659,7 @@
/obj/mecha/proc/interface_action(obj/machinery/target)
if(istype(target, /obj/machinery/access_button))
src.occupant_message(span_notice("Interfacing with [target]."))
- src.log_message("Interfaced with [target].")
+ src.mecha_log_message("Interfaced with [target].")
target.attack_hand(src.occupant)
return 1
if(istype(target, /obj/machinery/embedded_controller))
@@ -675,7 +675,7 @@
return STATUS_INTERACTIVE
if(src.Adjacent(src_object))
src.occupant_message(span_notice("Interfacing with [src_object]..."))
- src.log_message("Interfaced with [src_object].")
+ src.mecha_log_message("Interfaced with [src_object].")
return STATUS_INTERACTIVE
if(src_object in view(2, src))
return STATUS_UPDATE //if they're close enough, allow the occupant to see the screen through the viewport or whatever.
@@ -870,7 +870,7 @@
if(!src.check_for_support())
float_direction = direction
start_process(MECHA_PROC_MOVEMENT)
- src.log_message(span_warning("Movement control lost. Inertial movement started."))
+ src.mecha_log_message(span_warning("Movement control lost. Inertial movement started."))
if(do_after_action(get_step_delay()))
can_move = 1
return 1
@@ -1067,7 +1067,7 @@
return
user.setClickCooldown(user.get_attack_speed())
- src.log_message("Attack by hand/paw. Attacker - [user].",1)
+ src.mecha_log_message("Attack by hand/paw. Attacker - [user].",1)
var/obj/item/mecha_parts/component/armor/ArmC = internal_components[MECH_ARMOR]
@@ -1111,7 +1111,7 @@
/obj/mecha/hitby(atom/movable/A as mob|obj) //wrapper
..()
- src.log_message("Hit by [A].",1)
+ src.mecha_log_message("Hit by [A].",1)
call((proc_res["dynhitby"]||src), "dynhitby")(A)
return
@@ -1184,7 +1184,7 @@
Test.hit |= occupant // Register a hit on the occupant, for things like turrets, or in simple-mob cases stopping friendly fire in firing line mode.
return
- src.log_message("Hit by projectile. Type: [Proj.name]([Proj.check_armour]).",1)
+ src.mecha_log_message("Hit by projectile. Type: [Proj.name]([Proj.check_armour]).",1)
call((proc_res["dynbulletdamage"]||src), "dynbulletdamage")(Proj) //calls equipment
..()
return
@@ -1282,7 +1282,7 @@
else
temp_deflect_chance = round(ArmC.get_efficiency() * ArmC.deflect_chance + (defence_mode ? 25 : 0))
- src.log_message("Affected by explosion of severity: [severity].",1)
+ src.mecha_log_message("Affected by explosion of severity: [severity].",1)
if(prob(temp_deflect_chance))
severity++
src.log_append_to_last("Armor saved, changing severity to [severity].")
@@ -1305,7 +1305,7 @@
/*Will fix later -Sieve
/obj/mecha/attack_blob(mob/user as mob)
- src.log_message("Attack by blob. Attacker - [user].",1)
+ src.mecha_log_message("Attack by blob. Attacker - [user].",1)
if(!prob(src.deflect_chance))
src.take_damage(6)
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
@@ -1329,21 +1329,21 @@
if(get_charge())
use_power((cell.charge/2)/severity)
take_damage(50 / severity,"energy")
- src.log_message("EMP detected",1)
+ src.mecha_log_message("EMP detected",1)
if(prob(80))
check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),1)
return
/obj/mecha/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature>src.max_temperature)
- src.log_message("Exposed to dangerous temperature.",1)
+ src.mecha_log_message("Exposed to dangerous temperature.",1)
src.take_damage(5,"fire") //The take_damage() proc handles armor values
src.check_for_internal_damage(list(MECHA_INT_FIRE, MECHA_INT_TEMP_CONTROL))
return
/obj/mecha/proc/dynattackby(obj/item/W as obj, mob/user as mob)
user.setClickCooldown(user.get_attack_speed(W))
- src.log_message("Attacked by [W]. Attacker - [user]")
+ src.mecha_log_message("Attacked by [W]. Attacker - [user]")
var/pass_damage_reduc_mod //Modifer for failing to bring AP.
var/obj/item/mecha_parts/component/armor/ArmC = internal_components[MECH_ARMOR]
@@ -1501,7 +1501,7 @@
src.cell = null
state = MECHA_CELL_OUT
to_chat(user, "You unscrew and pry out the powercell.")
- src.log_message("Powercell removed")
+ src.mecha_log_message("Powercell removed")
else if(state==MECHA_CELL_OUT && src.cell)
state=MECHA_CELL_OPEN
to_chat(user, "You screw the cell in place")
@@ -1512,11 +1512,11 @@
to_chat(user, "You attempt to eject the pilot using the maintenance controls.")
if(src.occupant.stat)
src.go_out()
- src.log_message("[src.occupant] was ejected using the maintenance controls.")
+ src.mecha_log_message("[src.occupant] was ejected using the maintenance controls.")
else
to_chat(user, span_warning("Your attempt is rejected."))
src.occupant_message(span_warning("An attempt to eject you was made using the maintenance controls."))
- src.log_message("Eject attempt made using maintenance controls - rejected.")
+ src.mecha_log_message("Eject attempt made using maintenance controls - rejected.")
return
else if(istype(W, /obj/item/cell))
@@ -1526,7 +1526,7 @@
user.drop_item()
W.forceMove(src)
src.cell = W
- src.log_message("Powercell installed")
+ src.mecha_log_message("Powercell installed")
else
to_chat(user, "There's already a powercell installed.")
return
@@ -1602,7 +1602,7 @@
else
call((proc_res["dynattackby"]||src), "dynattackby")(W,user)
/*
- src.log_message("Attacked by [W]. Attacker - [user]")
+ src.mecha_log_message("Attacked by [W]. Attacker - [user]")
if(prob(src.deflect_chance))
to_chat(user, span_warning("\The [W] bounces off [src.name] armor."))
src.log_append_to_last("Armor saved.")
@@ -1688,7 +1688,7 @@
src.Move(src.loc)
update_icon()
set_dir(dir_in)
- src.log_message("[mmi_as_oc] moved in as pilot.")
+ src.mecha_log_message("[mmi_as_oc] moved in as pilot.")
if(!hasInternalDamage())
src.occupant << sound('sound/mecha/nominal.ogg',volume=50)
update_icon()
@@ -1764,7 +1764,7 @@
network.gases += internal_tank.return_air()
network.update = 1
playsound(src, 'sound/mecha/gasconnected.ogg', 50, 1)
- log_message("Connected to gas port.")
+ src.mecha_log_message("Connected to gas port.")
return 1
/obj/mecha/proc/disconnect()
@@ -1778,7 +1778,7 @@
connected_port.connected_device = null
connected_port = null
playsound(src, 'sound/mecha/gasdisconnected.ogg', 50, 1)
- src.log_message("Disconnected from gas port.")
+ src.mecha_log_message("Disconnected from gas port.")
return 1
@@ -1850,7 +1850,7 @@
if(lights) set_light(light_range + lights_power)
else set_light(light_range - lights_power)
src.occupant_message("Toggled lights [lights?"on":"off"].")
- log_message("Toggled lights [lights?"on":"off"].")
+ src.mecha_log_message("Toggled lights [lights?"on":"off"].")
playsound(src, 'sound/mecha/heavylightswitch.ogg', 50, 1)
return
@@ -1877,7 +1877,7 @@
use_internal_tank = !use_internal_tank
src.occupant_message("Now taking air from [use_internal_tank?"internal airtank":"environment"].")
- src.log_message("Now taking air from [use_internal_tank?"internal airtank":"environment"].")
+ src.mecha_log_message("Now taking air from [use_internal_tank?"internal airtank":"environment"].")
playsound(src, 'sound/mecha/gasdisconnected.ogg', 30, 1)
return
@@ -1894,7 +1894,7 @@
return
strafing = !strafing
src.occupant_message("Toggled strafing mode [strafing?"on":"off"].")
- src.log_message("Toggled strafing mode [strafing?"on":"off"].")
+ src.mecha_log_message("Toggled strafing mode [strafing?"on":"off"].")
return
/obj/mecha/MouseDrop_T(mob/O, mob/user)
@@ -1930,7 +1930,7 @@
to_chat(user, span_warning("You can't climb into the exosuit while buckled!"))
return
- src.log_message("[user] tries to move in.")
+ src.mecha_log_message("[user] tries to move in.")
if(iscarbon(user))
var/mob/living/carbon/C = user
if(C.handcuffed)
@@ -2099,7 +2099,7 @@
else
return
if(mob_container.forceMove(src.loc))//ejecting mob container
- log_message("[mob_container] moved out.")
+ src.mecha_log_message("[mob_container] moved out.")
occupant.reset_view()
occupant << browse(null, "window=exosuit")
if(occupant.client && cloaked_selfimage)
@@ -2447,7 +2447,7 @@
to_chat(src.occupant, "[icon2html(src, src.occupant.client)] [message]")
return
-/obj/mecha/proc/log_message(message as text,red=null)
+/obj/mecha/proc/mecha_log_message(message as text,red=null)
log.len++
if(red)
message = span_red(message)
@@ -2618,7 +2618,7 @@
user.visible_message(span_infoplain(span_bold("\The [user]") + " opens the hatch on \the [P] and removes [occupant]!"), span_notice("You open the hatch on \the [P] and remove [occupant]!"))
P.go_out()
- P.log_message("[occupant] was removed.")
+ P.mecha_log_message("[occupant] was removed.")
return
if(href_list["add_req_access"] && add_req_access && top_filter.getObj("id_card"))
if(!in_range(src, usr)) return
@@ -2651,16 +2651,16 @@
if(href_list["repair_int_control_lost"])
if(usr != src.occupant) return
src.occupant_message("Recalibrating coordination system.")
- src.log_message("Recalibration of coordination system started.")
+ src.mecha_log_message("Recalibration of coordination system started.")
var/T = src.loc
if(do_after_action(100))
if(T == src.loc)
src.clearInternalDamage(MECHA_INT_CONTROL_LOST)
src.occupant_message(span_blue("Recalibration successful."))
- src.log_message("Recalibration of coordination system finished with 0 errors.")
+ src.mecha_log_message("Recalibration of coordination system finished with 0 errors.")
else
src.occupant_message(span_red("Recalibration failed."))
- src.log_message("Recalibration of coordination system failed with 1 error.",1)
+ src.mecha_log_message("Recalibration of coordination system failed with 1 error.",1)
if(href_list["drop_from_cargo"])
var/obj/O = locate(href_list["drop_from_cargo"])
if(O && (O in src.cargo))
@@ -2670,7 +2670,7 @@
var/turf/T = get_turf(O)
if(T)
T.Entered(O)
- src.log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - src.cargo.len]")
+ src.mecha_log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - src.cargo.len]")
return
//debug
@@ -2797,7 +2797,7 @@
if(!damage)
return 0
- src.log_message("Attacked. Attacker - [user].",1)
+ src.mecha_log_message("Attacked. Attacker - [user].",1)
user.do_attack_animation(src)
if(prob(temp_deflect_chance))//Deflected
diff --git a/code/game/mecha/micro/micro_equipment.dm b/code/game/mecha/micro/micro_equipment.dm
index bdade3761d..3ef5b18fab 100644
--- a/code/game/mecha/micro/micro_equipment.dm
+++ b/code/game/mecha/micro/micro_equipment.dm
@@ -131,13 +131,13 @@
if(W.reinf_material)
occupant_message(span_warning("[target] is too durable to drill through."))
else
- log_message("Drilled through [target]")
+ src.mecha_log_message("Drilled through [target]")
target.ex_act(2)
else if(ismineralturf(target))
for(var/turf/simulated/mineral/M in range(chassis,1))
if(get_dir(chassis,M)&chassis.dir)
M.GetDrilled()
- log_message("Drilled through [target]")
+ src.mecha_log_message("Drilled through [target]")
var/obj/item/mecha_parts/mecha_equipment/tool/micro/orescoop/ore_box = (locate(/obj/item/mecha_parts/mecha_equipment/tool/micro/orescoop) in chassis.equipment)
if(ore_box)
for(var/obj/item/ore/ore in range(chassis,1))
@@ -148,7 +148,7 @@
else
ore.forceMove(ore_box)
else if(target.loc == C)
- log_message("Drilled through [target]")
+ src.mecha_log_message("Drilled through [target]")
target.ex_act(2)
return 1
diff --git a/code/game/objects/effects/chem/chemsmoke.dm b/code/game/objects/effects/chem/chemsmoke.dm
index 47920bacb3..129715635e 100644
--- a/code/game/objects/effects/chem/chemsmoke.dm
+++ b/code/game/objects/effects/chem/chemsmoke.dm
@@ -99,11 +99,11 @@
var/more = ""
if(M)
more = "(?)"
- message_admins("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [print_name][more].", 0, 1)
- log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [print_name].")
+ message_admins("A chemical smoke reaction has taken place in ([whereLink]) [contained]. Last associated key is [print_name][more].", 0, 1)
+ log_game("A chemical smoke reaction has taken place in ([where]) [contained]. Last associated key is [print_name].")
else
message_admins("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1)
- log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
+ log_game("A chemical smoke reaction has taken place in ([where]) [contained]. No associated key.")
//Runs the chem smoke effect
// Spawns damage over time loop for each reagent held in the cloud.
diff --git a/code/game/objects/effects/gibs.dm b/code/game/objects/effects/gibs.dm
index 8021ef414b..9d138f851b 100644
--- a/code/game/objects/effects/gibs.dm
+++ b/code/game/objects/effects/gibs.dm
@@ -22,7 +22,8 @@
/obj/effect/gibspawner/proc/Gib(atom/location, var/datum/dna/MobDNA = null)
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
- to_world(span_filter_system(span_warning("Gib list length mismatch!")))
+ to_chat(world, span_filter_system(span_warning("Gib list length mismatch!")))
+ log_world("Gib list length mismatch!")
return
var/obj/effect/decal/cleanable/blood/gibs/gib = null
diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm
index 3f3e41f5f0..6f71e885d4 100644
--- a/code/game/objects/effects/landmarks.dm
+++ b/code/game/objects/effects/landmarks.dm
@@ -100,7 +100,7 @@
if(using_map)
using_map.secret_levels |= z
else
- log_error("[type] mapped in but no using_map")
+ log_mapping("[type] mapped in but no using_map")
/obj/effect/landmark/hidden_level
delete_me = TRUE
@@ -110,7 +110,7 @@
if(using_map)
using_map.hidden_levels |= z
else
- log_error("[type] mapped in but no using_map")
+ log_mapping("[type] mapped in but no using_map")
/obj/effect/landmark/virtual_reality
diff --git a/code/game/objects/effects/map_effects/beam_point.dm b/code/game/objects/effects/map_effects/beam_point.dm
index dff889889d..37e43011f7 100644
--- a/code/game/objects/effects/map_effects/beam_point.dm
+++ b/code/game/objects/effects/map_effects/beam_point.dm
@@ -90,7 +90,7 @@ GLOBAL_LIST_EMPTY(all_beam_points)
/obj/effect/map_effect/beam_point/proc/build_beam(var/atom/beam_target)
if(!beam_target)
- log_debug("[src] ([src.type] \[[x],[y],[z]\]) failed to build its beam due to not having a target.")
+ log_mapping("[src] ([src.type] \[[x],[y],[z]\]) failed to build its beam due to not having a target.")
return FALSE
var/datum/beam/new_beam = Beam(beam_target, beam_icon_state, beam_icon, beam_time, beam_max_distance, beam_type, beam_sleep_time)
@@ -102,11 +102,11 @@ GLOBAL_LIST_EMPTY(all_beam_points)
/obj/effect/map_effect/beam_point/proc/destroy_beam(var/datum/beam/B)
if(!B)
- log_debug("[src] ([src.type] \[[x],[y],[z]\]) was asked to destroy a beam that does not exist.")
+ log_mapping("[src] ([src.type] \[[x],[y],[z]\]) was asked to destroy a beam that does not exist.")
return FALSE
if(!(B in my_beams))
- log_debug("[src] ([src.type] \[[x],[y],[z]\]) was asked to destroy a beam it did not own.")
+ log_mapping("[src] ([src.type] \[[x],[y],[z]\]) was asked to destroy a beam it did not own.")
return FALSE
my_beams -= B
diff --git a/code/game/objects/effects/prop/columnblast.dm b/code/game/objects/effects/prop/columnblast.dm
index daae3610a5..e0698006d5 100644
--- a/code/game/objects/effects/prop/columnblast.dm
+++ b/code/game/objects/effects/prop/columnblast.dm
@@ -23,7 +23,7 @@
flick("[icon_state]_erupt",src)
return TRUE
-/obj/effect/temporary_effect/eruption/testing/on_eruption(var/turf/Target)
+/obj/effect/temporary_effect/eruption/test/on_eruption(var/turf/Target)
flick("[icon_state]_erupt",src)
if(Target)
new /obj/effect/explosion(Target)
diff --git a/code/game/objects/effects/prop/snake.dm b/code/game/objects/effects/prop/snake.dm
index 057e3d5ba4..670b573c2e 100644
--- a/code/game/objects/effects/prop/snake.dm
+++ b/code/game/objects/effects/prop/snake.dm
@@ -93,18 +93,18 @@
/obj/effect/temporary_effect/pulse/snake/proc/on_enter_turf(var/turf/T)
-/obj/effect/temporary_effect/pulse/snake/testing/on_leave_turf(var/turf/T)
+/obj/effect/temporary_effect/pulse/snake/test/on_leave_turf(var/turf/T)
if(T)
- new /obj/effect/temporary_effect/eruption/testing(T, 3 SECONDS, "#ff0000")
+ new /obj/effect/temporary_effect/eruption/test(T, 3 SECONDS, "#ff0000")
-/obj/effect/temporary_effect/pulse/snake/testing/on_enter_turf(var/turf/T)
+/obj/effect/temporary_effect/pulse/snake/test/on_enter_turf(var/turf/T)
if(T)
T.color = "#00ff00"
spawn(3 SECONDS)
T.color = initial(T.color)
-/obj/effect/temporary_effect/pulse/snake/testing/hunter/pulse_loop()
+/obj/effect/temporary_effect/pulse/snake/test/hunter/pulse_loop()
hunting = locate(/mob/living) in range(7, src)
..()
diff --git a/code/game/objects/items/blueprints_vr.dm b/code/game/objects/items/blueprints_vr.dm
index d5fe66cb8f..63ad118065 100644
--- a/code/game/objects/items/blueprints_vr.dm
+++ b/code/game/objects/items/blueprints_vr.dm
@@ -452,7 +452,7 @@
//I personally think adding walls to an area is a big deal, so this is commented out.
//BEGIN ESOTERIC BULLSHIT
- //log_debug("Origin: [origin.c_airblock(checkT)] SourceT: [sourceT.c_airblock(checkT)] 0=NB 1=AB 2=ZB, 3=B")
+ //to_chat(world, "Origin: [origin.c_airblock(checkT)] SourceT: [sourceT.c_airblock(checkT)] 0=NB 1=AB 2=ZB, 3=B")
/*
if(origin.c_airblock(checkT)) //If everything breaks and it doesn't want to work, turn on the above debug and check this line. C.L. 0 = not blocked.
continue
diff --git a/code/game/objects/items/devices/communicator/UI_tgui.dm b/code/game/objects/items/devices/communicator/UI_tgui.dm
index da5fea69cd..eb9ae055b4 100644
--- a/code/game/objects/items/devices/communicator/UI_tgui.dm
+++ b/code/game/objects/items/devices/communicator/UI_tgui.dm
@@ -381,7 +381,7 @@
if(text)
exonet.send_message(their_address, "text", text)
im_list += list(list("address" = exonet.address, "to_address" = their_address, "im" = text))
- log_pda("(COMM: [src]) sent \"[text]\" to [exonet.get_atom_from_address(their_address)]", ui.user)
+ ui.user.log_talk("(COMM: [src]) sent \"[text]\" to [exonet.get_atom_from_address(their_address)]", LOG_PDA)
var/obj/item/communicator/comm = exonet.get_atom_from_address(their_address)
to_chat(ui.user, span_notice("[icon2html(src, ui.user.client)] Sent message to [istype(comm, /obj/item/communicator) ? comm.owner : comm.name], \"[text]\" (Reply)"))
for(var/mob/M in GLOB.player_list)
diff --git a/code/game/objects/items/devices/communicator/messaging.dm b/code/game/objects/items/devices/communicator/messaging.dm
index e2b459cb26..af5aad2cac 100644
--- a/code/game/objects/items/devices/communicator/messaging.dm
+++ b/code/game/objects/items/devices/communicator/messaging.dm
@@ -107,7 +107,7 @@
if(message)
exonet.send_message(comm.exonet.address, "text", message)
im_list += list(list("address" = exonet.address, "to_address" = comm.exonet.address, "im" = message))
- log_pda("(COMM: [src]) sent \"[message]\" to [exonet.get_atom_from_address(comm.exonet.address)]", usr)
+ usr.client.mob.log_talk("(COMM: [src]) sent \"[message]\" to [exonet.get_atom_from_address(comm.exonet.address)]", LOG_PDA)
to_chat(usr, span_notice("[icon2html(src,usr.client)] Sent message to [istype(comm, /obj/item/communicator) ? comm.owner : comm.name], \"[message]\" (Reply)"))
// Verb: text_communicator()
@@ -159,7 +159,7 @@
to_chat(src, span_notice("You have sent '[text_message]' to [chosen_communicator]."))
exonet_messages.Add(span_bold("To [chosen_communicator]:") + "
[text_message]")
- log_pda("(DCOMM: [src]) sent \"[text_message]\" to [chosen_communicator]", src)
+ log_talk("(DCOMM: [src]) sent \"[text_message]\" to [chosen_communicator]", LOG_PDA)
for(var/mob/M in GLOB.player_list)
if(M.stat == DEAD && M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears))
if(isnewplayer(M) || M.forbid_seeing_deadchat)
diff --git a/code/game/objects/items/devices/radio/encryptionkey.dm b/code/game/objects/items/devices/radio/encryptionkey.dm
index 5d4e721f01..f2385fac50 100644
--- a/code/game/objects/items/devices/radio/encryptionkey.dm
+++ b/code/game/objects/items/devices/radio/encryptionkey.dm
@@ -133,3 +133,58 @@
/obj/item/encryptionkey/ent
name = "entertainment encryption key"
channels = list(CHANNEL_ENTERTAINMENT = 1)
+
+/obj/item/encryptionkey/heads/hop
+ name = "head of personnel's encryption key"
+ icon_state = "hop_cypherkey"
+ channels = list(CHANNEL_SUPPLY = 1, CHANNEL_SERVICE = 1, CHANNEL_COMMAND = 1, CHANNEL_SECURITY = 1, CHANNEL_EXPLORATION = 1)
+
+/obj/item/encryptionkey/heads/ai_integrated
+ name = "ai integrated encryption key"
+ desc = "Integrated encryption key"
+ icon_state = "cap_cypherkey"
+ channels = list(CHANNEL_COMMAND = 1, CHANNEL_SECURITY = 1, CHANNEL_ENGINEERING = 1, CHANNEL_SCIENCE = 1, CHANNEL_MEDICAL = 1, CHANNEL_SUPPLY = 1, CHANNEL_SERVICE = 1, CHANNEL_AI_PRIVATE = 1, CHANNEL_EXPLORATION = 1)
+
+/obj/item/encryptionkey/heads/captain
+ name = "site manager's encryption key"
+ icon_state = "cap_cypherkey"
+ channels = list(CHANNEL_COMMAND = 1, CHANNEL_SECURITY = 1, CHANNEL_ENGINEERING = 1, CHANNEL_SCIENCE = 1, CHANNEL_MEDICAL = 1, CHANNEL_SUPPLY = 1, CHANNEL_SERVICE = 1, CHANNEL_EXPLORATION = 1)
+
+/obj/item/encryptionkey/heads/rd
+ name = "research director's encryption key"
+ icon_state = "rd_cypherkey"
+ channels = list(CHANNEL_COMMAND = 1, CHANNEL_SCIENCE = 1)
+
+/obj/item/encryptionkey/ert
+ channels = list(CHANNEL_RESPONSE_TEAM = 1, CHANNEL_SCIENCE = 1, CHANNEL_COMMAND = 1, CHANNEL_MEDICAL = 1, CHANNEL_ENGINEERING = 1, CHANNEL_SECURITY = 1, CHANNEL_SUPPLY = 1, CHANNEL_SERVICE = 1, CHANNEL_EXPLORATION = 1)
+
+/obj/item/encryptionkey/omni //Literally only for the admin intercoms
+ channels = list(CHANNEL_MERCENARY = 1, CHANNEL_RAIDER = 1, CHANNEL_RESPONSE_TEAM = 1, CHANNEL_SCIENCE = 1, CHANNEL_COMMAND = 1, CHANNEL_MEDICAL = 1, CHANNEL_ENGINEERING = 1, CHANNEL_SECURITY = 1, CHANNEL_SUPPLY = 1, CHANNEL_SERVICE = 1, CHANNEL_EXPLORATION = 1)
+
+/obj/item/encryptionkey/pathfinder
+ name = "pathfinder's encryption key"
+ icon_state = "com_cypherkey"
+ channels = list(CHANNEL_COMMAND = 1, CHANNEL_EXPLORATION = 1)
+
+/obj/item/encryptionkey/qm
+ name = "quartermaster's encryption key"
+ icon_state = "qm_cypherkey"
+ channels = list(CHANNEL_COMMAND = 1, CHANNEL_SUPPLY = 1)
+
+/obj/item/encryptionkey/pilot
+ name = "pilot's encryption key"
+ icon_state = "cypherkey"
+ channels = list(CHANNEL_EXPLORATION = 1)
+
+/obj/item/encryptionkey/explorer
+ name = "away team's encryption key"
+ icon_state = "rob_cypherkey"
+ channels = list(CHANNEL_EXPLORATION = 1)
+
+/obj/item/encryptionkey/sar
+ name = "fm's encryption key"
+ icon_state = "med_cypherkey"
+ channels = list(CHANNEL_MEDICAL = 1, CHANNEL_EXPLORATION = 1)
+
+/obj/item/encryptionkey/talon
+ channels = list(CHANNEL_TALON = 1)
diff --git a/code/game/objects/items/devices/radio/encryptionkey_vr.dm b/code/game/objects/items/devices/radio/encryptionkey_vr.dm
deleted file mode 100644
index 9b7b1b2c1e..0000000000
--- a/code/game/objects/items/devices/radio/encryptionkey_vr.dm
+++ /dev/null
@@ -1,54 +0,0 @@
-/obj/item/encryptionkey/heads/hop
- name = "head of personnel's encryption key"
- icon_state = "hop_cypherkey"
- channels = list(CHANNEL_SUPPLY = 1, CHANNEL_SERVICE = 1, CHANNEL_COMMAND = 1, CHANNEL_SECURITY = 1, CHANNEL_EXPLORATION = 1)
-
-/obj/item/encryptionkey/heads/ai_integrated
- name = "ai integrated encryption key"
- desc = "Integrated encryption key"
- icon_state = "cap_cypherkey"
- channels = list(CHANNEL_COMMAND = 1, CHANNEL_SECURITY = 1, CHANNEL_ENGINEERING = 1, CHANNEL_SCIENCE = 1, CHANNEL_MEDICAL = 1, CHANNEL_SUPPLY = 1, CHANNEL_SERVICE = 1, CHANNEL_AI_PRIVATE = 1, CHANNEL_EXPLORATION = 1)
-
-/obj/item/encryptionkey/heads/captain
- name = "site manager's encryption key"
- icon_state = "cap_cypherkey"
- channels = list(CHANNEL_COMMAND = 1, CHANNEL_SECURITY = 1, CHANNEL_ENGINEERING = 1, CHANNEL_SCIENCE = 1, CHANNEL_MEDICAL = 1, CHANNEL_SUPPLY = 1, CHANNEL_SERVICE = 1, CHANNEL_EXPLORATION = 1)
-
-/obj/item/encryptionkey/heads/rd
- name = "research director's encryption key"
- icon_state = "rd_cypherkey"
- channels = list(CHANNEL_COMMAND = 1, CHANNEL_SCIENCE = 1)
-
-/obj/item/encryptionkey/ert
- channels = list(CHANNEL_RESPONSE_TEAM = 1, CHANNEL_SCIENCE = 1, CHANNEL_COMMAND = 1, CHANNEL_MEDICAL = 1, CHANNEL_ENGINEERING = 1, CHANNEL_SECURITY = 1, CHANNEL_SUPPLY = 1, CHANNEL_SERVICE = 1, CHANNEL_EXPLORATION = 1)
-
-/obj/item/encryptionkey/omni //Literally only for the admin intercoms
- channels = list(CHANNEL_MERCENARY = 1, CHANNEL_RAIDER = 1, CHANNEL_RESPONSE_TEAM = 1, CHANNEL_SCIENCE = 1, CHANNEL_COMMAND = 1, CHANNEL_MEDICAL = 1, CHANNEL_ENGINEERING = 1, CHANNEL_SECURITY = 1, CHANNEL_SUPPLY = 1, CHANNEL_SERVICE = 1, CHANNEL_EXPLORATION = 1)
-
-/obj/item/encryptionkey/pathfinder
- name = "pathfinder's encryption key"
- icon_state = "com_cypherkey"
- channels = list(CHANNEL_COMMAND = 1, CHANNEL_EXPLORATION = 1)
-
-/obj/item/encryptionkey/qm
- name = "quartermaster's encryption key"
- icon_state = "qm_cypherkey"
- channels = list(CHANNEL_COMMAND = 1, CHANNEL_SUPPLY = 1)
-
-/obj/item/encryptionkey/pilot
- name = "pilot's encryption key"
- icon_state = "cypherkey"
- channels = list(CHANNEL_EXPLORATION = 1)
-
-/obj/item/encryptionkey/explorer
- name = "away team's encryption key"
- icon_state = "rob_cypherkey"
- channels = list(CHANNEL_EXPLORATION = 1)
-
-/obj/item/encryptionkey/sar
- name = "fm's encryption key"
- icon_state = "med_cypherkey"
- channels = list(CHANNEL_MEDICAL = 1, CHANNEL_EXPLORATION = 1)
-
-/obj/item/encryptionkey/talon
- channels = list(CHANNEL_TALON = 1)
diff --git a/code/game/objects/items/devices/radio/jammer.dm b/code/game/objects/items/devices/radio/jammer.dm
index c20b97b1a6..639eff8a0b 100644
--- a/code/game/objects/items/devices/radio/jammer.dm
+++ b/code/game/objects/items/devices/radio/jammer.dm
@@ -119,3 +119,18 @@ GLOBAL_LIST_EMPTY(active_radio_jammers)
cut_overlays()
add_overlay("jammer_overlay_[overlay_percent]")
last_overlay_percent = overlay_percent
+
+//Unlimited use, unlimited range jammer for admins. Turn it on, drop it somewhere, it works.
+/obj/item/radio_jammer/admin
+ jam_range = 255
+ tick_cost = 0
+
+/proc/is_vore_jammed(var/obj/radio)
+ var/atom/current = radio
+ while(current.loc)
+ if(isbelly(current.loc))
+ var/obj/belly/B = current.loc
+ if(B.mode_flags & DM_FLAG_JAMSENSORS)
+ return TRUE
+ current = current.loc
+ return FALSE
diff --git a/code/game/objects/items/devices/radio/jammer_vr.dm b/code/game/objects/items/devices/radio/jammer_vr.dm
deleted file mode 100644
index 2633ddfe28..0000000000
--- a/code/game/objects/items/devices/radio/jammer_vr.dm
+++ /dev/null
@@ -1,14 +0,0 @@
-//Unlimited use, unlimited range jammer for admins. Turn it on, drop it somewhere, it works.
-/obj/item/radio_jammer/admin
- jam_range = 255
- tick_cost = 0
-
-/proc/is_vore_jammed(var/obj/radio)
- var/atom/current = radio
- while(current.loc)
- if(isbelly(current.loc))
- var/obj/belly/B = current.loc
- if(B.mode_flags & DM_FLAG_JAMSENSORS)
- return TRUE
- current = current.loc
- return FALSE
diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm
index 4586491040..c611ea53ea 100644
--- a/code/game/objects/items/devices/radio/radio.dm
+++ b/code/game/objects/items/devices/radio/radio.dm
@@ -82,7 +82,7 @@
AIO.link_radio(src)
break
if(!bs_tx_weakref)
- testing("A radio [src] at [x],[y],[z] specified bluespace prelink IDs, but the machines with corresponding IDs ([bs_tx_preload_id], [bs_rx_preload_id]) couldn't be found.")
+ log_mapping("A radio [src] at [x],[y],[z] specified bluespace prelink IDs, but the machines with corresponding IDs ([bs_tx_preload_id], [bs_rx_preload_id]) couldn't be found.")
if(bs_rx_preload_id)
var/found = 0
@@ -100,7 +100,7 @@
found = 1
break
if(!found)
- testing("A radio [src] at [x],[y],[z] specified bluespace prelink IDs, but the machines with corresponding IDs ([bs_tx_preload_id], [bs_rx_preload_id]) couldn't be found.")
+ log_mapping("A radio [src] at [x],[y],[z] specified bluespace prelink IDs, but the machines with corresponding IDs ([bs_tx_preload_id], [bs_rx_preload_id]) couldn't be found.")
/obj/item/radio/Destroy()
qdel(wires)
@@ -818,3 +818,35 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
bs_rx_preload_id = "Broadcaster A" //Recveive from a transmitter
#undef CANBROADCAST_INNERBOX
+
+/obj/item/radio/phone
+ subspace_transmission = TRUE
+ canhear_range = 0
+ adhoc_fallback = TRUE
+
+/obj/item/radio/emergency
+ name = "Medbay Emergency Radio Link"
+ icon_state = "med_walkietalkie"
+ frequency = MED_I_FREQ
+ subspace_transmission = TRUE
+ adhoc_fallback = TRUE
+
+/obj/item/radio/emergency/Initialize(mapload)
+ . = ..()
+ internal_channels = GLOB.default_medbay_channels.Copy()
+
+/obj/item/bluespaceradio/tether_prelinked
+ name = "bluespace radio (tether)"
+ handset = /obj/item/radio/bluespacehandset/linked/tether_prelinked
+
+/obj/item/radio/bluespacehandset/linked/tether_prelinked
+ bs_tx_preload_id = "tether_rx" //Transmit to a receiver
+ bs_rx_preload_id = "tether_tx" //Recveive from a transmitter
+
+/obj/item/bluespaceradio/talon_prelinked
+ name = "bluespace radio (talon)"
+ handset = /obj/item/radio/bluespacehandset/linked/talon_prelinked
+
+/obj/item/radio/bluespacehandset/linked/talon_prelinked
+ bs_tx_preload_id = "talon_aio" //Transmit to a receiver
+ bs_rx_preload_id = "talon_aio" //Recveive from a transmitter
diff --git a/code/game/objects/items/devices/radio/radio_vr.dm b/code/game/objects/items/devices/radio/radio_vr.dm
deleted file mode 100644
index c7143a600c..0000000000
--- a/code/game/objects/items/devices/radio/radio_vr.dm
+++ /dev/null
@@ -1,33 +0,0 @@
-/obj/item/radio/phone
- subspace_transmission = TRUE
- canhear_range = 0
- adhoc_fallback = TRUE
-
-/obj/item/radio/emergency
- name = "Medbay Emergency Radio Link"
- icon_state = "med_walkietalkie"
- frequency = MED_I_FREQ
- subspace_transmission = TRUE
- adhoc_fallback = TRUE
-
-/obj/item/radio/emergency/Initialize(mapload)
- . = ..()
- internal_channels = GLOB.default_medbay_channels.Copy()
-
-
-
-/obj/item/bluespaceradio/tether_prelinked
- name = "bluespace radio (tether)"
- handset = /obj/item/radio/bluespacehandset/linked/tether_prelinked
-
-/obj/item/radio/bluespacehandset/linked/tether_prelinked
- bs_tx_preload_id = "tether_rx" //Transmit to a receiver
- bs_rx_preload_id = "tether_tx" //Recveive from a transmitter
-
-/obj/item/bluespaceradio/talon_prelinked
- name = "bluespace radio (talon)"
- handset = /obj/item/radio/bluespacehandset/linked/talon_prelinked
-
-/obj/item/radio/bluespacehandset/linked/talon_prelinked
- bs_tx_preload_id = "talon_aio" //Transmit to a receiver
- bs_rx_preload_id = "talon_aio" //Recveive from a transmitter
diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm
index 377e6ac0e3..e6b09f37ea 100644
--- a/code/game/objects/items/devices/transfer_valve.dm
+++ b/code/game/objects/items/devices/transfer_valve.dm
@@ -61,7 +61,7 @@
return
var/atom/movable/AM = WF.resolve()
if(isnull(AM))
- log_debug("DEBUG: HasProximity called without reference on [src].")
+ log_runtime("DEBUG: HasProximity called without reference on [src].")
attached_device?.HasProximity(T, WF, old_loc)
/obj/item/transfer_valve/Moved(old_loc, direction, forced)
diff --git a/code/game/objects/items/devices/uplink_random_lists.dm b/code/game/objects/items/devices/uplink_random_lists.dm
index bb1ee97d77..c0221585dc 100644
--- a/code/game/objects/items/devices/uplink_random_lists.dm
+++ b/code/game/objects/items/devices/uplink_random_lists.dm
@@ -114,5 +114,5 @@ var/datum/uplink_random_selection/all_uplink_selection = new/datum/uplink_random
/proc/debug_uplink_item_assoc_list()
for(var/key in uplink.items_assoc)
- to_world("[key] - [uplink.items_assoc[key]]")
+ to_chat(world, "[key] - [uplink.items_assoc[key]]")
#endif
diff --git a/code/game/objects/items/weapons/grenades/anti_photon_grenade.dm b/code/game/objects/items/weapons/grenades/anti_photon_grenade.dm
index a103e859f2..7658e69e27 100644
--- a/code/game/objects/items/weapons/grenades/anti_photon_grenade.dm
+++ b/code/game/objects/items/weapons/grenades/anti_photon_grenade.dm
@@ -22,7 +22,7 @@
PRIVATE_PROC(TRUE)
SHOULD_NOT_OVERRIDE(TRUE)
if(prob(10+extra_delay))
- set_light(10, 10, "#[num2hex(rand(64,255))][num2hex(rand(64,255))][num2hex(rand(64,255))]")
+ set_light(10, 10, "#[num2hex(rand(64,255), 2)][num2hex(rand(64,255), 2)][num2hex(rand(64,255), 2)]")
addtimer(CALLBACK(src, PROC_REF(grenade_blast)), 10, TIMER_DELETE_ME)
/obj/item/grenade/anti_photon/proc/grenade_blast()
diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm
index 9da5ebb6a9..99fc3c4408 100644
--- a/code/game/objects/items/weapons/tanks/tanks.dm
+++ b/code/game/objects/items/weapons/tanks/tanks.dm
@@ -444,7 +444,7 @@ var/list/global/tank_gauge_cache = list()
else if(pressure > TANK_RUPTURE_PRESSURE)
#ifdef FIREDBG
- log_debug(span_warning("[x],[y] tank is rupturing: [pressure] kPa, integrity [integrity]"))
+ log_world(span_warning("[x],[y] tank is rupturing: [pressure] kPa, integrity [integrity]"))
#endif
air_contents.react()
@@ -504,7 +504,7 @@ var/list/global/tank_gauge_cache = list()
playsound(src, 'sound/effects/spray.ogg', 10, 1, -3)
leaking = 1
#ifdef FIREDBG
- log_debug(span_warning("[x],[y] tank is leaking: [pressure] kPa, integrity [integrity]"))
+ log_world(span_warning("[x],[y] tank is leaking: [pressure] kPa, integrity [integrity]"))
#endif
@@ -662,7 +662,7 @@ var/list/global/tank_gauge_cache = list()
return
var/atom/movable/AM = WF.resolve()
if(isnull(AM))
- log_debug("DEBUG: HasProximity called without reference on [src].")
+ log_runtime("DEBUG: HasProximity called without reference on [src].")
return
assembly?.HasProximity(T, WF, old_loc)
diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm
index 00974ffeee..460a5ae9d2 100644
--- a/code/game/objects/structures/artstuff.dm
+++ b/code/game/objects/structures/artstuff.dm
@@ -516,7 +516,7 @@
break
if(!new_canvas)
- warning("Couldn't find a canvas to match [w]x[h] of painting")
+ WARNING("Couldn't find a canvas to match [w]x[h] of painting")
return
new_canvas.fill_grid_from_icon(I)
@@ -558,7 +558,7 @@
return 0
if(!fexists("data/persistent/paintings/[persistence_id]/[painting["md5"]].png"))
to_chat(usr, span_warning("Chosen painting could not be loaded! Incident was logged, but no action taken at this time"))
- log_debug("[usr] tried to spawn painting of list id [which_painting] in all_paintings list and associated file could not be found. \n \
+ log_runtime("[usr] tried to spawn painting of list id [which_painting] in all_paintings list and associated file could not be found. \n \
Painting was titled [title] by [author_ckey] of [persistence_id]")
return 0
@@ -573,7 +573,7 @@
break
if(!new_canvas)
- warning("Couldn't find a canvas to match [w]x[h] of painting")
+ WARNING("Couldn't find a canvas to match [w]x[h] of painting")
return 0
new_canvas.fill_grid_from_icon(I)
@@ -596,7 +596,7 @@
Proceed? It will likely have over 500 entries", "Generate list?", list("Proceed!", "Cancel")) != "Proceed!")
return
- log_debug("[usr] generated list of paintings from SSPersistence")
+ // to_chat(world, "[usr] generated list of paintings from SSPersistence")
var/list/paintings = list()
var/current = 1
for(var/entry in SSpersistence.all_paintings)
diff --git a/code/game/objects/structures/catwalk.dm b/code/game/objects/structures/catwalk.dm
index 4b5cdc69fa..98dff9edb3 100644
--- a/code/game/objects/structures/catwalk.dm
+++ b/code/game/objects/structures/catwalk.dm
@@ -174,7 +174,7 @@
if(activated) return
if(locate(/obj/structure/catwalk) in loc)
- warning("Frame Spawner: A catwalk already exists at [loc.x]-[loc.y]-[loc.z]")
+ WARNING("Frame Spawner: A catwalk already exists at [loc.x]-[loc.y]-[loc.z]")
else
var/obj/structure/catwalk/C = new /obj/structure/catwalk(loc)
C.plated_tile = tile
diff --git a/code/game/objects/structures/droppod.dm b/code/game/objects/structures/droppod.dm
index 2ee4706f36..f2ad9f4c31 100644
--- a/code/game/objects/structures/droppod.dm
+++ b/code/game/objects/structures/droppod.dm
@@ -27,7 +27,7 @@
/obj/structure/drop_pod/proc/podfall(auto_open)
var/turf/T = get_turf(src)
if(!T)
- warning("Drop pod wasn't spawned on a turf")
+ WARNING("Drop pod wasn't spawned on a turf")
return
moveToNullspace()
diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm
index 3251dd9cd4..24be51724c 100644
--- a/code/game/objects/structures/lattice.dm
+++ b/code/game/objects/structures/lattice.dm
@@ -16,7 +16,7 @@
for(var/obj/structure/lattice/LAT in src.loc)
if(LAT != src)
- log_debug("Found multiple lattices at '[log_info_line(loc)]'") //VOREStation Edit, why was this a runtime, it's harmless
+ log_mapping("Found multiple lattices at '[log_info_line(loc)]'") //VOREStation Edit, why was this a runtime, it's harmless
return INITIALIZE_HINT_QDEL
icon = 'icons/obj/smoothlattice.dmi'
icon_state = "latticeblank"
diff --git a/code/game/objects/structures/low_wall.dm b/code/game/objects/structures/low_wall.dm
index d5b4f789fb..36a458c069 100644
--- a/code/game/objects/structures/low_wall.dm
+++ b/code/game/objects/structures/low_wall.dm
@@ -32,7 +32,7 @@
icon_state = "blank"
var/turf/T = loc
if(!isturf(T) || T.density || T.opacity)
- warning("[src] on invalid turf [T] at [x],[y],[z]")
+ WARNING("[src] on invalid turf [T] at [x],[y],[z]")
return INITIALIZE_HINT_QDEL
if(!materialtype)
@@ -575,7 +575,7 @@
/obj/effect/low_wall_spawner/Initialize(mapload)
. = ..()
if(locate(/obj/effect/low_wall_spawner) in oview(0, src))
- warning("Duplicate low wall spawners in [x],[y],[z]!")
+ WARNING("Duplicate low wall spawners in [x],[y],[z]!")
return INITIALIZE_HINT_QDEL
if(low_wall_type)
diff --git a/code/game/turfs/simulated/fancy_shuttles.dm b/code/game/turfs/simulated/fancy_shuttles.dm
index fed77912a0..6313d01e01 100644
--- a/code/game/turfs/simulated/fancy_shuttles.dm
+++ b/code/game/turfs/simulated/fancy_shuttles.dm
@@ -29,7 +29,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/fancy_shuttle)
/obj/effect/fancy_shuttle/Initialize(mapload) // has to be very early so others can grab it
. = ..()
if(!fancy_shuttle_tag)
- error("Fancy shuttle with no tag at [x],[y],[z]! Type is: [type]")
+ log_mapping("## ERROR Fancy shuttle with no tag at [x],[y],[z]! Type is: [type]")
return INITIALIZE_HINT_QDEL
split_icon = icon(split_file, null, dir)
GLOB.fancy_shuttles[fancy_shuttle_tag] = src
@@ -131,7 +131,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/fancy_shuttle)
if(fancy_shuttle_tag) // after a shuttle jump it won't be set anymore, but the shuttle jump proc will set our icon and state
var/obj/effect/fancy_shuttle/F = GLOB.fancy_shuttles[fancy_shuttle_tag]
if(!F)
- warning("Fancy shuttle wall at [x],[y],[z] couldn't locate a helper with tag [fancy_shuttle_tag]")
+ WARNING("Fancy shuttle wall at [x],[y],[z] couldn't locate a helper with tag [fancy_shuttle_tag]")
return
icon = F.split_icon
icon_state = "walls [x - F.x],[y - F.y]"
@@ -165,7 +165,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/fancy_shuttle)
/obj/effect/floor_decal/fancy_shuttle/Initialize(mapload)
var/obj/effect/fancy_shuttle/F = GLOB.fancy_shuttles[fancy_shuttle_tag]
if(!F)
- warning("Fancy shuttle floor decal at [x],[y],[z] couldn't locate a helper with tag [fancy_shuttle_tag]")
+ WARNING("Fancy shuttle floor decal at [x],[y],[z] couldn't locate a helper with tag [fancy_shuttle_tag]")
return INITIALIZE_HINT_QDEL
icon = F.split_icon
icon_file = F.split_file
@@ -208,7 +208,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/fancy_shuttle)
if(fancy_shuttle_tag) // after a shuttle jump it won't be set anymore, but the shuttle jump proc will set our icon and state
var/obj/effect/fancy_shuttle/F = GLOB.fancy_shuttles[fancy_shuttle_tag]
if(!F)
- warning("Fancy shuttle wall at [x],[y],[z] couldn't locate a helper with tag [fancy_shuttle_tag]")
+ WARNING("Fancy shuttle wall at [x],[y],[z] couldn't locate a helper with tag [fancy_shuttle_tag]")
return
icon = F.split_icon
icon_state = "walls [x - F.x],[y - F.y]"
diff --git a/code/game/turfs/simulated/wall_types.dm b/code/game/turfs/simulated/wall_types.dm
index 3f4bbb7520..2822a97e41 100644
--- a/code/game/turfs/simulated/wall_types.dm
+++ b/code/game/turfs/simulated/wall_types.dm
@@ -328,7 +328,7 @@
break
if(!T)
- warning("Hull corner at [x],[y] not placed adjacent to a hull it can find.")
+ WARNING("Hull corner at [x],[y] not placed adjacent to a hull it can find.")
/obj/structure/hull_corner/long_vert
icon = 'icons/turf/wall_masks32x64.dmi'
diff --git a/code/game/turfs/unsimulated/sky_vr.dm b/code/game/turfs/unsimulated/sky_vr.dm
index 01e603052e..f805f06d31 100644
--- a/code/game/turfs/unsimulated/sky_vr.dm
+++ b/code/game/turfs/unsimulated/sky_vr.dm
@@ -14,7 +14,7 @@
/turf/unsimulated/floor/sky/Initialize(mapload)
. = ..()
if(does_skyfall && !LAZYLEN(skyfall_levels))
- error("[x],[y],[z], [get_area(src)] doesn't have skyfall_levels defined! Can't skyfall!")
+ log_mapping("## ERROR [x],[y],[z], [get_area(src)] doesn't have skyfall_levels defined! Can't skyfall!")
if(locate(/turf/simulated) in orange(src,1))
set_light(2, 2, color)
diff --git a/code/game/vehicles/vehicle.dm b/code/game/vehicles/vehicle.dm
index 69a4716f47..13c366bf8b 100644
--- a/code/game/vehicles/vehicle.dm
+++ b/code/game/vehicles/vehicle.dm
@@ -63,7 +63,7 @@
spark_system.attach(src)
add_cell()
removeVerb(/atom/movable/verb/pull)
- log_message("[src.name]'s functions initialised. Work protocols active - Entering IDLE mode.")
+ src.mecha_log_message("[src.name]'s functions initialised. Work protocols active - Entering IDLE mode.")
//################ Helpers ###########################################################
@@ -98,7 +98,7 @@
//################ Logs and messages ############################################
-/obj/vehicle/proc/log_message(message as text,red=null)
+/obj/vehicle/proc/mecha_log_message(message as text,red=null)
log.len++
log[log.len] = list("time"=world.timeofday,"message"="[red?span_red("[message]"):[message]]")
return log.len
diff --git a/code/game/world.dm b/code/game/world.dm
index 014c95c8ec..7887269163 100644
--- a/code/game/world.dm
+++ b/code/game/world.dm
@@ -87,9 +87,15 @@ GLOBAL_VAR(restart_counter)
Profile(PROFILE_RESTART)
Profile(PROFILE_RESTART, type = "sendmaps")
+ // Write everything to this log file until we get to SetupLogs() later
+ _initialize_log_files("data/logs/config_error.[GUID()].log")
+
// Init the debugger first so we can debug Master
Debugger = new
+ // Create the logger
+ logger = new
+
// THAT'S IT, WE'RE DONE, THE. FUCKING. END.
Master = new
@@ -124,27 +130,7 @@ GLOBAL_VAR(restart_counter)
world_startup_time = world.timeofday
rollover_safety_date = world.realtime - world.timeofday // 00:00 today (ish, since floating point error with world.realtime) of today
- to_world_log("Map Loading Complete")
- //logs
- //VOREStation Edit Start
- var/override_dir = params[OVERRIDE_LOG_DIRECTORY_PARAMETER]
- if(override_dir)
- GLOB.log_directory = "data/logs/[override_dir]"
- else
- GLOB.log_directory += time2text(world.realtime, "YYYY/MM-Month/DD-Day/round-hh-mm-ss")
- GLOB.diary = start_log("[GLOB.log_directory].log")
- GLOB.href_logfile = start_log("[GLOB.log_directory]-hrefs.htm")
- GLOB.error_log = start_log("[GLOB.log_directory]-error.log")
- GLOB.sql_error_log = start_log("[GLOB.log_directory]-sql-error.log")
- GLOB.query_debug_log = start_log("[GLOB.log_directory]-query-debug.log")
- GLOB.debug_log = start_log("[GLOB.log_directory]-debug.log")
-
- var/latest_changelog = file("[global.config.directory]/../html/changelogs/archive/" + time2text(world.timeofday, "YYYY-MM") + ".yml")
- GLOB.changelog_hash = fexists(latest_changelog) ? md5(latest_changelog) : "" //for telling if the changelog has changed recently
- to_world_log("Changelog Hash: '[GLOB.changelog_hash]' ([latest_changelog])")
-
- // First possible sleep()
InitTgs()
config.Load(params[OVERRIDE_CONFIG_DIRECTORY_PARAMETER])
@@ -177,8 +163,8 @@ GLOBAL_VAR(restart_counter)
setup_season() //VOREStation Addition
#ifdef UNIT_TESTS
- log_unit_test("Unit Tests Enabled. This will destroy the world when testing is complete.")
- log_unit_test("If you did not intend to enable this please check code/__defines/unit_testing.dm")
+ log_test("Unit Tests Enabled. This will destroy the world when testing is complete.")
+ log_test("If you did not intend to enable this please check code/__defines/unit_testing.dm")
#endif
// This is kinda important. Set up details of what the hell things are made of.
@@ -221,6 +207,8 @@ GLOBAL_VAR(restart_counter)
// Try to set round ID
SSdbcore.InitializeRound()
+ SetupLogs()
+
load_admins(initial = TRUE)
//apply a default value to config.python_path, if needed
@@ -266,6 +254,46 @@ GLOBAL_VAR(restart_counter)
data["timestamp"] = rustg_unix_timestamp()
return data
+/world/proc/SetupLogs()
+ var/override_dir = params[OVERRIDE_LOG_DIRECTORY_PARAMETER]
+ if(!override_dir)
+ var/realtime = world.realtime
+ var/texttime = time2text(realtime, "YYYY/MM/DD", TIMEZONE_UTC)
+ GLOB.log_directory = "data/logs/[texttime]/round-"
+ if(GLOB.round_id)
+ GLOB.log_directory += "[GLOB.round_id]"
+ //GLOB.picture_logging_prefix += "R_[GLOB.round_id]_"
+ //GLOB.picture_log_directory += "[GLOB.round_id]"
+ else
+ var/timestamp = replacetext(time_stamp(), ":", ".")
+ GLOB.log_directory += "[timestamp]"
+ //GLOB.picture_log_directory += "[timestamp]"
+ //GLOB.picture_logging_prefix += "T_[timestamp]_"
+ else
+ GLOB.log_directory = "data/logs/[override_dir]"
+ //GLOB.picture_logging_prefix = "O_[override_dir]_"
+ //GLOB.picture_log_directory = "data/picture_logs/[override_dir]"
+
+ logger.init_logging()
+
+ var/latest_changelog = file("[global.config.directory]/../html/changelogs/archive/" + time2text(world.timeofday, "YYYY-MM", TIMEZONE_UTC) + ".yml")
+ GLOB.changelog_hash = fexists(latest_changelog) ? md5(latest_changelog) : 0 //for telling if the changelog has changed recently
+
+ if(GLOB.round_id)
+ log_game("Round ID: [GLOB.round_id]")
+
+ // This was printed early in startup to the world log and config_error.log,
+ // but those are both private, so let's put the commit info in the runtime
+ // log which is ultimately public.
+ log_runtime(GLOB.revdata.get_log_message())
+
+#ifndef USE_CUSTOM_ERROR_HANDLER
+ world.log = file("[GLOB.log_directory]/dd.log")
+#else
+ if (TgsAvailable()) // why
+ world.log = file("[GLOB.log_directory]/dd.log") //not all runtimes trigger world/Error, so this is the only way to ensure we can see all of them.
+#endif
+
var/world_topic_spam_protect_ip = "0.0.0.0"
var/world_topic_spam_protect_time = world.timeofday
@@ -512,9 +540,10 @@ var/world_topic_spam_protect_time = world.timeofday
if (usr)
log_admin("[key_name(usr)] Has requested an immediate world restart via client side debugging tools")
message_admins("[key_name_admin(usr)] Has requested an immediate world restart via client side debugging tools")
- to_world(span_boldannounce("[key_name_admin(usr)] has requested an immediate world restart via client side debugging tools"))
+ to_chat(world, span_boldannounce("[key_name_admin(usr)] has requested an immediate world restart via client side debugging tools"))
+
else
- to_world(span_boldannounce("Rebooting world immediately due to host request"))
+ to_chat(world, span_boldannounce("Rebooting world immediately due to host request"))
else
Master.Shutdown() //run SS shutdowns
for(var/client/C in GLOB.clients)
@@ -527,19 +556,19 @@ var/world_topic_spam_protect_time = world.timeofday
#else
if(check_hard_reboot())
log_world("World hard rebooted at [time_stamp()]")
- //shutdown_logging() // See comment below.
+ shutdown_logging() // See comment below.
//QDEL_NULL(Tracy)
//QDEL_NULL(Debugger)
TgsEndProcess()
return ..()
- TgsReboot()
log_world("World rebooted at [time_stamp()]")
+ shutdown_logging() // Past this point, no logging procs can be used, at risk of data loss.
QDEL_NULL(Tracy)
QDEL_NULL(Debugger)
- TgsReboot()
+ TgsReboot() // TGS can decide to kill us right here, so it's important to do it last
..()
#endif
@@ -562,7 +591,7 @@ var/world_topic_spam_protect_time = world.timeofday
if(Lines.len)
if(Lines[1])
GLOB.master_mode = Lines[1]
- log_misc("Saved mode is '[GLOB.master_mode]'")
+ log_world("## MISC Saved mode is '[GLOB.master_mode]'")
/world/proc/save_mode(var/the_mode)
var/F = file("data/mode.txt")
@@ -577,7 +606,7 @@ var/world_topic_spam_protect_time = world.timeofday
if(CONFIG_GET(flag/admin_legacy_system))
var/text = file2text("config/moderators.txt")
if (!text)
- error("Failed to load config/mods.txt")
+ log_world("Failed to load config/mods.txt")
else
var/list/lines = splittext(text, "\n")
for(var/line in lines)
@@ -658,11 +687,11 @@ var/failed_old_db_connections = 0
/hook/startup/proc/connectDB()
if(!CONFIG_GET(flag/sql_enabled))
- to_world_log("SQL connection disabled in config.")
+ log_sql("SQL connection disabled in config.")
else if(!setup_database_connection())
- to_world_log("Your server failed to establish a connection with the feedback database.")
+ log_sql("Your server failed to establish a connection with the feedback database.")
else
- to_world_log("Feedback database connection established.")
+ log_sql("Feedback database connection established.")
return 1
/proc/setup_database_connection()
@@ -686,7 +715,7 @@ var/failed_old_db_connections = 0
failed_db_connections = 0 //If this connection succeeded, reset the failed connections counter.
else
failed_db_connections++ //If it failed, increase the failed connections counter.
- to_world_log(SSdbcore.ErrorMsg())
+ log_sql(SSdbcore.ErrorMsg())
return .
@@ -721,7 +750,7 @@ var/failed_old_db_connections = 0
results += "FAIL: failed to connect to the database with setup_database_connection()"
results += "-- DB Reset End --"
- to_world_log(results.Join("\n"))
+ log_sql(results.Join("\n"))
// Things to do when a new z-level was just made.
/world/proc/max_z_changed()
diff --git a/code/js/view_variables.js b/code/js/view_variables.js
index 1b29528706..44f827f8da 100644
--- a/code/js/view_variables.js
+++ b/code/js/view_variables.js
@@ -1,30 +1,30 @@
function updateSearch() {
- var filter_text = document.getElementById("filter");
- var filter = filter_text.value.toLowerCase();
+ const filter_text = document.getElementById('filter');
+ const filter = filter_text.value.toLowerCase();
- var vars_ol = document.getElementById("vars");
- var lis = vars_ol.children;
+ const vars_ol = document.getElementById('vars');
+ const lis = vars_ol.children;
// the above line can be changed to vars_ol.getElementsByTagName("li") to filter child lists too
// potential todo: implement a per-admin toggle for this
- for (var i = 0; i < lis.length; i++) {
- var li = lis[i];
- if (filter == "" || li.innerText.toLowerCase().indexOf(filter) != -1) {
- li.style.display = "block";
+ for (let i = 0; i < lis.length; i++) {
+ const li = lis[i];
+ if (filter === '' || li.innerText.toLowerCase().indexOf(filter) !== -1) {
+ li.style.display = 'block';
} else {
- li.style.display = "none";
+ li.style.display = 'none';
}
}
}
function selectTextField() {
- var filter_text = document.getElementById("filter");
+ const filter_text = document.getElementById('filter');
filter_text.focus();
filter_text.select();
}
function loadPage(list) {
- if (list.options[list.selectedIndex].value == "") {
+ if (list.options[list.selectedIndex].value === '') {
return;
}
diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm
index 6acbf36fc2..0d4cc98d02 100644
--- a/code/modules/admin/IsBanned.dm
+++ b/code/modules/admin/IsBanned.dm
@@ -1,18 +1,24 @@
#ifndef OVERRIDE_BAN_SYSTEM
//Blocks an attempt to connect before even creating our client datum thing.
-/world/IsBanned(key,address,computer_id)
+/world/IsBanned(key, address, computer_id, type, real_bans_only=FALSE)
+ if (!key || (!real_bans_only && (!address || !computer_id)))
+ if(real_bans_only)
+ return FALSE
+ log_access("Failed Login (invalid data): [key] [address]-[computer_id]")
+ return list("reason"="invalid login data", "desc"="Error: Could not check ban status, Please try again. Error message: Your computer provided invalid or blank information to the server on connection (byond username, IP, and Computer ID.) Provided information for reference: Username:'[key]' IP:'[address]' Computer ID:'[computer_id]'. (If you continue to get this error, please restart byond or contact byond support.)")
+
if(ckey(key) in GLOB.admin_datums)
return ..()
//Guest Checking
if(!CONFIG_GET(flag/guests_allowed) && IsGuestKey(key))
- log_adminwarn("Failed Login: [key] - Guests not allowed")
+ log_access("Failed Login: [key] - Guests not allowed")
message_admins(span_blue("Failed Login: [key] - Guests not allowed"))
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
//check if the IP address is a known TOR node
if(config && CONFIG_GET(flag/ToRban) && ToRban_isbanned(address))
- log_adminwarn("Failed Login: [src] - Banned: ToR")
+ log_access("Failed Login: [src] - Banned: ToR")
message_admins(span_blue("Failed Login: [src] - Banned: ToR"))
//ban their computer_id and ckey for posterity
AddBan(ckey(key), computer_id, "Use of ToR", "Automated Ban", 0, 0)
@@ -24,7 +30,7 @@
//Ban Checking
. = CheckBan( ckey(key), computer_id, address )
if(.)
- log_adminwarn("Failed Login: [key] [computer_id] [address] - Banned [.["reason"]]")
+ log_suspicious_login("Failed Login: [key] [computer_id] [address] - Banned [.["reason"]]")
message_admins(span_blue("Failed Login: [key] id:[computer_id] ip:[address] - Banned [.["reason"]]"))
return .
@@ -35,8 +41,9 @@
var/ckeytext = ckey(key)
if(!establish_db_connection())
- error("Ban database connection failure. Key [ckeytext] not checked")
- log_misc("Ban database connection failure. Key [ckeytext] not checked")
+ var/msg = "Ban database connection failure. Key [ckeytext] not checked"
+ log_world(msg)
+ message_admins(msg)
return
var/failedcid = 1
@@ -53,7 +60,7 @@
if(isnum(text2num(computer_id)))
cidquery = " OR computerid = '[computer_id]' "
else
- log_misc("Key [ckeytext] cid not checked. Non-Numeric: [computer_id]")
+ log_world("Key [ckeytext] cid not checked. Non-Numeric: [computer_id]")
failedcid = 1
var/datum/db_query/query = SSdbcore.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM erro_ban WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
diff --git a/code/modules/admin/ToRban.dm b/code/modules/admin/ToRban.dm
index 8cdae64876..11cb9c5440 100644
--- a/code/modules/admin/ToRban.dm
+++ b/code/modules/admin/ToRban.dm
@@ -22,10 +22,10 @@
/proc/ToRban_update()
spawn(0)
- log_misc("Downloading updated ToR data...")
+ log_world("Downloading updated ToR data...")
var/http[] = world.Export("https://check.torproject.org/exit-addresses")
- var/list/rawlist = file2list(http["CONTENT"])
+ var/list/rawlist = world.file2list(http["CONTENT"])
if(rawlist.len)
fdel(TORFILE)
var/savefile/F = new(TORFILE)
@@ -36,11 +36,11 @@
if(!cleaned) continue
F[cleaned] << 1
F["last_update"] << world.realtime
- log_misc("ToR data updated!")
+ log_world("ToR data updated!")
if(usr)
to_chat(usr, span_filter_adminlog("ToRban updated."))
return
- log_misc("ToR data update aborted: no data.")
+ log_world("ToR data update aborted: no data.")
return
/client/proc/ToRban(task in list("update","toggle","show","remove","remove all","find"))
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index 7111267822..c0aa2cde1d 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -4,7 +4,7 @@ GLOBAL_VAR_INIT(floorIsLava, 0)
////////////////////////////////
/proc/message_admins(var/msg)
msg = span_filter_adminlog(span_log_message(span_prefix("ADMIN LOG:") + span_message("[msg]")))
- //log_adminwarn(msg) //log_and_message_admins is for this
+ //log_admin_private(msg) //log_and_message_admins is for this
for(var/client/C in GLOB.admins)
if(check_rights_for(C, (R_ADMIN|R_MOD|R_SERVER)))
@@ -542,8 +542,8 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_HOLDER, "Show Player Panel", m
else
dat+="I'm sorry to break your immersion. This shit's bugged. Report this bug to Agouri, polyxenitopalidou@gmail.com"
- //to_world("Channelname: [src.admincaster_feed_channel.channel_name] [src.admincaster_feed_channel.author]")
- //to_world("Msg: [src.admincaster_feed_message.author] [src.admincaster_feed_message.body]")
+ //to_chat(world, "Channelname: [src.admincaster_feed_channel.channel_name] [src.admincaster_feed_channel.author]")
+ //to_chat(world, "Msg: [src.admincaster_feed_message.author] [src.admincaster_feed_message.body]")
var/datum/browser/popup = new(owner, "admincaster_main", "Admin Newscaster", 400, 600)
popup.add_head_content("Admin Newscaster")
@@ -830,9 +830,9 @@ var/datum/announcement/minor/admin_min_announcer = new
CONFIG_SET(flag/ooc_allowed, !CONFIG_GET(flag/ooc_allowed))
if (CONFIG_GET(flag/ooc_allowed))
- to_world(span_world("The OOC channel has been globally enabled!"))
+ to_chat(world, span_world("The OOC channel has been globally enabled!"))
else
- to_world(span_world("The OOC channel has been globally disabled!"))
+ to_chat(world, span_world("The OOC channel has been globally disabled!"))
log_and_message_admins("toggled OOC.")
feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -846,9 +846,9 @@ var/datum/announcement/minor/admin_min_announcer = new
CONFIG_SET(flag/looc_allowed, !CONFIG_GET(flag/looc_allowed))
if (CONFIG_GET(flag/looc_allowed))
- to_world(span_world("The LOOC channel has been globally enabled!"))
+ to_chat(world, span_world("The LOOC channel has been globally enabled!"))
else
- to_world(span_world("The LOOC channel has been globally disabled!"))
+ to_chat(world, span_world("The LOOC channel has been globally disabled!"))
log_and_message_admins("toggled LOOC.")
feedback_add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -863,9 +863,9 @@ var/datum/announcement/minor/admin_min_announcer = new
CONFIG_SET(flag/dsay_allowed, !CONFIG_GET(flag/dsay_allowed))
if (CONFIG_GET(flag/dsay_allowed))
- to_world(span_world("Deadchat has been globally enabled!"))
+ to_chat(world, span_world("Deadchat has been globally enabled!"))
else
- to_world(span_world("Deadchat has been globally disabled!"))
+ to_chat(world, span_world("Deadchat has been globally disabled!"))
log_admin("[key_name(usr)] toggled deadchat.")
message_admins("[key_name_admin(usr)] toggled deadchat.", 1)
feedback_add_details("admin_verb","TDSAY") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc
@@ -925,7 +925,7 @@ var/datum/announcement/minor/admin_min_announcer = new
feedback_add_details("admin_verb","SN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
SSticker.start_immediately = FALSE
- to_world(span_filter_system(span_blue("Immediate game start canceled. Normal startup resumed.")))
+ to_chat(world, span_filter_system(span_blue("Immediate game start canceled. Normal startup resumed.")))
log_and_message_admins("cancelled immediate game start.")
/datum/admins/proc/toggleenter()
@@ -934,9 +934,9 @@ var/datum/announcement/minor/admin_min_announcer = new
set name="Toggle Entering"
CONFIG_SET(flag/enter_allowed, !CONFIG_GET(flag/enter_allowed))
if (!CONFIG_GET(flag/enter_allowed))
- to_world(span_world("New players may no longer enter the game."))
+ to_chat(world, span_world("New players may no longer enter the game."))
else
- to_world(span_world("New players may now enter the game."))
+ to_chat(world, span_world("New players may now enter the game."))
log_admin("[key_name(usr)] toggled new player game entering.")
message_admins(span_blue("[key_name_admin(usr)] toggled new player game entering."), 1)
world.update_status()
@@ -948,9 +948,9 @@ var/datum/announcement/minor/admin_min_announcer = new
set name="Toggle AI"
CONFIG_SET(flag/allow_ai, !CONFIG_GET(flag/allow_ai))
if (!CONFIG_GET(flag/allow_ai))
- to_world(span_world("The AI job is no longer chooseable."))
+ to_chat(world, span_world("The AI job is no longer chooseable."))
else
- to_world(span_world("The AI job is chooseable now."))
+ to_chat(world, span_world("The AI job is chooseable now."))
log_admin("[key_name(usr)] toggled AI allowed.")
world.update_status()
feedback_add_details("admin_verb","TAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -961,9 +961,9 @@ var/datum/announcement/minor/admin_min_announcer = new
set name="Toggle Respawn"
CONFIG_SET(flag/abandon_allowed, !CONFIG_GET(flag/abandon_allowed))
if(CONFIG_GET(flag/abandon_allowed))
- to_world(span_world("You may now respawn."))
+ to_chat(world, span_world("You may now respawn."))
else
- to_world(span_world("You may no longer respawn :("))
+ to_chat(world, span_world("You may no longer respawn :("))
message_admins(span_blue("[key_name_admin(usr)] toggled respawn to [CONFIG_GET(flag/abandon_allowed) ? "On" : "Off"]."), 1)
log_admin("[key_name(usr)] toggled respawn to [CONFIG_GET(flag/abandon_allowed) ? "On" : "Off"].")
world.update_status()
@@ -985,9 +985,9 @@ var/datum/announcement/minor/admin_min_announcer = new
set name="Toggle Mapload Persistent Data"
CONFIG_SET(flag/persistence_ignore_mapload, !CONFIG_GET(flag/persistence_ignore_mapload))
if(!CONFIG_GET(flag/persistence_ignore_mapload))
- to_world(span_world("Persistence is now enabled."))
+ to_chat(world, span_world("Persistence is now enabled."))
else
- to_world(span_world("Persistence is no longer enabled."))
+ to_chat(world, span_world("Persistence is no longer enabled."))
message_admins(span_blue("[key_name_admin(usr)] toggled persistence to [CONFIG_GET(flag/persistence_ignore_mapload) ? "Off" : "On"]."), 1)
log_admin("[key_name(usr)] toggled persistence to [CONFIG_GET(flag/persistence_ignore_mapload) ? "Off" : "On"].")
world.update_status()
@@ -1024,10 +1024,10 @@ var/datum/announcement/minor/admin_min_announcer = new
return
GLOB.round_progressing = !GLOB.round_progressing
if (!GLOB.round_progressing)
- to_world(span_world("The game start has been delayed."))
+ to_chat(world, span_world("The game start has been delayed."))
log_admin("[key_name(usr)] delayed the game.")
else
- to_world(span_world("The game will start soon."))
+ to_chat(world, span_world("The game will start soon."))
log_admin("[key_name(usr)] removed the delay.")
feedback_add_details("admin_verb","DELAY") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -1294,9 +1294,9 @@ var/datum/announcement/minor/admin_min_announcer = new
set name="Toggle tinted welding helmets."
CONFIG_SET(flag/welder_vision, !CONFIG_GET(flag/welder_vision))
if (CONFIG_GET(flag/welder_vision))
- to_world(span_world("Reduced welder vision has been enabled!"))
+ to_chat(world, span_world("Reduced welder vision has been enabled!"))
else
- to_world(span_world("Reduced welder vision has been disabled!"))
+ to_chat(world, span_world("Reduced welder vision has been disabled!"))
log_admin("[key_name(usr)] toggled welder vision.")
message_admins("[key_name_admin(usr)] toggled welder vision.", 1)
feedback_add_details("admin_verb","TTWH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -1307,9 +1307,9 @@ var/datum/announcement/minor/admin_min_announcer = new
set name="Toggle guests"
CONFIG_SET(flag/guests_allowed, !CONFIG_GET(flag/guests_allowed))
if (!CONFIG_GET(flag/guests_allowed))
- to_world(span_world("Guests may no longer enter the game."))
+ to_chat(world, span_world("Guests may no longer enter the game."))
else
- to_world(span_world("Guests may now enter the game."))
+ to_chat(world, span_world("Guests may now enter the game."))
log_admin("[key_name(usr)] toggled guests game entering [CONFIG_GET(flag/guests_allowed)?"":"dis"]allowed.")
message_admins(span_blue("[key_name_admin(usr)] toggled guests game entering [CONFIG_GET(flag/guests_allowed)?"":"dis"]allowed."), 1)
feedback_add_details("admin_verb","TGU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
diff --git a/code/modules/admin/admin_verb_lists_vr.dm b/code/modules/admin/admin_verb_lists_vr.dm
index 2ae6e2169a..9ec9fa2acf 100644
--- a/code/modules/admin/admin_verb_lists_vr.dm
+++ b/code/modules/admin/admin_verb_lists_vr.dm
@@ -207,7 +207,6 @@ var/list/admin_verbs_debug = list(
/client/proc/hide_verbs, //hides all our adminverbs,
/client/proc/hide_most_verbs, //hides all our hideable adminverbs,
/client/proc/cmd_check_new_players, //allows us to see every new player,
- /datum/admins/proc/view_runtimes,
// /client/proc/show_gm_status, //We don't use SSgame_master yet.
/datum/admins/proc/set_uplink,
/datum/admins/proc/change_weather,
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index d0b20dbfc2..5076a7c402 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -191,6 +191,10 @@ ADMIN_VERB(game_panel, R_ADMIN|R_SERVER|R_FUN, "Game Panel", "Look at the state
user.holder.Game()
feedback_add_details("admin_verb","GP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+/// Returns this client's stealthed ckey
+/client/proc/getStealthKey()
+ return GLOB.stealthminID[ckey]
+
/client/proc/findStealthKey(txt)
if(txt)
for(var/P in GLOB.stealthminID)
diff --git a/code/modules/admin/banjob.dm b/code/modules/admin/banjob.dm
index 56a495c476..7d1f5db646 100644
--- a/code/modules/admin/banjob.dm
+++ b/code/modules/admin/banjob.dm
@@ -70,8 +70,7 @@ DEBUG
log_admin("jobban_keylist was empty")
else
if(!establish_db_connection())
- error("Database connection failed. Reverting to the legacy ban system.")
- log_misc("Database connection failed. Reverting to the legacy ban system.")
+ log_sql("Database connection failed. Reverting to the legacy ban system.")
CONFIG_SET(flag/ban_legacy_system, TRUE)
jobban_loadbanfile()
return
diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm
index 0f2efe3283..aa1e81145b 100644
--- a/code/modules/admin/player_panel.dm
+++ b/code/modules/admin/player_panel.dm
@@ -79,7 +79,7 @@
body += "PP - "
body += "N - "
- body += "VV - "
+ body += "VV - "
body += "TP - "
body += "PM - "
body += "SM - "
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 5e4d6cb9c7..86aeea292b 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -6,11 +6,13 @@
var/msg = !auth ? "no" : "a bad"
message_admins("[key_name_admin(usr)] clicked an href with [msg] authorization key!")
+ /* Debug code in case one needs to dig missing token HREFS
var/debug_admin_hrefs = TRUE // Remove once everything is converted over
if(debug_admin_hrefs)
message_admins("Debug mode enabled, call not blocked. Please ask your coders to review this round's logs.")
log_world("UAH: [href]")
return TRUE
+ */
log_admin("[key_name(usr)] clicked an href with [msg] authorization key! [href]")
@@ -864,7 +866,7 @@
GLOB.master_mode = href_list["c_mode2"]
log_admin("[key_name(usr)] set the mode as [config.mode_names[GLOB.master_mode]].")
message_admins(span_blue("[key_name_admin(usr)] set the mode as [config.mode_names[GLOB.master_mode]]."), 1)
- to_world(span_world(span_blue("The mode is now: [config.mode_names[GLOB.master_mode]]")))
+ to_chat(world, span_world(span_blue("The mode is now: [config.mode_names[GLOB.master_mode]]")))
Game() // updates the main game menu
world.save_mode(GLOB.master_mode)
.(href, list("c_mode"=1))
diff --git a/code/modules/admin/verbs/BrokenInhands.dm b/code/modules/admin/verbs/BrokenInhands.dm
index a3aa4454c3..b708783ee8 100644
--- a/code/modules/admin/verbs/BrokenInhands.dm
+++ b/code/modules/admin/verbs/BrokenInhands.dm
@@ -31,4 +31,4 @@
var/F = file("broken_icons.txt")
fdel(F)
F << text
- to_world(span_filter_system("Completeled successfully and written to [F]"))
+ to_chat(world, span_filter_system("Completeled successfully and written to [F]"))
diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm
index af647db526..5fd82db286 100644
--- a/code/modules/admin/verbs/adminsay.dm
+++ b/code/modules/admin/verbs/adminsay.dm
@@ -3,7 +3,7 @@ ADMIN_VERB(cmd_admin_say, R_ADMIN, "ASay", "Send a message to other admins", "Ad
if(!msg)
return
- log_adminsay(msg, user)
+ user.mob.log_talk(message, LOG_ASAY)
for(var/client/C in GLOB.admins)
if(check_rights_for(C, R_ADMIN))
@@ -13,7 +13,7 @@ ADMIN_VERB(cmd_admin_say, R_ADMIN, "ASay", "Send a message to other admins", "Ad
ADMIN_VERB(cmd_mod_say, (R_ADMIN|R_MOD|R_SERVER), "Msay", "Send a message to other mod", "Admin.Chat", message as text)
var/msg = sanitize(message)
- log_modsay(msg, user)
+ log_modsay(msg, list("speaker" = user))
if (!msg)
return
@@ -29,7 +29,7 @@ ADMIN_VERB(cmd_mod_say, (R_ADMIN|R_MOD|R_SERVER), "Msay", "Send a message to oth
ADMIN_VERB(cmd_event_say, (R_ADMIN|R_MOD|R_EVENT|R_SERVER), "Esay", "Send a message to other event manager", "Admin.Chat", message as text)
var/msg = sanitize(message)
- log_eventsay(msg, user)
+ log_eventsay(msg, list("speaker" = user))
if (!msg)
return
diff --git a/code/modules/admin/verbs/antag-ooc.dm b/code/modules/admin/verbs/antag-ooc.dm
index 89cb037d17..2405d5e6d8 100644
--- a/code/modules/admin/verbs/antag-ooc.dm
+++ b/code/modules/admin/verbs/antag-ooc.dm
@@ -39,4 +39,4 @@
if((M.mind && M.mind.special_role && A && A.can_hear_aooc) || isobserver(M)) // Antags must have their type be allowed to AOOC to see AOOC. This prevents, say, ERT from seeing AOOC.
to_chat(M, span_ooc(span_aooc("[create_text_tag("aooc", "Antag-OOC:", M.client)] [player_display]: " + span_message("[msg]"))))
- log_aooc(msg,src)
+ src.mob.log_talk("(AOOC) [msg]", LOG_OOC)
diff --git a/code/modules/admin/verbs/cinematic.dm b/code/modules/admin/verbs/cinematic.dm
index c0a5095f55..557d74c825 100644
--- a/code/modules/admin/verbs/cinematic.dm
+++ b/code/modules/admin/verbs/cinematic.dm
@@ -1,4 +1,4 @@
-ADMIN_VERB(cinematic, R_FUN, "Cinematic", "Show a cinematic to all players.", ADMIN_CATEGORY_FUN)
+ADMIN_VERB(cinematic, R_FUN, "Cinematic", "Show a cinematic to all players.", "Fun.Do Not")
var/datum/cinematic/choice = tgui_input_list(
user,
"Chose a cinematic to play to everyone in the server.",
diff --git a/code/modules/admin/verbs/custom_event.dm b/code/modules/admin/verbs/custom_event.dm
index 8cb6d62b15..1c0d242ea7 100644
--- a/code/modules/admin/verbs/custom_event.dm
+++ b/code/modules/admin/verbs/custom_event.dm
@@ -19,10 +19,10 @@
GLOB.custom_event_msg = input
- to_world(span_filter_system("[span_alert("Custom Event")]
"))
- to_world(span_filter_system("[span_alert("A custom event is starting. OOC Info:")]
"))
- to_world(span_filter_system(span_alert("[GLOB.custom_event_msg]")))
- to_world(span_filter_system("
"))
+ to_chat(world, span_filter_system("[span_alert("Custom Event")]
"))
+ to_chat(world, span_filter_system("[span_alert("A custom event is starting. OOC Info:")]
"))
+ to_chat(world, span_filter_system(span_alert("[GLOB.custom_event_msg]")))
+ to_chat(world, span_filter_system("
"))
SSwebhooks.send(
WEBHOOK_CUSTOM_EVENT,
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index 45b5b52d2a..137ab997e8 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -393,33 +393,33 @@ ADMIN_VERB(cmd_assume_direct_control, (R_DEBUG|R_ADMIN|R_EVENT), "Assume Direct
var/list/areas_without_intercom = areas_all - areas_with_intercom
var/list/areas_without_camera = areas_all - areas_with_camera
- to_world(span_bold("AREAS WITHOUT AN APC:"))
+ to_chat(world, span_bold("AREAS WITHOUT AN APC:"))
for(var/areatype in areas_without_APC)
- to_world("* [areatype]")
+ to_chat(world, "* [areatype]")
- to_world(span_bold("AREAS WITHOUT AN AIR ALARM:"))
+ to_chat(world, span_bold("AREAS WITHOUT AN AIR ALARM:"))
for(var/areatype in areas_without_air_alarm)
- to_world("* [areatype]")
+ to_chat(world, "* [areatype]")
- to_world(span_bold("AREAS WITHOUT A REQUEST CONSOLE:"))
+ to_chat(world, span_bold("AREAS WITHOUT A REQUEST CONSOLE:"))
for(var/areatype in areas_without_RC)
- to_world("* [areatype]")
+ to_chat(world, "* [areatype]")
- to_world(span_bold("AREAS WITHOUT ANY LIGHTS:"))
+ to_chat(world, span_bold("AREAS WITHOUT ANY LIGHTS:"))
for(var/areatype in areas_without_light)
- to_world("* [areatype]")
+ to_chat(world, "* [areatype]")
- to_world(span_bold("AREAS WITHOUT A LIGHT SWITCH:"))
+ to_chat(world, span_bold("AREAS WITHOUT A LIGHT SWITCH:"))
for(var/areatype in areas_without_LS)
- to_world("* [areatype]")
+ to_chat(world, "* [areatype]")
- to_world(span_bold("AREAS WITHOUT ANY INTERCOMS:"))
+ to_chat(world, span_bold("AREAS WITHOUT ANY INTERCOMS:"))
for(var/areatype in areas_without_intercom)
- to_world("* [areatype]")
+ to_chat(world, "* [areatype]")
- to_world(span_bold("AREAS WITHOUT ANY CAMERAS:"))
+ to_chat(world, span_bold("AREAS WITHOUT ANY CAMERAS:"))
for(var/areatype in areas_without_camera)
- to_world("* [areatype]")
+ to_chat(world, "* [areatype]")
/datum/admins/proc/cmd_admin_dress(input in getmobs())
set category = "Fun.Event Kit"
@@ -624,15 +624,17 @@ ADMIN_VERB(cmd_assume_direct_control, (R_DEBUG|R_ADMIN|R_EVENT), "Assume Direct
else
tgui_alert_async(usr, "Invalid mob")
-/datum/admins/proc/view_runtimes()
- set category = "Debug.Investigate"
- set name = "View Runtimes"
- set desc = "Open the Runtime Viewer"
+ADMIN_VERB(view_runtimes, R_DEBUG, "View Runtimes", "Opens the runtime viewer.", ADMIN_CATEGORY_DEBUG)
+ GLOB.error_cache.show_to(user)
- if(!check_rights(R_DEBUG))
- return
-
- error_cache.showTo(usr)
+ // The runtime viewer has the potential to crash the server if there's a LOT of runtimes
+ // this has happened before, multiple times, so we'll just leave an alert on it
+ if(GLOB.total_runtimes >= 50000) // arbitrary number, I don't know when exactly it happens
+ var/warning = "There are a lot of runtimes, clicking any button (especially \"linear\") can have the potential to lag or crash the server"
+ if(GLOB.total_runtimes >= 100000)
+ warning = "There are a TON of runtimes, clicking any button (especially \"linear\") WILL LIKELY crash the server"
+ // Not using TGUI alert, because it's view runtimes, stuff is probably broken
+ tgui_alert(user, "[warning]. Proceed with caution. If you really need to see the runtimes, download the runtime log and view it in a text editor.", "HEED THIS WARNING CAREFULLY MORTAL")
/datum/admins/proc/change_weather()
set category = "Debug.Events"
diff --git a/code/modules/admin/verbs/dice.dm b/code/modules/admin/verbs/dice.dm
index 09e171eafd..d9860ac4c8 100644
--- a/code/modules/admin/verbs/dice.dm
+++ b/code/modules/admin/verbs/dice.dm
@@ -14,11 +14,11 @@
var/dice = num2text(sum) + "d" + num2text(side)
if(tgui_alert(usr, "Do you want to inform the world about your game?","Show world?",list("Yes", "No")) == "Yes")
- to_world("The dice have been rolled by Gods!
")
+ to_chat(world, "The dice have been rolled by Gods!
")
var/result = roll(dice)
if(tgui_alert(usr, "Do you want to inform the world about the result?","Show world?",list("Yes", "No")) == "Yes")
- to_world("Gods rolled [dice], result is [result]
")
+ to_chat(world, "Gods rolled [dice], result is [result]
")
message_admins("[key_name_admin(src)] rolled dice [dice], result is [result]", 1)
diff --git a/code/modules/admin/verbs/grief_fixers.dm b/code/modules/admin/verbs/grief_fixers.dm
index 72b66d36a5..38681da7cb 100644
--- a/code/modules/admin/verbs/grief_fixers.dm
+++ b/code/modules/admin/verbs/grief_fixers.dm
@@ -5,7 +5,7 @@ ADMIN_VERB(fix_atmos, (R_ADMIN|R_DEBUG|R_EVENT), "Fix Atmospherics Grief", "View
feedback_add_details("admin_verb","FA")
log_and_message_admins("Full atmosphere reset initiated by [user].")
- to_world(span_danger("Initiating restart of atmosphere. The server may lag a bit."))
+ to_chat(world, span_danger("Initiating restart of atmosphere. The server may lag a bit."))
sleep(10)
var/current_time = world.timeofday
@@ -43,4 +43,4 @@ ADMIN_VERB(fix_atmos, (R_ADMIN|R_DEBUG|R_EVENT), "Fix Atmospherics Grief", "View
SSair.RebootZAS()
to_chat(user, "\[5/5\] - ZAS Rebooted")
- to_world(span_danger("Atmosphere restart completed in " + span_bold("[(world.timeofday - current_time)/10]") + " seconds."))
+ to_chat(world, span_danger("Atmosphere restart completed in " + span_bold("[(world.timeofday - current_time)/10]") + " seconds."))
diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm
index b76df20e2d..7b9bf6e2d6 100644
--- a/code/modules/admin/verbs/mapping.dm
+++ b/code/modules/admin/verbs/mapping.dm
@@ -310,9 +310,9 @@ var/list/debug_verbs = list (
if(i*10+j <= atom_list.len)
temp_atom = atom_list[i*10+j]
line += " no.[i+10+j]@\[[temp_atom.x], [temp_atom.y], [temp_atom.z]\]; "
- to_world(line)*/
+ to_chat(world, line)*/
- to_world("There are [count] objects of type [type_path] on z-level [num_level]")
+ to_chat(world, "There are [count] objects of type [type_path] on z-level [num_level]")
feedback_add_details("admin_verb","mOBJZ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/count_objects_all()
@@ -337,7 +337,7 @@ var/list/debug_verbs = list (
if(i*10+j <= atom_list.len)
temp_atom = atom_list[i*10+j]
line += " no.[i+10+j]@\[[temp_atom.x], [temp_atom.y], [temp_atom.z]\]; "
- to_world(line)*/
+ to_chat(world, line)*/
- to_world("There are [count] objects of type [type_path] in the game world")
+ to_chat(world, "There are [count] objects of type [type_path] in the game world")
feedback_add_details("admin_verb","mOBJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm
index 7dcd38bb86..be85b7d2c4 100644
--- a/code/modules/admin/verbs/playsound.dm
+++ b/code/modules/admin/verbs/playsound.dm
@@ -103,7 +103,7 @@ var/list/sounds_cache = list()
if(!check_rights(R_SOUNDS))
return
- var/list/sounds = file2list("sound/serversound_list.txt");
+ var/list/sounds = world.file2list("sound/serversound_list.txt");
sounds += "--CANCEL--"
sounds += sounds_cache
diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm
index 87e40f5070..f21da808fd 100644
--- a/code/modules/admin/verbs/pray.dm
+++ b/code/modules/admin/verbs/pray.dm
@@ -24,7 +24,7 @@
to_chat(src, "Your prayers have been received by the gods.", confidential = TRUE)
feedback_add_details("admin_verb","PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- log_pray(raw_msg, src)
+ log_prayer("[src.key]/([src.name]): [raw_msg]")
/proc/CentCom_announce(var/msg, var/mob/Sender, var/iamessage)
msg = span_blue(span_bold(span_orange("[uppertext(using_map.boss_short)]M[iamessage ? " IA" : ""]:") + "[key_name(Sender, 1)] [ADMIN_PP(Sender)] [ADMIN_VV(Sender)] [ADMIN_SM(Sender)] ([admin_jump_link(Sender)]) [ADMIN_CA(Sender)] [ADMIN_BSA(Sender)] [ADMIN_CENTCOM_REPLY(Sender)]:") + " [msg]")
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index eb6bd566ff..4a4e9b174b 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -124,7 +124,7 @@ ADMIN_VERB(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTIO
if (!msg) // We check both before and after, just in case sanitization ended us up with empty message.
return
- to_world("[msg]")
+ to_chat(world, "[msg]")
log_admin("GlobalNarrate: [key_name(usr)] : [msg]")
message_admins(span_blue(span_bold(" GlobalNarrate: [key_name_admin(usr)] : [msg]
")), 1)
feedback_add_details("admin_verb","GLN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -709,7 +709,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
if(confirm == "Yes")
command_announcement.Announce(input, customname, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1);
else
- to_world(span_red("New [using_map.company_name] Update available at all communication consoles."))
+ to_chat(world, span_red("New [using_map.company_name] Update available at all communication consoles."))
world << sound('sound/AI/commandreport.ogg')
log_admin("[key_name(src)] has created a command report: [input]")
@@ -963,7 +963,7 @@ ADMIN_VERB(respawn_character, (R_ADMIN|R_REJUVINATE), "Spawn Character", "(Re)Sp
message_admins("Admin [key_name_admin(usr)] has forced the players to have random appearances.", 1)
if(notifyplayers == "Yes")
- to_world(span_boldannounce(span_blue("Admin [usr.key] has forced the players to have completely random identities!")))
+ to_chat(world, span_boldannounce(span_blue("Admin [usr.key] has forced the players to have completely random identities!")))
to_chat(usr, "Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet.")
diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm
index 3d2511ddfe..6dfb95b709 100644
--- a/code/modules/admin/verbs/striketeam.dm
+++ b/code/modules/admin/verbs/striketeam.dm
@@ -200,7 +200,7 @@ GLOBAL_VAR(ert_loaded)
GLOB.ert_loaded = TRUE
var/datum/map_template/MT = SSmapping.map_templates["Special Area - ERT"]
if(!istype(MT))
- error("ERT Area is not a valid map template!")
+ log_mapping("ERT Area is not a valid map template!")
else
MT.load_new_z(centered = TRUE)
log_and_message_admins("Loaded the ERT shuttle just now.")
diff --git a/code/modules/admin/verbs/trader.dm b/code/modules/admin/verbs/trader.dm
index 08a63b4bd8..3b5a2c70ee 100644
--- a/code/modules/admin/verbs/trader.dm
+++ b/code/modules/admin/verbs/trader.dm
@@ -75,7 +75,7 @@ GLOBAL_VAR(trader_loaded)
GLOB.trader_loaded = TRUE
var/datum/map_template/MT = SSmapping.map_templates["Special Area - Salamander Trader"] //was: "Special Area - Trader"
if(!istype(MT))
- error("Trader is not a valid map template!")
+ log_mapping("Trader is not a valid map template!")
else
MT.load_new_z(centered = TRUE)
log_and_message_admins("Loaded the trade shuttle just now.")
diff --git a/code/modules/ai/ai_holder.dm b/code/modules/ai/ai_holder.dm
index b182be332c..76b242fe3c 100644
--- a/code/modules/ai/ai_holder.dm
+++ b/code/modules/ai/ai_holder.dm
@@ -38,7 +38,7 @@
if(ai_holder_type)
ai_holder = new ai_holder_type(src)
if(!ai_holder)
- log_debug("[src] could not initialize ai_holder of type [ai_holder_type]")
+ log_runtime("[src] could not initialize ai_holder of type [ai_holder_type]")
return
if(ishuman(src))
var/mob/living/carbon/human/H = src
diff --git a/code/modules/ai/ai_holder_debug.dm b/code/modules/ai/ai_holder_debug.dm
index b70771d3cd..553a54955d 100644
--- a/code/modules/ai/ai_holder_debug.dm
+++ b/code/modules/ai/ai_holder_debug.dm
@@ -12,7 +12,7 @@
var/stance_coloring = FALSE // Colors the mob depending on its stance.
- var/debug_ai = AI_LOG_OFF // The level of debugging information to display to people who can see log_debug().
+ var/debug_ai = AI_LOG_OFF // The level of debugging information to display to people who can see log_world().
/datum/ai_holder/New()
..()
@@ -41,7 +41,7 @@
if(AI_LOG_TRACE)
span_type = "debug_trace"
if(ver <= debug_ai)
- log_debug("AI: ([holder]:\ref[holder] | [holder.x],[holder.y],[holder.z])(@[world.time]): [msg] ")
+ log_world("AI: ([holder]:\ref[holder] | [holder.x],[holder.y],[holder.z])(@[world.time]): [msg] ")
// Colors the mob based on stance, to visually tell what stance it is for debugging.
// Probably not something you want for regular use.
diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm
index fb2ee2359c..8e40773b2c 100644
--- a/code/modules/assembly/holder.dm
+++ b/code/modules/assembly/holder.dm
@@ -75,7 +75,7 @@
return
var/atom/movable/AM = WF.resolve()
if(isnull(AM))
- log_debug("DEBUG: HasProximity called without reference on [src].")
+ log_runtime("DEBUG: HasProximity called without reference on [src].")
return
if(a_left)
a_left.HasProximity(T, WF, old_loc)
diff --git a/code/modules/assembly/proximity.dm b/code/modules/assembly/proximity.dm
index bb8fd7187f..ae3cfbccad 100644
--- a/code/modules/assembly/proximity.dm
+++ b/code/modules/assembly/proximity.dm
@@ -37,7 +37,7 @@
return
var/atom/movable/AM = WF.resolve()
if(isnull(AM))
- log_debug("DEBUG: HasProximity called without reference on [src].")
+ log_runtime("DEBUG: HasProximity called without reference on [src].")
return
if (istype(AM, /obj/effect/beam))
return
diff --git a/code/modules/asset_cache/asset_cache_item.dm b/code/modules/asset_cache/asset_cache_item.dm
index dbee71b525..9576bfc3d0 100644
--- a/code/modules/asset_cache/asset_cache_item.dm
+++ b/code/modules/asset_cache/asset_cache_item.dm
@@ -46,7 +46,7 @@
hash = md5(fcopy_rsc(file))
if (!hash)
CRASH("invalid asset sent to asset cache")
- log_debug("asset cache unexpected success of second fcopy_rsc")
+ log_runtime("asset cache unexpected success of second fcopy_rsc")
src.name = name
var/extstart = findlasttext(name, ".")
if(extstart)
diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm
index fa8c1762d2..a781669456 100644
--- a/code/modules/awaymissions/gateway.dm
+++ b/code/modules/awaymissions/gateway.dm
@@ -38,7 +38,7 @@ GLOBAL_DATUM(gateway_station, /obj/machinery/gateway/centerstation)
/obj/machinery/gateway/centerstation/Initialize(mapload)
if(GLOB.gateway_station)
- warning("[src] at [x],[y],[z] appears to be an additional station-gateway")
+ WARNING("[src] at [x],[y],[z] appears to be an additional station-gateway")
else
GLOB.gateway_station = src
@@ -256,7 +256,7 @@ GLOBAL_DATUM(gateway_away, /obj/machinery/gateway/centeraway)
/obj/machinery/gateway/centeraway/Initialize(mapload)
if(GLOB.gateway_away)
- warning("[src] at [x],[y],[z] appears to be an additional away-gateway")
+ WARNING("[src] at [x],[y],[z] appears to be an additional away-gateway")
else
GLOB.gateway_away = src
diff --git a/code/modules/awaymissions/gateway_vr.dm b/code/modules/awaymissions/gateway_vr.dm
index 816d2c06e8..5840afb189 100644
--- a/code/modules/awaymissions/gateway_vr.dm
+++ b/code/modules/awaymissions/gateway_vr.dm
@@ -56,7 +56,7 @@
destination = CL
if(!destination)
- warning("A gateway is trying to spawn it's mcguffin but there are no mapped in spawner landmarks")
+ WARNING("A gateway is trying to spawn it's mcguffin but there are no mapped in spawner landmarks")
destination = get_turf(src)
key = new mcguffin_type(destination)
diff --git a/code/modules/awaymissions/overmap_renamer/overmap_renamer.dm b/code/modules/awaymissions/overmap_renamer/overmap_renamer.dm
index 1fae96eea5..13e205f4c0 100644
--- a/code/modules/awaymissions/overmap_renamer/overmap_renamer.dm
+++ b/code/modules/awaymissions/overmap_renamer/overmap_renamer.dm
@@ -7,7 +7,7 @@ possible_descriptors are populated by subtypes of /obj/effect/landmark/overmap_r
*/
/obj/effect/overmap/visitable/proc/modify_descriptors()
if(!possible_descriptors || !islist(possible_descriptors) || possible_descriptors == list() || !length(possible_descriptors))
- error("List of possible descriptors for [name] was empty!")
+ log_mapping("## ERROR List of possible descriptors for [name] was empty!")
return
var/list/chosen_descriptor = pick(possible_descriptors)
@@ -22,7 +22,7 @@ possible_descriptors are populated by subtypes of /obj/effect/landmark/overmap_r
// testing("Defaulting to default!") //Uncomment when adding a new landmark to confirm it works OK, but recomment before commiting
return
if(breakWhile > 10 || length(possible_descriptors) < 1)
- error("No valid descriptors could be found for [name]!") //Checking default separately for sake of error messages
+ log_mapping("## ERROR No valid descriptors could be found for [name]!") //Checking default separately for sake of error messages
return
//Using real_name to ensure get_scan_data() does not override the renamed code
@@ -48,9 +48,9 @@ possible_descriptors are populated by subtypes of /obj/effect/landmark/overmap_r
/obj/effect/landmark/overmap_renamer/Initialize(mapload)
// testing("Loading renamer landmark: [name]") //Uncomment when adding a new POI/Landmark for testing aid.
if(LAZYLEN(descriptors) != 3)
- error("POI [name] renamer landmark is invalid! Make sure its descriptors var is a list of 3 elements!")
+ log_mapping("## ERROR POI [name] renamer landmark is invalid! Make sure its descriptors var is a list of 3 elements!")
return
if(!istext(descriptors[1]) || !istext(descriptors[2]) || !istext(descriptors[3]))
- error("POI [name] renamer landmark is invalid! One of the elements is NOT a string!")
+ log_mapping("## ERROR POI [name] renamer landmark is invalid! One of the elements is NOT a string!")
return
. = ..()
diff --git a/code/modules/awaymissions/zlevel.dm b/code/modules/awaymissions/zlevel.dm
index 75e76c2923..3468ba601e 100644
--- a/code/modules/awaymissions/zlevel.dm
+++ b/code/modules/awaymissions/zlevel.dm
@@ -7,7 +7,7 @@
var/list/potentialRandomZlevels = list()
admin_notice(span_red(span_bold(" Searching for away missions...")), R_DEBUG)
- var/list/Lines = file2list("maps/RandomZLevels/fileList.txt")
+ var/list/Lines = world.file2list("maps/RandomZLevels/fileList.txt")
if(!Lines.len) return
for (var/t in Lines)
if (!t)
@@ -41,12 +41,12 @@
admin_notice(span_red(span_bold("Loading away mission...")), R_DEBUG)
var/map = pick(potentialRandomZlevels)
- to_world_log("Away mission picked: [map]") //VOREStation Add for debugging
+ log_mapping("Away mission picked: [map]") //VOREStation Add for debugging
var/file = file(map)
if(isfile(file))
var/datum/map_template/template = new(file, "away mission")
template.load_new_z()
- to_world_log("away mission loaded: [map]")
+ log_mapping("away mission loaded: [map]")
/* VOREStation Removal - We do this in the special landmark init instead.
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
if (L.name != "awaystart")
diff --git a/code/modules/blob2/overmind/overmind.dm b/code/modules/blob2/overmind/overmind.dm
index 7c9c67d65d..930c99a439 100644
--- a/code/modules/blob2/overmind/overmind.dm
+++ b/code/modules/blob2/overmind/overmind.dm
@@ -162,5 +162,5 @@ var/list/overminds = list()
if(dst <= world.view)
O.hear_talk(src, message_pieces, "conveys")
- log_say(message, src)
+ log_talk(message, LOG_SAY)
return 1
diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm
index d2d95c9ff3..f60bd85b71 100644
--- a/code/modules/client/client defines.dm
+++ b/code/modules/client/client defines.dm
@@ -86,6 +86,9 @@
///Used for limiting the rate of clicks sends by the client to avoid abuse
var/list/clicklimiter
+ ///these persist between logins/logouts during the same round.
+ var/datum/persistent_client/persistent_client
+
////////////////////////////////////
//things that require the database//
////////////////////////////////////
diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm
index 4e812baa49..cb1d27791a 100644
--- a/code/modules/client/client procs.dm
+++ b/code/modules/client/client procs.dm
@@ -1,6 +1,11 @@
////////////
//SECURITY//
////////////
+
+GLOBAL_LIST_INIT(blacklisted_builds, list(
+ "1622" = "Bug breaking rendering can lead to wallhacks.",
+ ))
+
#define UPLOAD_LIMIT 10485760 //Restricts client uploads to the server to 10MB //Boosted this thing. What's the worst that can happen?
#define MIN_CLIENT_VERSION 0 //Just an ambiguously low version for now, I don't want to suddenly stop people playing.
//I would just like the code ready should it ever need to be used.
@@ -68,7 +73,8 @@
if (minute != topiclimiter[ADMINSWARNED_AT]) //only one admin message per-minute. (if they spam the admins can just boot/ban them)
topiclimiter[ADMINSWARNED_AT] = minute
msg += " Administrators have been informed."
- log_and_message_admins("[key_name(src)] Has hit the per-minute topic limit of [mtl] topic calls in a given game minute", src)
+ log_game("[key_name(src)] Has hit the per-minute topic limit of [mtl] topic calls in a given game minute")
+ message_admins("[ADMIN_LOOKUPFLW(usr)] [ADMIN_KICK(usr)] Has hit the per-minute topic limit of [mtl] topic calls in a given game minute")
to_chat(src, span_danger("[msg]"))
return
@@ -87,7 +93,7 @@
//search the href for script injection
if( findtext(href,"