mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-25 01:22:24 +00:00
mix of old bay, vore, and tg io macros -> baylike
This commit is contained in:
@@ -307,10 +307,6 @@ var/global/list/##LIST_NAME = list();\
|
|||||||
|
|
||||||
//Various stuff used in Persistence
|
//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) "<span class='italic'>[X]</span>"
|
#define SPAN_ITALIC(X) "<span class='italic'>[X]</span>"
|
||||||
|
|
||||||
#define SPAN_NOTICE(X) "<span class='notice'>[X]</span>"
|
#define SPAN_NOTICE(X) "<span class='notice'>[X]</span>"
|
||||||
|
|||||||
@@ -653,7 +653,7 @@
|
|||||||
if(sight_check && !isInSight(A, O))
|
if(sight_check && !isInSight(A, O))
|
||||||
continue
|
continue
|
||||||
L |= M
|
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))
|
else if(include_radio && istype(A, /obj/item/radio))
|
||||||
if(sight_check && !isInSight(A, O))
|
if(sight_check && !isInSight(A, O))
|
||||||
@@ -683,7 +683,7 @@
|
|||||||
var/mob/M = A
|
var/mob/M = A
|
||||||
if(M.client || include_clientless)
|
if(M.client || include_clientless)
|
||||||
hear += M
|
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))
|
else if(istype(A, /obj/item/radio))
|
||||||
hear += A
|
hear += A
|
||||||
|
|
||||||
|
|||||||
@@ -12,23 +12,28 @@
|
|||||||
|
|
||||||
// #define to_chat(target, message) target << message Not anymore!
|
// #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_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.
|
// General I/O semantics
|
||||||
#define DIRECT_OUTPUT(A, B) A << B
|
#define to_target(target, payload) target << (payload)
|
||||||
#define SEND_IMAGE(target, image) DIRECT_OUTPUT(target, image)
|
#define from_target(target, receiver) target >> (receiver)
|
||||||
#define SEND_SOUND(target, sound) DIRECT_OUTPUT(target, sound)
|
|
||||||
//#define WRITE_LOG is in logging.dm
|
|
||||||
|
// 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)
|
#define CanInteract(user, state) (CanUseTopic(user, state) == STATUS_INTERACTIVE)
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars)
|
|||||||
var/datum/controller/exclude_these = new
|
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")
|
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)
|
Initialize(exclude_these)
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars)
|
|||||||
for(var/I in global_procs)
|
for(var/I in global_procs)
|
||||||
expected_global_procs -= replacetext("[I]", "InitGlobal", "")
|
expected_global_procs -= replacetext("[I]", "InitGlobal", "")
|
||||||
var/english_missing = expected_global_procs.Join(", ")
|
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)
|
for(var/I in global_procs)
|
||||||
var/start_tick = world.time
|
var/start_tick = world.time
|
||||||
call(src, I)()
|
call(src, I)()
|
||||||
|
|||||||
@@ -86,9 +86,9 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
|||||||
sortTim(subsystems, /proc/cmp_subsystem_init)
|
sortTim(subsystems, /proc/cmp_subsystem_init)
|
||||||
reverseRange(subsystems)
|
reverseRange(subsystems)
|
||||||
for(var/datum/controller/subsystem/ss in 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()
|
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,
|
// 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
|
// -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"
|
msg += "\t [varname] = [D]([D.type])\n"
|
||||||
else
|
else
|
||||||
msg += "\t [varname] = [varval]\n"
|
msg += "\t [varname] = [varval]\n"
|
||||||
log_world(msg)
|
to_world_log(msg)
|
||||||
|
|
||||||
var/datum/controller/subsystem/BadBoy = Master.last_type_processed
|
var/datum/controller/subsystem/BadBoy = Master.last_type_processed
|
||||||
var/FireHim = FALSE
|
var/FireHim = FALSE
|
||||||
@@ -140,7 +140,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
|||||||
if(msg)
|
if(msg)
|
||||||
log_game(msg)
|
log_game(msg)
|
||||||
message_admins("<span class='boldannounce'>[msg]</span>")
|
message_admins("<span class='boldannounce'>[msg]</span>")
|
||||||
log_world(msg)
|
to_world_log(msg)
|
||||||
|
|
||||||
if (istype(Master.subsystems))
|
if (istype(Master.subsystems))
|
||||||
if(FireHim)
|
if(FireHim)
|
||||||
@@ -183,7 +183,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
|||||||
|
|
||||||
var/msg = "MC: Initializations complete within [time] second[time == 1 ? "" : "s"]!"
|
var/msg = "MC: Initializations complete within [time] second[time == 1 ? "" : "s"]!"
|
||||||
to_chat(world, "<span class='boldannounce'>[msg]</span>")
|
to_chat(world, "<span class='boldannounce'>[msg]</span>")
|
||||||
log_world(msg)
|
to_world_log(msg)
|
||||||
|
|
||||||
if (!current_runlevel)
|
if (!current_runlevel)
|
||||||
SetRunLevel(RUNLEVEL_LOBBY)
|
SetRunLevel(RUNLEVEL_LOBBY)
|
||||||
@@ -341,7 +341,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
|||||||
|
|
||||||
if (CheckQueue(subsystems_to_check) <= 0)
|
if (CheckQueue(subsystems_to_check) <= 0)
|
||||||
if (!SoftReset(tickersubsystems, runlevel_sorted_subsystems))
|
if (!SoftReset(tickersubsystems, runlevel_sorted_subsystems))
|
||||||
log_world("MC: SoftReset() failed, crashing")
|
to_world_log("MC: SoftReset() failed, crashing")
|
||||||
return
|
return
|
||||||
if (!error_level)
|
if (!error_level)
|
||||||
iteration++
|
iteration++
|
||||||
@@ -353,7 +353,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
|||||||
if (queue_head)
|
if (queue_head)
|
||||||
if (RunQueue() <= 0)
|
if (RunQueue() <= 0)
|
||||||
if (!SoftReset(tickersubsystems, runlevel_sorted_subsystems))
|
if (!SoftReset(tickersubsystems, runlevel_sorted_subsystems))
|
||||||
log_world("MC: SoftReset() failed, crashing")
|
to_world_log("MC: SoftReset() failed, crashing")
|
||||||
return
|
return
|
||||||
if (!error_level)
|
if (!error_level)
|
||||||
iteration++
|
iteration++
|
||||||
@@ -533,9 +533,9 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
|||||||
// called if any mc's queue procs runtime or exit improperly.
|
// called if any mc's queue procs runtime or exit improperly.
|
||||||
/datum/controller/master/proc/SoftReset(list/ticker_SS, list/runlevel_SS)
|
/datum/controller/master/proc/SoftReset(list/ticker_SS, list/runlevel_SS)
|
||||||
. = 0
|
. = 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))
|
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
|
return
|
||||||
var/subsystemstocheck = subsystems + ticker_SS
|
var/subsystemstocheck = subsystems + ticker_SS
|
||||||
for(var/I in runlevel_SS)
|
for(var/I in runlevel_SS)
|
||||||
@@ -549,26 +549,26 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
|||||||
ticker_SS -= list(SS)
|
ticker_SS -= list(SS)
|
||||||
for(var/I in runlevel_SS)
|
for(var/I in runlevel_SS)
|
||||||
I -= list(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
|
continue
|
||||||
if (SS.queue_next && !istype(SS.queue_next))
|
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
|
SS.queue_next = null
|
||||||
if (SS.queue_prev && !istype(SS.queue_prev))
|
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.queue_prev = null
|
||||||
SS.queued_priority = 0
|
SS.queued_priority = 0
|
||||||
SS.queued_time = 0
|
SS.queued_time = 0
|
||||||
SS.state = SS_IDLE
|
SS.state = SS_IDLE
|
||||||
if (queue_head && !istype(queue_head))
|
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
|
queue_head = null
|
||||||
if (queue_tail && !istype(queue_tail))
|
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_tail = null
|
||||||
queue_priority_count = 0
|
queue_priority_count = 0
|
||||||
queue_priority_count_bg = 0
|
queue_priority_count_bg = 0
|
||||||
log_world("MC: SoftReset: Finished.")
|
to_world_log("MC: SoftReset: Finished.")
|
||||||
. = 1
|
. = 1
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
var/time = (REALTIMEOFDAY - timeofday) / 10
|
var/time = (REALTIMEOFDAY - timeofday) / 10
|
||||||
var/msg = "Initialized [name] subsystem within [time] second[time == 1 ? "" : "s"]!"
|
var/msg = "Initialized [name] subsystem within [time] second[time == 1 ? "" : "s"]!"
|
||||||
to_chat(world, "<span class='boldannounce'>[msg]</span>")
|
to_chat(world, "<span class='boldannounce'>[msg]</span>")
|
||||||
log_world(msg)
|
to_world_log(msg)
|
||||||
return time
|
return time
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ SUBSYSTEM_DEF(chat)
|
|||||||
if(!C)
|
if(!C)
|
||||||
continue // No client? No care.
|
continue // No client? No care.
|
||||||
else if(C.chatOutput.broken)
|
else if(C.chatOutput.broken)
|
||||||
DIRECT_OUTPUT(C, original_message)
|
to_target(C, original_message)
|
||||||
continue
|
continue
|
||||||
else if(!C.chatOutput.loaded)
|
else if(!C.chatOutput.loaded)
|
||||||
continue // If not loaded yet, do nothing and history-sending on load will get it.
|
continue // If not loaded yet, do nothing and history-sending on load will get it.
|
||||||
@@ -68,7 +68,7 @@ SUBSYSTEM_DEF(chat)
|
|||||||
if(!C)
|
if(!C)
|
||||||
return // No client? No care.
|
return // No client? No care.
|
||||||
else if(C.chatOutput.broken)
|
else if(C.chatOutput.broken)
|
||||||
DIRECT_OUTPUT(C, original_message)
|
to_target(C, original_message)
|
||||||
return
|
return
|
||||||
else if(!C.chatOutput.loaded)
|
else if(!C.chatOutput.loaded)
|
||||||
return // If not loaded yet, do nothing and history-sending on load will get it.
|
return // If not loaded yet, do nothing and history-sending on load will get it.
|
||||||
|
|||||||
@@ -52,24 +52,24 @@ SUBSYSTEM_DEF(timer)
|
|||||||
if(bucket_auto_reset)
|
if(bucket_auto_reset)
|
||||||
bucket_resolution = 0
|
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))
|
for (var/i in 1 to length(bucket_list))
|
||||||
var/datum/timedevent/bucket_head = bucket_list[i]
|
var/datum/timedevent/bucket_head = bucket_list[i]
|
||||||
if (!bucket_head)
|
if (!bucket_head)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
log_world("Active timers at index [i]:")
|
to_world_log("Active timers at index [i]:")
|
||||||
|
|
||||||
var/datum/timedevent/bucket_node = bucket_head
|
var/datum/timedevent/bucket_node = bucket_head
|
||||||
var/anti_loop_check = 1000
|
var/anti_loop_check = 1000
|
||||||
do
|
do
|
||||||
log_world(get_timer_debug_string(bucket_node))
|
to_world_log(get_timer_debug_string(bucket_node))
|
||||||
bucket_node = bucket_node.next
|
bucket_node = bucket_node.next
|
||||||
anti_loop_check--
|
anti_loop_check--
|
||||||
while(bucket_node && bucket_node != bucket_head && 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)
|
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/cut_start_index = 1
|
||||||
var/next_clienttime_timer_index = 0
|
var/next_clienttime_timer_index = 0
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
return
|
return
|
||||||
window_flash(C)
|
window_flash(C)
|
||||||
if(query_sound)
|
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")
|
var/response = alert(C, question, "[role_name] request", "Yes", "No", "Never for this round")
|
||||||
if(response == "Yes")
|
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.
|
response = alert(C, "Are you sure you want to play as a [role_name]?", "[role_name] request", "Yes", "No") // Protection from a misclick.
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
var/mob/M = thing
|
var/mob/M = thing
|
||||||
if(!M.is_preference_enabled(pref_check))
|
if(!M.is_preference_enabled(pref_check))
|
||||||
continue
|
continue
|
||||||
SEND_SOUND(thing, S)
|
sound_to(thing, S)
|
||||||
else
|
else
|
||||||
playsound(thing, S, volume, vary, extra_range, ignore_walls = !opacity_check, preference = pref_check)
|
playsound(thing, S, volume, vary, extra_range, ignore_walls = !opacity_check, preference = pref_check)
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
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]")
|
C << link("byond://[config.server]")
|
||||||
|
|
||||||
log_world("World rebooted at [time_stamp()]")
|
to_world_log("World rebooted at [time_stamp()]")
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/hook/startup/proc/loadMode()
|
/hook/startup/proc/loadMode()
|
||||||
|
|||||||
@@ -193,7 +193,7 @@
|
|||||||
if (rejected)
|
if (rejected)
|
||||||
to_chat(src, "[rejected] out of [count] objects rejected your edit")
|
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)")
|
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)")
|
message_admins("[key_name_admin(src)] mass modified [original_name]'s [variable] to [O.vars[variable]] ([accepted] objects modified)")
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ GLOBAL_PROTECT(VVpixelmovement)
|
|||||||
if (O.vv_edit_var(objectvar, L) == FALSE)
|
if (O.vv_edit_var(objectvar, L) == FALSE)
|
||||||
to_chat(src, "Your edit was rejected by the object.")
|
to_chat(src, "Your edit was rejected by the object.")
|
||||||
return
|
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]")
|
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]")
|
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))
|
if (!O.vv_edit_var(objectvar, L))
|
||||||
to_chat(src, "Your edit was rejected by the object.")
|
to_chat(src, "Your edit was rejected by the object.")
|
||||||
return
|
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")
|
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")
|
message_admins("[key_name_admin(src)] modified [original_name]'s list [objectvar]: CLEAR NULLS")
|
||||||
return
|
return
|
||||||
@@ -158,7 +158,7 @@ GLOBAL_PROTECT(VVpixelmovement)
|
|||||||
if (!O.vv_edit_var(objectvar, L))
|
if (!O.vv_edit_var(objectvar, L))
|
||||||
to_chat(src, "Your edit was rejected by the object.")
|
to_chat(src, "Your edit was rejected by the object.")
|
||||||
return
|
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")
|
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")
|
message_admins("[key_name_admin(src)] modified [original_name]'s list [objectvar]: CLEAR DUPES")
|
||||||
return
|
return
|
||||||
@@ -168,7 +168,7 @@ GLOBAL_PROTECT(VVpixelmovement)
|
|||||||
if (!O.vv_edit_var(objectvar, L))
|
if (!O.vv_edit_var(objectvar, L))
|
||||||
to_chat(src, "Your edit was rejected by the object.")
|
to_chat(src, "Your edit was rejected by the object.")
|
||||||
return
|
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")
|
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: SHUFFLE")
|
||||||
message_admins("[key_name_admin(src)] modified [original_name]'s list [objectvar]: SHUFFLE")
|
message_admins("[key_name_admin(src)] modified [original_name]'s list [objectvar]: SHUFFLE")
|
||||||
return
|
return
|
||||||
@@ -251,7 +251,7 @@ GLOBAL_PROTECT(VVpixelmovement)
|
|||||||
if (O.vv_edit_var(objectvar, L))
|
if (O.vv_edit_var(objectvar, L))
|
||||||
to_chat(src, "Your edit was rejected by the object.")
|
to_chat(src, "Your edit was rejected by the object.")
|
||||||
return
|
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]")
|
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]")
|
message_admins("[key_name_admin(src)] modified [original_name]'s [objectvar]: REMOVED=[original_var]")
|
||||||
return
|
return
|
||||||
@@ -272,7 +272,7 @@ GLOBAL_PROTECT(VVpixelmovement)
|
|||||||
if (O.vv_edit_var(objectvar, L) == FALSE)
|
if (O.vv_edit_var(objectvar, L) == FALSE)
|
||||||
to_chat(src, "Your edit was rejected by the object.")
|
to_chat(src, "Your edit was rejected by the object.")
|
||||||
return
|
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]")
|
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]")
|
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.")
|
to_chat(src, "Your edit was rejected by the object.")
|
||||||
return
|
return
|
||||||
vv_update_display(O, "varedited", VV_MSG_EDITED)
|
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]")]")
|
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]"
|
var/msg = "[key_name_admin(src)] modified [original_name]'s [variable] from [var_value] to [var_new]"
|
||||||
message_admins(msg)
|
message_admins(msg)
|
||||||
|
|||||||
@@ -14,19 +14,19 @@
|
|||||||
if (prompt != "Yes")
|
if (prompt != "Yes")
|
||||||
return
|
return
|
||||||
target.Cut(target_index, target_index+1)
|
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]")
|
log_admin("[key_name(src)] modified list's contents: REMOVED=[variable]")
|
||||||
message_admins("[key_name_admin(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])
|
if(href_list[VV_HK_LIST_ADD])
|
||||||
mod_list_add(target, null, "list", "contents")
|
mod_list_add(target, null, "list", "contents")
|
||||||
if(href_list[VV_HK_LIST_ERASE_DUPES])
|
if(href_list[VV_HK_LIST_ERASE_DUPES])
|
||||||
uniqueList_inplace(target)
|
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")
|
log_admin("[key_name(src)] modified list's contents: CLEAR DUPES")
|
||||||
message_admins("[key_name_admin(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])
|
if(href_list[VV_HK_LIST_ERASE_NULLS])
|
||||||
listclearnulls(target)
|
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")
|
log_admin("[key_name(src)] modified list's contents: CLEAR NULLS")
|
||||||
message_admins("[key_name_admin(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])
|
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.
|
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
|
return
|
||||||
target.len = value["value"]
|
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]")
|
log_admin("[key_name(src)] modified list's len: [target.len]")
|
||||||
message_admins("[key_name_admin(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])
|
if(href_list[VV_HK_LIST_SHUFFLE])
|
||||||
shuffle_inplace(target)
|
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")
|
log_admin("[key_name(src)] modified list's contents: SHUFFLE")
|
||||||
message_admins("[key_name_admin(src)] modified list's contents: SHUFFLE")
|
message_admins("[key_name_admin(src)] modified list's contents: SHUFFLE")
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
/datum/antagonist/proc/greet(var/datum/mind/player)
|
/datum/antagonist/proc/greet(var/datum/mind/player)
|
||||||
// Makes it harder to miss if you're alt-tabbed or not paying attention.
|
// Makes it harder to miss if you're alt-tabbed or not paying attention.
|
||||||
if(antag_sound)
|
if(antag_sound)
|
||||||
SEND_SOUND(player.current, sound(antag_sound))
|
sound_to(player.current, sound(antag_sound))
|
||||||
window_flash(player.current.client)
|
window_flash(player.current.client)
|
||||||
|
|
||||||
// Basic intro text.
|
// Basic intro text.
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
md5 = md5(fcopy_rsc(file))
|
md5 = md5(fcopy_rsc(file))
|
||||||
if (!md5)
|
if (!md5)
|
||||||
CRASH("invalid asset sent to asset cache")
|
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
|
src.name = name
|
||||||
url = name
|
url = name
|
||||||
resource = file
|
resource = file
|
||||||
|
|||||||
@@ -393,7 +393,7 @@
|
|||||||
/client/proc/findJoinDate()
|
/client/proc/findJoinDate()
|
||||||
var/list/http = world.Export("http://byond.com/members/[ckey]?format=text")
|
var/list/http = world.Export("http://byond.com/members/[ckey]?format=text")
|
||||||
if(!http)
|
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
|
return
|
||||||
var/F = file2text(http["CONTENT"])
|
var/F = file2text(http["CONTENT"])
|
||||||
if(F)
|
if(F)
|
||||||
|
|||||||
@@ -47,18 +47,18 @@ var/global/list/gear_datums = list()
|
|||||||
var/current_tab = "General"
|
var/current_tab = "General"
|
||||||
|
|
||||||
/datum/category_item/player_setup_item/loadout/load_character(var/savefile/S)
|
/datum/category_item/player_setup_item/loadout/load_character(var/savefile/S)
|
||||||
from_file(S["gear_list"], pref.gear_list)
|
from_save(S["gear_list"], pref.gear_list)
|
||||||
from_file(S["gear_slot"], pref.gear_slot)
|
from_save(S["gear_slot"], pref.gear_slot)
|
||||||
if(pref.gear_list!=null && pref.gear_slot!=null)
|
if(pref.gear_list!=null && pref.gear_slot!=null)
|
||||||
pref.gear = pref.gear_list["[pref.gear_slot]"]
|
pref.gear = pref.gear_list["[pref.gear_slot]"]
|
||||||
else
|
else
|
||||||
from_file(S["gear"], pref.gear)
|
from_save(S["gear"], pref.gear)
|
||||||
pref.gear_slot = 1
|
pref.gear_slot = 1
|
||||||
|
|
||||||
/datum/category_item/player_setup_item/loadout/save_character(var/savefile/S)
|
/datum/category_item/player_setup_item/loadout/save_character(var/savefile/S)
|
||||||
pref.gear_list["[pref.gear_slot]"] = pref.gear
|
pref.gear_list["[pref.gear_slot]"] = pref.gear
|
||||||
to_file(S["gear_list"], pref.gear_list)
|
to_save(S["gear_list"], pref.gear_list)
|
||||||
to_file(S["gear_slot"], pref.gear_slot)
|
to_save(S["gear_slot"], pref.gear_slot)
|
||||||
|
|
||||||
/datum/category_item/player_setup_item/loadout/proc/valid_gear_choices(var/max_cost)
|
/datum/category_item/player_setup_item/loadout/proc/valid_gear_choices(var/max_cost)
|
||||||
. = list()
|
. = list()
|
||||||
|
|||||||
@@ -256,7 +256,7 @@
|
|||||||
|
|
||||||
else if(href_list["job_wiki"])
|
else if(href_list["job_wiki"])
|
||||||
var/rank = href_list["job_wiki"]
|
var/rank = href_list["job_wiki"]
|
||||||
open_link(user,"[config.wikiurl][rank]")
|
send_link(user,"[config.wikiurl][rank]")
|
||||||
|
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
|||||||
@@ -94,4 +94,4 @@
|
|||||||
/datum/event2/event/raise_funds/proc/send_command_report(title, message)
|
/datum/event2/event/raise_funds/proc/send_command_report(title, message)
|
||||||
post_comm_message(title, message)
|
post_comm_message(title, message)
|
||||||
to_world(span("danger", "New [using_map.company_name] Update available at all communication consoles."))
|
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')
|
||||||
|
|||||||
@@ -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)
|
throw_alert("\ref[source]_notify_revive", /obj/screen/alert/notify_cloning, new_master = source)
|
||||||
to_chat(src, "<span class='ghostalert'><a href=?src=[REF(src)];reenter=1>(Click to re-enter)</a></span>")
|
to_chat(src, "<span class='ghostalert'><a href=?src=[REF(src)];reenter=1>(Click to re-enter)</a></span>")
|
||||||
if(sound)
|
if(sound)
|
||||||
SEND_SOUND(src, sound(sound))
|
sound_to(src, sound(sound))
|
||||||
|
|
||||||
/mob/observer/dead/verb/respawn()
|
/mob/observer/dead/verb/respawn()
|
||||||
set name = "Respawn"
|
set name = "Respawn"
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
if((last_law_notification + 1 SECOND) > world.time)
|
if((last_law_notification + 1 SECOND) > world.time)
|
||||||
return
|
return
|
||||||
last_law_notification = world.time
|
last_law_notification = world.time
|
||||||
SEND_SOUND(src, 'sound/machines/defib_success.ogg')
|
sound_to(src, 'sound/machines/defib_success.ogg')
|
||||||
window_flash(client)
|
window_flash(client)
|
||||||
to_chat(src, span("warning", message))
|
to_chat(src, span("warning", message))
|
||||||
|
|
||||||
|
|||||||
@@ -9,9 +9,9 @@
|
|||||||
var/archived // Set to 1 for older stuff
|
var/archived // Set to 1 for older stuff
|
||||||
var/cover //filename of cover.
|
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)
|
stored_data = file2text(server_file_path)
|
||||||
calculate_size()
|
calculate_size()
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,7 @@
|
|||||||
to_store[++to_store.len] = CompileEntry(thing)
|
to_store[++to_store.len] = CompileEntry(thing)
|
||||||
|
|
||||||
if(to_store.len)
|
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)
|
/datum/persistent/proc/RemoveValue(var/atom/value)
|
||||||
qdel(value)
|
qdel(value)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ GLOBAL_LIST_INIT(vchatFiles, list(
|
|||||||
))
|
))
|
||||||
|
|
||||||
// The to_chat() macro calls this proc
|
// 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
|
// First do logging in database
|
||||||
if(isclient(target))
|
if(isclient(target))
|
||||||
var/client/C = target
|
var/client/C = target
|
||||||
@@ -369,7 +369,7 @@ var/global/to_chat_src
|
|||||||
if(!C)
|
if(!C)
|
||||||
return // No client? No care.
|
return // No client? No care.
|
||||||
else if(C.chatOutput.broken)
|
else if(C.chatOutput.broken)
|
||||||
DIRECT_OUTPUT(C, original_message)
|
to_target(C, original_message)
|
||||||
return
|
return
|
||||||
else if(!C.chatOutput.loaded)
|
else if(!C.chatOutput.loaded)
|
||||||
return // If not loaded yet, do nothing and history-sending on load will get it.
|
return // If not loaded yet, do nothing and history-sending on load will get it.
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ GLOBAL_DATUM(vchatdb, /database)
|
|||||||
//For INSERT/CREATE/DELETE, etc that return a RowsAffected.
|
//For INSERT/CREATE/DELETE, etc that return a RowsAffected.
|
||||||
/proc/vchat_exec_update(var/query)
|
/proc/vchat_exec_update(var/query)
|
||||||
if(!check_vchat())
|
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
|
return FALSE
|
||||||
|
|
||||||
//Solidify our query
|
//Solidify our query
|
||||||
@@ -35,7 +35,7 @@ GLOBAL_DATUM(vchatdb, /database)
|
|||||||
|
|
||||||
//Handle errors
|
//Handle errors
|
||||||
if(q.Error())
|
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 FALSE
|
||||||
|
|
||||||
return q.RowsAffected()
|
return q.RowsAffected()
|
||||||
@@ -43,7 +43,7 @@ GLOBAL_DATUM(vchatdb, /database)
|
|||||||
//For SELECT, that return results.
|
//For SELECT, that return results.
|
||||||
/proc/vchat_exec_query(var/query)
|
/proc/vchat_exec_query(var/query)
|
||||||
if(!check_vchat())
|
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
|
return FALSE
|
||||||
|
|
||||||
//Solidify our query
|
//Solidify our query
|
||||||
@@ -54,7 +54,7 @@ GLOBAL_DATUM(vchatdb, /database)
|
|||||||
|
|
||||||
//Handle errors
|
//Handle errors
|
||||||
if(q.Error())
|
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 FALSE
|
||||||
|
|
||||||
//Return any results
|
//Return any results
|
||||||
|
|||||||
Reference in New Issue
Block a user