From f432c68fc24254d75a513306d92a5f5a6191c863 Mon Sep 17 00:00:00 2001 From: spookerton Date: Mon, 31 Oct 2022 08:50:34 +0000 Subject: [PATCH 1/3] mix of old bay, vore, and tg io macros -> baylike --- code/__defines/misc.dm | 4 -- code/_helpers/game.dm | 4 +- code/_macros.dm | 37 +++++++++++-------- code/controllers/globals.dm | 4 +- code/controllers/master.dm | 30 +++++++-------- code/controllers/subsystem.dm | 2 +- code/controllers/subsystems/chat.dm | 4 +- code/controllers/subsystems/timer.dm | 10 ++--- code/datums/ghost_query.dm | 2 +- code/datums/looping_sounds/_looping_sound.dm | 2 +- code/game/world.dm | 2 +- .../view_variables/mass_edit_variables.dm | 2 +- .../admin/view_variables/modify_variables.dm | 14 +++---- .../admin/view_variables/topic_list.dm | 10 ++--- code/modules/antagonist/antagonist_create.dm | 2 +- code/modules/asset_cache/asset_cache_item.dm | 2 +- code/modules/client/client procs.dm | 2 +- .../preference_setup/loadout/loadout.dm | 10 ++--- .../preference_setup/occupation/occupation.dm | 2 +- .../event2/events/command/raise_funds.dm | 2 +- code/modules/mob/dead/observer/observer.dm | 2 +- code/modules/mob/living/silicon/laws.dm | 2 +- .../file_system/news_article.dm | 4 +- .../persistence/datum/persistence_datum.dm | 2 +- code/modules/vchat/vchat_client.dm | 4 +- code/modules/vchat/vchat_db.dm | 8 ++-- 26 files changed, 85 insertions(+), 84 deletions(-) diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index a7c9b18504..3e18e392a1 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -307,10 +307,6 @@ var/global/list/##LIST_NAME = list();\ //Various stuff used in Persistence -#define send_output(target, msg, control) target << output(msg, control) - -#define send_link(target, url) target << link(url) - #define SPAN_ITALIC(X) "[X]" #define SPAN_NOTICE(X) "[X]" diff --git a/code/_helpers/game.dm b/code/_helpers/game.dm index 50b415809c..bfcee8b01a 100644 --- a/code/_helpers/game.dm +++ b/code/_helpers/game.dm @@ -653,7 +653,7 @@ if(sight_check && !isInSight(A, O)) continue L |= M - //log_world("[recursion_limit] = [M] - [get_turf(M)] - ([M.x], [M.y], [M.z])") + //to_world_log("[recursion_limit] = [M] - [get_turf(M)] - ([M.x], [M.y], [M.z])") else if(include_radio && istype(A, /obj/item/radio)) if(sight_check && !isInSight(A, O)) @@ -683,7 +683,7 @@ var/mob/M = A if(M.client || include_clientless) hear += M - //log_world("Start = [M] - [get_turf(M)] - ([M.x], [M.y], [M.z])") + //to_world_log("Start = [M] - [get_turf(M)] - ([M.x], [M.y], [M.z])") else if(istype(A, /obj/item/radio)) hear += A diff --git a/code/_macros.dm b/code/_macros.dm index b02af88ae8..768ab886e2 100644 --- a/code/_macros.dm +++ b/code/_macros.dm @@ -12,23 +12,28 @@ // #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. -// Didn't port SEND_TEXT() since to_chat() appears to serve the same purpose. -#define DIRECT_OUTPUT(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 + +// General I/O semantics +#define to_target(target, payload) target << (payload) +#define from_target(target, receiver) target >> (receiver) + + +// Common use patterns +#define to_chat __to_vchat +#define to_world(message) to_chat(world, message) +#define to_world_log(message) to_target(world.log, message) +#define legacy_chat(target, message) to_target(target, message) +#define sound_to(target, sound) to_target(target, sound) +#define image_to(target, image) to_target(target, image) +#define show_browser(target, content, title) to_target(target, browse(content, title)) +#define close_browser(target, title) to_target(target, browse(null, title)) +#define send_rsc(target, content, title) to_target(target, browse_rsc(content, title)) +#define send_link(target, url) to_target(target, link(url)) +#define send_output(target, msg, control) to_target(target, output(msg, control)) +#define to_save(handle, value) to_target(handle, value) +#define from_save(handle, target_var) from_target(handle, target_var) + #define CanInteract(user, state) (CanUseTopic(user, state) == STATUS_INTERACTIVE) diff --git a/code/controllers/globals.dm b/code/controllers/globals.dm index 7e088b6449..9fcccfb5b7 100644 --- a/code/controllers/globals.dm +++ b/code/controllers/globals.dm @@ -15,7 +15,7 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars) var/datum/controller/exclude_these = new gvars_datum_in_built_vars = exclude_these.vars + list("gvars_datum_protected_varlist", "gvars_datum_in_built_vars", "gvars_datum_init_order") - log_world("[vars.len - gvars_datum_in_built_vars.len] global variables") + to_world_log("[vars.len - gvars_datum_in_built_vars.len] global variables") Initialize(exclude_these) @@ -61,7 +61,7 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars) for(var/I in global_procs) expected_global_procs -= replacetext("[I]", "InitGlobal", "") var/english_missing = expected_global_procs.Join(", ") - log_world("Missing procs: [english_missing]") + to_world_log("Missing procs: [english_missing]") for(var/I in global_procs) var/start_tick = world.time call(src, I)() diff --git a/code/controllers/master.dm b/code/controllers/master.dm index 8110b78c8f..4c2033b1fd 100644 --- a/code/controllers/master.dm +++ b/code/controllers/master.dm @@ -86,9 +86,9 @@ GLOBAL_REAL(Master, /datum/controller/master) = new sortTim(subsystems, /proc/cmp_subsystem_init) reverseRange(subsystems) for(var/datum/controller/subsystem/ss in subsystems) - log_world("Shutting down [ss.name] subsystem...") + to_world_log("Shutting down [ss.name] subsystem...") ss.Shutdown() - log_world("Shutdown complete") + to_world_log("Shutdown complete") // Returns 1 if we created a new mc, 0 if we couldn't due to a recent restart, // -1 if we encountered a runtime trying to recreate it @@ -123,7 +123,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new msg += "\t [varname] = [D]([D.type])\n" else msg += "\t [varname] = [varval]\n" - log_world(msg) + to_world_log(msg) var/datum/controller/subsystem/BadBoy = Master.last_type_processed var/FireHim = FALSE @@ -140,7 +140,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new if(msg) log_game(msg) message_admins("[msg]") - log_world(msg) + to_world_log(msg) if (istype(Master.subsystems)) if(FireHim) @@ -183,7 +183,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new var/msg = "MC: Initializations complete within [time] second[time == 1 ? "" : "s"]!" to_chat(world, "[msg]") - log_world(msg) + to_world_log(msg) if (!current_runlevel) SetRunLevel(RUNLEVEL_LOBBY) @@ -341,7 +341,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new if (CheckQueue(subsystems_to_check) <= 0) if (!SoftReset(tickersubsystems, runlevel_sorted_subsystems)) - log_world("MC: SoftReset() failed, crashing") + to_world_log("MC: SoftReset() failed, crashing") return if (!error_level) iteration++ @@ -353,7 +353,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new if (queue_head) if (RunQueue() <= 0) if (!SoftReset(tickersubsystems, runlevel_sorted_subsystems)) - log_world("MC: SoftReset() failed, crashing") + to_world_log("MC: SoftReset() failed, crashing") return if (!error_level) iteration++ @@ -533,9 +533,9 @@ GLOBAL_REAL(Master, /datum/controller/master) = new // called if any mc's queue procs runtime or exit improperly. /datum/controller/master/proc/SoftReset(list/ticker_SS, list/runlevel_SS) . = 0 - log_world("MC: SoftReset called, resetting MC queue state.") + to_world_log("MC: SoftReset called, resetting MC queue state.") if (!istype(subsystems) || !istype(ticker_SS) || !istype(runlevel_SS)) - log_world("MC: SoftReset: Bad list contents: '[subsystems]' '[ticker_SS]' '[runlevel_SS]'") + to_world_log("MC: SoftReset: Bad list contents: '[subsystems]' '[ticker_SS]' '[runlevel_SS]'") return var/subsystemstocheck = subsystems + ticker_SS for(var/I in runlevel_SS) @@ -549,26 +549,26 @@ GLOBAL_REAL(Master, /datum/controller/master) = new ticker_SS -= list(SS) for(var/I in runlevel_SS) I -= list(SS) - log_world("MC: SoftReset: Found bad entry in subsystem list, '[SS]'") + to_world_log("MC: SoftReset: Found bad entry in subsystem list, '[SS]'") continue if (SS.queue_next && !istype(SS.queue_next)) - log_world("MC: SoftReset: Found bad data in subsystem queue, queue_next = '[SS.queue_next]'") + to_world_log("MC: SoftReset: Found bad data in subsystem queue, queue_next = '[SS.queue_next]'") SS.queue_next = null if (SS.queue_prev && !istype(SS.queue_prev)) - log_world("MC: SoftReset: Found bad data in subsystem queue, queue_prev = '[SS.queue_prev]'") + to_world_log("MC: SoftReset: Found bad data in subsystem queue, queue_prev = '[SS.queue_prev]'") SS.queue_prev = null SS.queued_priority = 0 SS.queued_time = 0 SS.state = SS_IDLE if (queue_head && !istype(queue_head)) - log_world("MC: SoftReset: Found bad data in subsystem queue, queue_head = '[queue_head]'") + to_world_log("MC: SoftReset: Found bad data in subsystem queue, queue_head = '[queue_head]'") queue_head = null if (queue_tail && !istype(queue_tail)) - log_world("MC: SoftReset: Found bad data in subsystem queue, queue_tail = '[queue_tail]'") + to_world_log("MC: SoftReset: Found bad data in subsystem queue, queue_tail = '[queue_tail]'") queue_tail = null queue_priority_count = 0 queue_priority_count_bg = 0 - log_world("MC: SoftReset: Finished.") + to_world_log("MC: SoftReset: Finished.") . = 1 diff --git a/code/controllers/subsystem.dm b/code/controllers/subsystem.dm index 425b111565..1bfdc93eba 100644 --- a/code/controllers/subsystem.dm +++ b/code/controllers/subsystem.dm @@ -48,7 +48,7 @@ var/time = (REALTIMEOFDAY - timeofday) / 10 var/msg = "Initialized [name] subsystem within [time] second[time == 1 ? "" : "s"]!" to_chat(world, "[msg]") - log_world(msg) + to_world_log(msg) return time diff --git a/code/controllers/subsystems/chat.dm b/code/controllers/subsystems/chat.dm index f14c14a54a..60fe487fd5 100644 --- a/code/controllers/subsystems/chat.dm +++ b/code/controllers/subsystems/chat.dm @@ -55,7 +55,7 @@ SUBSYSTEM_DEF(chat) if(!C) continue // No client? No care. else if(C.chatOutput.broken) - DIRECT_OUTPUT(C, original_message) + to_target(C, original_message) continue else if(!C.chatOutput.loaded) continue // If not loaded yet, do nothing and history-sending on load will get it. @@ -68,7 +68,7 @@ SUBSYSTEM_DEF(chat) if(!C) return // No client? No care. else if(C.chatOutput.broken) - DIRECT_OUTPUT(C, original_message) + to_target(C, original_message) return else if(!C.chatOutput.loaded) return // If not loaded yet, do nothing and history-sending on load will get it. diff --git a/code/controllers/subsystems/timer.dm b/code/controllers/subsystems/timer.dm index 8ac3d243fb..7b4346115b 100644 --- a/code/controllers/subsystems/timer.dm +++ b/code/controllers/subsystems/timer.dm @@ -52,24 +52,24 @@ SUBSYSTEM_DEF(timer) if(bucket_auto_reset) bucket_resolution = 0 - log_world("Timer bucket reset. world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]") + to_world_log("Timer bucket reset. world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]") for (var/i in 1 to length(bucket_list)) var/datum/timedevent/bucket_head = bucket_list[i] if (!bucket_head) continue - log_world("Active timers at index [i]:") + to_world_log("Active timers at index [i]:") var/datum/timedevent/bucket_node = bucket_head var/anti_loop_check = 1000 do - log_world(get_timer_debug_string(bucket_node)) + to_world_log(get_timer_debug_string(bucket_node)) bucket_node = bucket_node.next anti_loop_check-- while(bucket_node && bucket_node != bucket_head && anti_loop_check) - log_world("Active timers in the second_queue queue:") + to_world_log("Active timers in the second_queue queue:") for(var/I in second_queue) - log_world(get_timer_debug_string(I)) + to_world_log(get_timer_debug_string(I)) var/cut_start_index = 1 var/next_clienttime_timer_index = 0 diff --git a/code/datums/ghost_query.dm b/code/datums/ghost_query.dm index 9d190911e0..4293284c52 100644 --- a/code/datums/ghost_query.dm +++ b/code/datums/ghost_query.dm @@ -45,7 +45,7 @@ return window_flash(C) if(query_sound) - SEND_SOUND(C, sound(query_sound)) + sound_to(C, sound(query_sound)) var/response = alert(C, question, "[role_name] request", "Yes", "No", "Never for this round") if(response == "Yes") response = alert(C, "Are you sure you want to play as a [role_name]?", "[role_name] request", "Yes", "No") // Protection from a misclick. diff --git a/code/datums/looping_sounds/_looping_sound.dm b/code/datums/looping_sounds/_looping_sound.dm index b16f9ddc35..5ffbc47f11 100644 --- a/code/datums/looping_sounds/_looping_sound.dm +++ b/code/datums/looping_sounds/_looping_sound.dm @@ -89,7 +89,7 @@ var/mob/M = thing if(!M.is_preference_enabled(pref_check)) continue - SEND_SOUND(thing, S) + sound_to(thing, S) else playsound(thing, S, volume, vary, extra_range, ignore_walls = !opacity_check, preference = pref_check) diff --git a/code/game/world.dm b/code/game/world.dm index dd7e5ba965..03894da14f 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -398,7 +398,7 @@ var/global/world_topic_spam_protect_time = world.timeofday if(config.server) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite C << link("byond://[config.server]") - log_world("World rebooted at [time_stamp()]") + to_world_log("World rebooted at [time_stamp()]") ..() /hook/startup/proc/loadMode() diff --git a/code/modules/admin/view_variables/mass_edit_variables.dm b/code/modules/admin/view_variables/mass_edit_variables.dm index 7374759e8c..f20c6fcefd 100644 --- a/code/modules/admin/view_variables/mass_edit_variables.dm +++ b/code/modules/admin/view_variables/mass_edit_variables.dm @@ -193,7 +193,7 @@ if (rejected) to_chat(src, "[rejected] out of [count] objects rejected your edit") - log_world("### MassVarEdit by [src]: [O.type] (A/R [accepted]/[rejected]) [variable]=[html_encode("[O.vars[variable]]")]([list2params(value)])") + to_world_log("### MassVarEdit by [src]: [O.type] (A/R [accepted]/[rejected]) [variable]=[html_encode("[O.vars[variable]]")]([list2params(value)])") log_admin("[key_name(src)] mass modified [original_name]'s [variable] to [O.vars[variable]] ([accepted] objects modified)") message_admins("[key_name_admin(src)] mass modified [original_name]'s [variable] to [O.vars[variable]] ([accepted] objects modified)") diff --git a/code/modules/admin/view_variables/modify_variables.dm b/code/modules/admin/view_variables/modify_variables.dm index 593773999d..d6b3189c7e 100644 --- a/code/modules/admin/view_variables/modify_variables.dm +++ b/code/modules/admin/view_variables/modify_variables.dm @@ -105,7 +105,7 @@ GLOBAL_PROTECT(VVpixelmovement) if (O.vv_edit_var(objectvar, L) == FALSE) to_chat(src, "Your edit was rejected by the object.") return - log_world("### ListVarEdit by [src]: [(O ? O.type : "/list")] [objectvar]: ADDED=[var_value]") + to_world_log("### ListVarEdit by [src]: [(O ? O.type : "/list")] [objectvar]: ADDED=[var_value]") log_admin("[key_name(src)] modified [original_name]'s [objectvar]: ADDED=[var_value]") message_admins("[key_name_admin(src)] modified [original_name]'s [objectvar]: ADDED=[var_value]") @@ -148,7 +148,7 @@ GLOBAL_PROTECT(VVpixelmovement) if (!O.vv_edit_var(objectvar, L)) to_chat(src, "Your edit was rejected by the object.") return - log_world("### ListVarEdit by [src]: [O.type] [objectvar]: CLEAR NULLS") + to_world_log("### ListVarEdit by [src]: [O.type] [objectvar]: CLEAR NULLS") log_admin("[key_name(src)] modified [original_name]'s [objectvar]: CLEAR NULLS") message_admins("[key_name_admin(src)] modified [original_name]'s list [objectvar]: CLEAR NULLS") return @@ -158,7 +158,7 @@ GLOBAL_PROTECT(VVpixelmovement) if (!O.vv_edit_var(objectvar, L)) to_chat(src, "Your edit was rejected by the object.") return - log_world("### ListVarEdit by [src]: [O.type] [objectvar]: CLEAR DUPES") + to_world_log("### ListVarEdit by [src]: [O.type] [objectvar]: CLEAR DUPES") log_admin("[key_name(src)] modified [original_name]'s [objectvar]: CLEAR DUPES") message_admins("[key_name_admin(src)] modified [original_name]'s list [objectvar]: CLEAR DUPES") return @@ -168,7 +168,7 @@ GLOBAL_PROTECT(VVpixelmovement) if (!O.vv_edit_var(objectvar, L)) to_chat(src, "Your edit was rejected by the object.") return - log_world("### ListVarEdit by [src]: [O.type] [objectvar]: SHUFFLE") + to_world_log("### ListVarEdit by [src]: [O.type] [objectvar]: SHUFFLE") log_admin("[key_name(src)] modified [original_name]'s [objectvar]: SHUFFLE") message_admins("[key_name_admin(src)] modified [original_name]'s list [objectvar]: SHUFFLE") return @@ -251,7 +251,7 @@ GLOBAL_PROTECT(VVpixelmovement) if (O.vv_edit_var(objectvar, L)) to_chat(src, "Your edit was rejected by the object.") return - log_world("### ListVarEdit by [src]: [O.type] [objectvar]: REMOVED=[html_encode("[original_var]")]") + to_world_log("### ListVarEdit by [src]: [O.type] [objectvar]: REMOVED=[html_encode("[original_var]")]") log_admin("[key_name(src)] modified [original_name]'s [objectvar]: REMOVED=[original_var]") message_admins("[key_name_admin(src)] modified [original_name]'s [objectvar]: REMOVED=[original_var]") return @@ -272,7 +272,7 @@ GLOBAL_PROTECT(VVpixelmovement) if (O.vv_edit_var(objectvar, L) == FALSE) to_chat(src, "Your edit was rejected by the object.") return - log_world("### ListVarEdit by [src]: [(O ? O.type : "/list")] [objectvar]: [original_var]=[new_var]") + to_world_log("### ListVarEdit by [src]: [(O ? O.type : "/list")] [objectvar]: [original_var]=[new_var]") log_admin("[key_name(src)] modified [original_name]'s [objectvar]: [original_var]=[new_var]") message_admins("[key_name_admin(src)] modified [original_name]'s varlist [objectvar]: [original_var]=[new_var]") @@ -389,7 +389,7 @@ GLOBAL_PROTECT(VVpixelmovement) to_chat(src, "Your edit was rejected by the object.") return vv_update_display(O, "varedited", VV_MSG_EDITED) - log_world("### VarEdit by [key_name(src)]: [O.type] [variable]=[var_value] => [var_new]") + to_world_log("### VarEdit by [key_name(src)]: [O.type] [variable]=[var_value] => [var_new]") log_admin("[key_name(src)] modified [original_name]'s [variable] from [html_encode("[var_value]")] to [html_encode("[var_new]")]") var/msg = "[key_name_admin(src)] modified [original_name]'s [variable] from [var_value] to [var_new]" message_admins(msg) diff --git a/code/modules/admin/view_variables/topic_list.dm b/code/modules/admin/view_variables/topic_list.dm index c76023ec1f..150deeb456 100644 --- a/code/modules/admin/view_variables/topic_list.dm +++ b/code/modules/admin/view_variables/topic_list.dm @@ -14,19 +14,19 @@ if (prompt != "Yes") return target.Cut(target_index, target_index+1) - log_world("### ListVarEdit by [src]: /list's contents: REMOVED=[html_encode("[variable]")]") + to_world_log("### ListVarEdit by [src]: /list's contents: REMOVED=[html_encode("[variable]")]") log_admin("[key_name(src)] modified list's contents: REMOVED=[variable]") message_admins("[key_name_admin(src)] modified list's contents: REMOVED=[variable]") if(href_list[VV_HK_LIST_ADD]) mod_list_add(target, null, "list", "contents") if(href_list[VV_HK_LIST_ERASE_DUPES]) uniqueList_inplace(target) - log_world("### ListVarEdit by [src]: /list contents: CLEAR DUPES") + to_world_log("### ListVarEdit by [src]: /list contents: CLEAR DUPES") log_admin("[key_name(src)] modified list's contents: CLEAR DUPES") message_admins("[key_name_admin(src)] modified list's contents: CLEAR DUPES") if(href_list[VV_HK_LIST_ERASE_NULLS]) listclearnulls(target) - log_world("### ListVarEdit by [src]: /list contents: CLEAR NULLS") + to_world_log("### ListVarEdit by [src]: /list contents: CLEAR NULLS") log_admin("[key_name(src)] modified list's contents: CLEAR NULLS") message_admins("[key_name_admin(src)] modified list's contents: CLEAR NULLS") if(href_list[VV_HK_LIST_SET_LENGTH]) @@ -34,11 +34,11 @@ if (value["class"] != VV_NUM || value["value"] > max(5000, target.len)) //safety - would rather someone not put an extra 0 and erase the server's memory lmao. return target.len = value["value"] - log_world("### ListVarEdit by [src]: /list len: [target.len]") + to_world_log("### ListVarEdit by [src]: /list len: [target.len]") log_admin("[key_name(src)] modified list's len: [target.len]") message_admins("[key_name_admin(src)] modified list's len: [target.len]") if(href_list[VV_HK_LIST_SHUFFLE]) shuffle_inplace(target) - log_world("### ListVarEdit by [src]: /list contents: SHUFFLE") + to_world_log("### ListVarEdit by [src]: /list contents: SHUFFLE") log_admin("[key_name(src)] modified list's contents: SHUFFLE") message_admins("[key_name_admin(src)] modified list's contents: SHUFFLE") diff --git a/code/modules/antagonist/antagonist_create.dm b/code/modules/antagonist/antagonist_create.dm index 54d04e3bbd..ae4dc1a671 100644 --- a/code/modules/antagonist/antagonist_create.dm +++ b/code/modules/antagonist/antagonist_create.dm @@ -101,7 +101,7 @@ /datum/antagonist/proc/greet(var/datum/mind/player) // Makes it harder to miss if you're alt-tabbed or not paying attention. if(antag_sound) - SEND_SOUND(player.current, sound(antag_sound)) + sound_to(player.current, sound(antag_sound)) window_flash(player.current.client) // Basic intro text. diff --git a/code/modules/asset_cache/asset_cache_item.dm b/code/modules/asset_cache/asset_cache_item.dm index 5f02e561c6..8662d1828f 100644 --- a/code/modules/asset_cache/asset_cache_item.dm +++ b/code/modules/asset_cache/asset_cache_item.dm @@ -17,7 +17,7 @@ md5 = md5(fcopy_rsc(file)) if (!md5) CRASH("invalid asset sent to asset cache") - log_world("asset cache unexpected success of second fcopy_rsc") + to_world_log("asset cache unexpected success of second fcopy_rsc") src.name = name url = name resource = file diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 01cb03446c..1120243c4e 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -393,7 +393,7 @@ /client/proc/findJoinDate() var/list/http = world.Export("http://byond.com/members/[ckey]?format=text") if(!http) - log_world("Failed to connect to byond age check for [ckey]") + to_world_log("Failed to connect to byond age check for [ckey]") return var/F = file2text(http["CONTENT"]) if(F) diff --git a/code/modules/client/preference_setup/loadout/loadout.dm b/code/modules/client/preference_setup/loadout/loadout.dm index 5e2b8fff5c..095c8f58a8 100644 --- a/code/modules/client/preference_setup/loadout/loadout.dm +++ b/code/modules/client/preference_setup/loadout/loadout.dm @@ -47,18 +47,18 @@ var/global/list/gear_datums = list() var/current_tab = "General" /datum/category_item/player_setup_item/loadout/load_character(var/savefile/S) - from_file(S["gear_list"], pref.gear_list) - from_file(S["gear_slot"], pref.gear_slot) + from_save(S["gear_list"], pref.gear_list) + from_save(S["gear_slot"], pref.gear_slot) if(pref.gear_list!=null && pref.gear_slot!=null) pref.gear = pref.gear_list["[pref.gear_slot]"] else - from_file(S["gear"], pref.gear) + from_save(S["gear"], pref.gear) pref.gear_slot = 1 /datum/category_item/player_setup_item/loadout/save_character(var/savefile/S) pref.gear_list["[pref.gear_slot]"] = pref.gear - to_file(S["gear_list"], pref.gear_list) - to_file(S["gear_slot"], pref.gear_slot) + to_save(S["gear_list"], pref.gear_list) + to_save(S["gear_slot"], pref.gear_slot) /datum/category_item/player_setup_item/loadout/proc/valid_gear_choices(var/max_cost) . = list() diff --git a/code/modules/client/preference_setup/occupation/occupation.dm b/code/modules/client/preference_setup/occupation/occupation.dm index 32c6379576..ead0d495b3 100644 --- a/code/modules/client/preference_setup/occupation/occupation.dm +++ b/code/modules/client/preference_setup/occupation/occupation.dm @@ -256,7 +256,7 @@ else if(href_list["job_wiki"]) var/rank = href_list["job_wiki"] - open_link(user,"[config.wikiurl][rank]") + send_link(user,"[config.wikiurl][rank]") return ..() diff --git a/code/modules/gamemaster/event2/events/command/raise_funds.dm b/code/modules/gamemaster/event2/events/command/raise_funds.dm index 1e20cdce11..4e7e0d2264 100644 --- a/code/modules/gamemaster/event2/events/command/raise_funds.dm +++ b/code/modules/gamemaster/event2/events/command/raise_funds.dm @@ -94,4 +94,4 @@ /datum/event2/event/raise_funds/proc/send_command_report(title, message) post_comm_message(title, message) to_world(span("danger", "New [using_map.company_name] Update available at all communication consoles.")) - SEND_SOUND(world, 'sound/AI/commandreport.ogg') + sound_to(world, 'sound/AI/commandreport.ogg') diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index d443b6a422..a33bf7a24b 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -962,7 +962,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp throw_alert("\ref[source]_notify_revive", /obj/screen/alert/notify_cloning, new_master = source) to_chat(src, "(Click to re-enter)") if(sound) - SEND_SOUND(src, sound(sound)) + sound_to(src, sound(sound)) /mob/observer/dead/verb/respawn() set name = "Respawn" diff --git a/code/modules/mob/living/silicon/laws.dm b/code/modules/mob/living/silicon/laws.dm index 41b0c5d151..f4b7dbeffd 100644 --- a/code/modules/mob/living/silicon/laws.dm +++ b/code/modules/mob/living/silicon/laws.dm @@ -81,7 +81,7 @@ if((last_law_notification + 1 SECOND) > world.time) return last_law_notification = world.time - SEND_SOUND(src, 'sound/machines/defib_success.ogg') + sound_to(src, 'sound/machines/defib_success.ogg') window_flash(client) to_chat(src, span("warning", message)) diff --git a/code/modules/modular_computers/file_system/news_article.dm b/code/modules/modular_computers/file_system/news_article.dm index dffb978383..51ae11923f 100644 --- a/code/modules/modular_computers/file_system/news_article.dm +++ b/code/modules/modular_computers/file_system/news_article.dm @@ -9,9 +9,9 @@ var/archived // Set to 1 for older stuff var/cover //filename of cover. -/datum/computer_file/data/news_article/New(var/load_from_file = 0) +/datum/computer_file/data/news_article/New(var/load_file = 0) ..() - if(server_file_path && load_from_file) + if(server_file_path && load_file) stored_data = file2text(server_file_path) calculate_size() diff --git a/code/modules/persistence/datum/persistence_datum.dm b/code/modules/persistence/datum/persistence_datum.dm index 563291b922..9ff1598c7c 100644 --- a/code/modules/persistence/datum/persistence_datum.dm +++ b/code/modules/persistence/datum/persistence_datum.dm @@ -112,7 +112,7 @@ to_store[++to_store.len] = CompileEntry(thing) if(to_store.len) - to_file(file(filename), json_encode(to_store)) + text2file(json_encode(to_store), filename) /datum/persistent/proc/RemoveValue(var/atom/value) qdel(value) diff --git a/code/modules/vchat/vchat_client.dm b/code/modules/vchat/vchat_client.dm index 86493a491e..300af3e712 100644 --- a/code/modules/vchat/vchat_client.dm +++ b/code/modules/vchat/vchat_client.dm @@ -11,7 +11,7 @@ GLOBAL_LIST_INIT(vchatFiles, list( )) // The to_chat() macro calls this proc -/proc/__to_chat(var/target, var/message) +/proc/__to_vchat(var/target, var/message) // First do logging in database if(isclient(target)) var/client/C = target @@ -369,7 +369,7 @@ var/global/to_chat_src if(!C) return // No client? No care. else if(C.chatOutput.broken) - DIRECT_OUTPUT(C, original_message) + to_target(C, original_message) return else if(!C.chatOutput.loaded) return // If not loaded yet, do nothing and history-sending on load will get it. diff --git a/code/modules/vchat/vchat_db.dm b/code/modules/vchat/vchat_db.dm index 41b5d86822..f92d1c37ea 100644 --- a/code/modules/vchat/vchat_db.dm +++ b/code/modules/vchat/vchat_db.dm @@ -24,7 +24,7 @@ GLOBAL_DATUM(vchatdb, /database) //For INSERT/CREATE/DELETE, etc that return a RowsAffected. /proc/vchat_exec_update(var/query) if(!check_vchat()) - log_world("There's no vchat database open but you tried to query it with: [query]") + to_world_log("There's no vchat database open but you tried to query it with: [query]") return FALSE //Solidify our query @@ -35,7 +35,7 @@ GLOBAL_DATUM(vchatdb, /database) //Handle errors if(q.Error()) - log_world("Query \"[islist(query)?query[1]:query]\" ended in error [q.ErrorMsg()]") + to_world_log("Query \"[islist(query)?query[1]:query]\" ended in error [q.ErrorMsg()]") return FALSE return q.RowsAffected() @@ -43,7 +43,7 @@ GLOBAL_DATUM(vchatdb, /database) //For SELECT, that return results. /proc/vchat_exec_query(var/query) if(!check_vchat()) - log_world("There's no vchat database open but you tried to query it!") + to_world_log("There's no vchat database open but you tried to query it!") return FALSE //Solidify our query @@ -54,7 +54,7 @@ GLOBAL_DATUM(vchatdb, /database) //Handle errors if(q.Error()) - log_world("Query \"[islist(query)?query[1]:query]\" ended in error [q.ErrorMsg()]") + to_world_log("Query \"[islist(query)?query[1]:query]\" ended in error [q.ErrorMsg()]") return FALSE //Return any results From cd25cb4b3a6b1da490b6aca04c79e637727339f0 Mon Sep 17 00:00:00 2001 From: spookerton Date: Mon, 31 Oct 2022 08:57:02 +0000 Subject: [PATCH 2/3] correct mixed case QDEL_NULL/qdel_null + behavior --- code/__defines/qdel.dm | 2 +- code/_macros.dm | 2 -- code/_onclick/hud/hud.dm | 2 +- code/_onclick/hud/screen_objects.dm | 12 ++++++------ code/game/machinery/teleporter.dm | 2 +- code/game/objects/effects/mines.dm | 2 +- code/game/objects/items/devices/flashlight.dm | 2 +- code/game/objects/items/devices/suit_cooling.dm | 2 +- code/game/objects/items/uav.dm | 4 ++-- code/game/objects/items/weapons/RPD.dm | 4 ++-- .../objects/structures/crates_lockers/__closets.dm | 2 +- code/modules/client/client procs.dm | 2 +- code/modules/holomap/mapper.dm | 2 +- .../integrated_electronics/subtypes/output.dm | 2 +- .../simple_mob/subtypes/mechanical/mecha/mecha.dm | 2 +- .../modular_computers/hardware/battery_module.dm | 2 +- code/modules/projectiles/guns/launcher/bows.dm | 2 +- 17 files changed, 23 insertions(+), 25 deletions(-) diff --git a/code/__defines/qdel.dm b/code/__defines/qdel.dm index 278a2064db..94725229d1 100644 --- a/code/__defines/qdel.dm +++ b/code/__defines/qdel.dm @@ -25,7 +25,7 @@ //Qdel helper macros. #define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE) #define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME) -#define QDEL_NULL(item) qdel(item); item = null +#define QDEL_NULL(x) if(x) { qdel(x) ; x = null } #define QDEL_NULL_LIST QDEL_LIST_NULL #define QDEL_LIST_NULL(x) if(x) { for(var/y in x) { qdel(y) } ; x = null } #define QDEL_LIST(L) if(L) { for(var/I in L) qdel(I); L.Cut(); } diff --git a/code/_macros.dm b/code/_macros.dm index 768ab886e2..603b7c45e3 100644 --- a/code/_macros.dm +++ b/code/_macros.dm @@ -37,8 +37,6 @@ #define CanInteract(user, state) (CanUseTopic(user, state) == STATUS_INTERACTIVE) -#define qdel_null(x) if(x) { qdel(x) ; x = null } - #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) diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 0fe471eddc..8ae8a56207 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -196,7 +196,7 @@ var/global/list/global_huds = list( /datum/hud/Destroy() . = ..() - qdel_null(minihuds) + QDEL_NULL(minihuds) grab_intent = null hurt_intent = null disarm_intent = null diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index c1fecc4480..c4c61bb16f 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -680,13 +680,13 @@ /obj/screen/movable/mapper_holder/Destroy() - qdel_null(mask_full) - qdel_null(mask_ping) - qdel_null(bg) + QDEL_NULL(mask_full) + QDEL_NULL(mask_ping) + QDEL_NULL(bg) - qdel_null(frame) - qdel_null(powbutton) - qdel_null(mapbutton) + QDEL_NULL(frame) + QDEL_NULL(powbutton) + QDEL_NULL(mapbutton) extras_holder = null owner = null diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 78f6fae298..a832ce65f2 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -40,7 +40,7 @@ teleport_control.station = station /obj/machinery/computer/teleporter/Destroy() - qdel_null(teleport_control) + QDEL_NULL(teleport_control) return ..() /obj/machinery/computer/teleporter/attackby(I as obj, mob/living/user as mob) diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm index 9151b62b1a..52ede9d2e4 100644 --- a/code/game/objects/effects/mines.dm +++ b/code/game/objects/effects/mines.dm @@ -29,7 +29,7 @@ unregister_dangerous_to_step() if(trap) QDEL_NULL(trap) - qdel_null(wires) + QDEL_NULL(wires) return ..() /obj/effect/mine/Moved(atom/oldloc) diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index e8adcbded9..a2a6b4b88e 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -32,7 +32,7 @@ /obj/item/flashlight/Destroy() STOP_PROCESSING(SSobj, src) - qdel_null(cell) + QDEL_NULL(cell) return ..() /obj/item/flashlight/get_cell() diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index 8633dddb43..2b08731098 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -35,7 +35,7 @@ cell = new/obj/item/cell/high(src) //comes not with the crappy default power cell - because this is dedicated EVA equipment /obj/item/suit_cooling_unit/Destroy() - qdel_null(cell) + QDEL_NULL(cell) return ..() /obj/item/suit_cooling_unit/process() diff --git a/code/game/objects/items/uav.dm b/code/game/objects/items/uav.dm index 59b760852b..1dfb398bc1 100644 --- a/code/game/objects/items/uav.dm +++ b/code/game/objects/items/uav.dm @@ -52,8 +52,8 @@ ion_trail.stop() /obj/item/uav/Destroy() - qdel_null(cell) - qdel_null(ion_trail) + QDEL_NULL(cell) + QDEL_NULL(ion_trail) LAZYCLEARLIST(masters) STOP_PROCESSING(SSobj, src) return ..() diff --git a/code/game/objects/items/weapons/RPD.dm b/code/game/objects/items/weapons/RPD.dm index cb771f60b9..e14d49247c 100644 --- a/code/game/objects/items/weapons/RPD.dm +++ b/code/game/objects/items/weapons/RPD.dm @@ -58,8 +58,8 @@ first_disposal = GLOB.disposal_pipe_recipes[GLOB.disposal_pipe_recipes[1]][1] /obj/item/pipe_dispenser/Destroy() - qdel_null(spark_system) - qdel_null(tool) + QDEL_NULL(spark_system) + QDEL_NULL(tool) return ..() /obj/item/pipe_dispenser/attack_self(mob/user) diff --git a/code/game/objects/structures/crates_lockers/__closets.dm b/code/game/objects/structures/crates_lockers/__closets.dm index 8543678601..2407084473 100644 --- a/code/game/objects/structures/crates_lockers/__closets.dm +++ b/code/game/objects/structures/crates_lockers/__closets.dm @@ -80,7 +80,7 @@ /obj/structure/closet/Destroy() . = ..() - qdel_null(door_obj) + QDEL_NULL(door_obj) /obj/structure/closet/examine(mob/user) . = ..() diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 1120243c4e..339c69cd72 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -424,7 +424,7 @@ winset(src, null, "outputwindow.htmloutput.is-visible=false;outputwindow.oldoutput.is-visible=false;outputwindow.chatloadlabel.is-visible=true") //The hard way - qdel_null(src.chatOutput) + QDEL_NULL(src.chatOutput) chatOutput = new /datum/chatOutput(src) //veechat chatOutput.send_resources() spawn() diff --git a/code/modules/holomap/mapper.dm b/code/modules/holomap/mapper.dm index c64f5baa46..00558059aa 100644 --- a/code/modules/holomap/mapper.dm +++ b/code/modules/holomap/mapper.dm @@ -112,7 +112,7 @@ map_image_cache.Cut() icon_image_cache.Cut() - qdel_null(extras_holder) + QDEL_NULL(extras_holder) return ..() diff --git a/code/modules/integrated_electronics/subtypes/output.dm b/code/modules/integrated_electronics/subtypes/output.dm index 99c6cdd9cc..6549177e40 100644 --- a/code/modules/integrated_electronics/subtypes/output.dm +++ b/code/modules/integrated_electronics/subtypes/output.dm @@ -502,7 +502,7 @@ QDEL_NULL(hologram) // holo_beam.End() -// qdel_null(holo_beam) +// QDEL_NULL(holo_beam) power_draw_idle = 0 diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/mecha.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/mecha.dm index 3c1446142a..1dbd1e355f 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/mecha.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/mecha.dm @@ -59,7 +59,7 @@ return ..() /mob/living/simple_mob/mechanical/mecha/Destroy() - qdel_null(sparks) + QDEL_NULL(sparks) return ..() /mob/living/simple_mob/mechanical/mecha/death() diff --git a/code/modules/modular_computers/hardware/battery_module.dm b/code/modules/modular_computers/hardware/battery_module.dm index 6ef8aba6ba..85e909465c 100644 --- a/code/modules/modular_computers/hardware/battery_module.dm +++ b/code/modules/modular_computers/hardware/battery_module.dm @@ -71,7 +71,7 @@ . = ..() /obj/item/computer_hardware/battery_module/Destroy() - qdel_null(battery) + QDEL_NULL(battery) return ..() /obj/item/computer_hardware/battery_module/proc/charge_to_full() diff --git a/code/modules/projectiles/guns/launcher/bows.dm b/code/modules/projectiles/guns/launcher/bows.dm index e2f45a5fc1..84276da7cb 100644 --- a/code/modules/projectiles/guns/launcher/bows.dm +++ b/code/modules/projectiles/guns/launcher/bows.dm @@ -154,7 +154,7 @@ /obj/item/gun/launcher/crossbow/bow/hardlight/unload(mob/user) if(istype(bolt, /obj/item/arrow/energy)) // Let's not delete a Real Arrow^tm - qdel_null(bolt) + QDEL_NULL(bolt) update_icon() else . = ..() From b0a6851e0f4f047da89fccdca85a09132fe5b8d7 Mon Sep 17 00:00:00 2001 From: spookerton Date: Mon, 31 Oct 2022 09:00:14 +0000 Subject: [PATCH 3/3] correct behavior & use of QDEL_NULL_LIST+ odd shim --- code/__defines/qdel.dm | 3 +-- code/_onclick/hud/minihud.dm | 2 +- .../effects/temporary_visuals/projectiles/tracer.dm | 2 +- .../objects/items/weapons/grenades/chem_grenade.dm | 2 +- code/modules/assembly/infrared.dm | 12 ++++++------ code/modules/mob/mob_planes.dm | 2 +- code/modules/shieldgen/shield_gen.dm | 2 +- 7 files changed, 12 insertions(+), 13 deletions(-) diff --git a/code/__defines/qdel.dm b/code/__defines/qdel.dm index 94725229d1..bd9cb6ae98 100644 --- a/code/__defines/qdel.dm +++ b/code/__defines/qdel.dm @@ -26,8 +26,7 @@ #define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE) #define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME) #define QDEL_NULL(x) if(x) { qdel(x) ; x = null } -#define QDEL_NULL_LIST QDEL_LIST_NULL -#define QDEL_LIST_NULL(x) if(x) { for(var/y in x) { qdel(y) } ; x = null } +#define QDEL_NULL_LIST(x) if (x) { for(var/y in x) { qdel(y) } }; if (x) { x.Cut(); x = null; } #define QDEL_LIST(L) if(L) { for(var/I in L) qdel(I); L.Cut(); } #define QDEL_LIST_IN(L, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/______qdel_list_wrapper, L), time, TIMER_STOPPABLE) #define QDEL_LIST_ASSOC(L) if(L) { for(var/I in L) { qdel(L[I]); qdel(I); } L.Cut(); } diff --git a/code/_onclick/hud/minihud.dm b/code/_onclick/hud/minihud.dm index 1b8cd69caf..209ee1062c 100644 --- a/code/_onclick/hud/minihud.dm +++ b/code/_onclick/hud/minihud.dm @@ -12,7 +12,7 @@ unapply_to_hud() if(needs_processing) STOP_PROCESSING(SSprocessing, src) - QDEL_LIST_NULL(screenobjs) + QDEL_NULL_LIST(screenobjs) return ..() // Apply to a real /datum/hud diff --git a/code/game/objects/effects/temporary_visuals/projectiles/tracer.dm b/code/game/objects/effects/temporary_visuals/projectiles/tracer.dm index c5bf2674f7..29ea601b9c 100644 --- a/code/game/objects/effects/temporary_visuals/projectiles/tracer.dm +++ b/code/game/objects/effects/temporary_visuals/projectiles/tracer.dm @@ -2,7 +2,7 @@ var/list/beam_components = list() /datum/beam_components_cache/Destroy() - QDEL_LIST_NULL(beam_components) + QDEL_NULL_LIST(beam_components) return ..() /proc/generate_tracer_between_points(datum/point/starting, datum/point/ending, datum/beam_components_cache/beam_components, beam_type, color, qdel_in = 5, light_range = 2, light_color_override, light_intensity = 1, instance_key) //Do not pass z-crossing points as that will not be properly (and likely will never be properly until it's absolutely needed) supported! diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index ddb441f1c9..8b2ce3d4d7 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -21,7 +21,7 @@ /obj/item/grenade/chem_grenade/Destroy() QDEL_NULL(detonator) - QDEL_LIST_NULL(beakers) + QDEL_NULL_LIST(beakers) return ..() /obj/item/grenade/chem_grenade/attack_self(mob/user as mob) diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index 97619066ea..3cbe0e460c 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -39,7 +39,7 @@ START_PROCESSING(SSobj, src) else STOP_PROCESSING(SSobj, src) - QDEL_LIST_NULL(i_beams) + QDEL_NULL_LIST(i_beams) return on /obj/item/assembly/infra/update_icon() @@ -54,7 +54,7 @@ /obj/item/assembly/infra/process() if(!on && i_beams) - QDEL_LIST_NULL(i_beams) + QDEL_NULL_LIST(i_beams) return if(!i_beams && secured && (istype(loc, /turf) || (holder && istype(holder.loc, /turf)))) @@ -74,7 +74,7 @@ I.visible = visible /obj/item/assembly/infra/attack_hand() - QDEL_LIST_NULL(i_beams) + QDEL_NULL_LIST(i_beams) ..() /obj/item/assembly/infra/Move() @@ -84,19 +84,19 @@ /obj/item/assembly/infra/Moved(atom/old_loc, direction, forced = FALSE) . = ..() - QDEL_LIST_NULL(i_beams) + QDEL_NULL_LIST(i_beams) /obj/item/assembly/infra/holder_movement() if(!holder) return FALSE - QDEL_LIST_NULL(i_beams) + QDEL_NULL_LIST(i_beams) return TRUE /obj/item/assembly/infra/proc/trigger_beam() if(!process_cooldown()) return FALSE pulse(0) - QDEL_LIST_NULL(i_beams) //They will get recreated next process() if the situation is still appropriate + QDEL_NULL_LIST(i_beams) //They will get recreated next process() if the situation is still appropriate if(!holder) visible_message("[bicon(src)] *beep* *beep*") diff --git a/code/modules/mob/mob_planes.dm b/code/modules/mob/mob_planes.dm index 900372574f..f66ae9da2a 100644 --- a/code/modules/mob/mob_planes.dm +++ b/code/modules/mob/mob_planes.dm @@ -50,7 +50,7 @@ /datum/plane_holder/Destroy() my_mob = null - QDEL_LIST_NULL(plane_masters) //Goodbye my children, be free + QDEL_NULL_LIST(plane_masters) //Goodbye my children, be free return ..() /datum/plane_holder/proc/set_vis(var/which = null, var/state = FALSE) diff --git a/code/modules/shieldgen/shield_gen.dm b/code/modules/shieldgen/shield_gen.dm index 86aadc2629..3881e2abb6 100644 --- a/code/modules/shieldgen/shield_gen.dm +++ b/code/modules/shieldgen/shield_gen.dm @@ -44,7 +44,7 @@ return ..() /obj/machinery/shield_gen/Destroy() - QDEL_LIST_NULL(field) + QDEL_NULL_LIST(field) return ..() /obj/machinery/shield_gen/emag_act(var/remaining_charges, var/mob/user)