mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Fixes an issue with tags for mobs not properly being handled correctly and adds logging to admin circuits (#64821)
Tags would bug out due to how the 'Save Shell' component would copy all the variables on an object except a few restricted ones, though this proved to be very buggy. The duplicator part has been removed and more proper logging has been added. To compensate for the duplicator part being removed, admin circuit display names will now replace the entire name of the shell.
This commit is contained in:
@@ -83,6 +83,7 @@
|
||||
if(parallel.value)
|
||||
extra_flags |= ANIMATION_PARALLEL
|
||||
|
||||
log_admin_circuit("[parent.get_creator()] performed an animation on [target_atom].")
|
||||
var/list/first_step = popleft(result["animation_steps"])
|
||||
animate(target_for_animation, time = first_step["time"], first_step["vars"], loop = animation_loops.value, easing = first_step["easing"], flags = first_step["flags"]|extra_flags)
|
||||
for(var/list/step as anything in result["animation_steps"])
|
||||
|
||||
@@ -58,4 +58,5 @@
|
||||
output_value.set_output(null)
|
||||
return
|
||||
|
||||
log_admin_circuit("[parent.get_creator()] requested the variable '[var_name]' on [object].")
|
||||
output_value.set_output(object.vars[var_name])
|
||||
|
||||
@@ -71,7 +71,9 @@
|
||||
if(called_on != GLOBAL_PROC && !hascall(called_on, to_invoke))
|
||||
return
|
||||
|
||||
INVOKE_ASYNC(src, .proc/do_proccall, called_on, to_invoke, recursive_list_resolve(params))
|
||||
var/list/resolved_params = recursive_list_resolve(params)
|
||||
log_admin_circuit("[parent.get_creator()] proccalled '[to_invoke]' on [called_on] with params \[[resolved_params.Join(", ")]].")
|
||||
INVOKE_ASYNC(src, .proc/do_proccall, called_on, to_invoke, resolved_params)
|
||||
|
||||
/obj/item/circuit_component/proccall/proc/do_proccall(called_on, to_invoke, params)
|
||||
var/result = HandleUserlessProcCall(parent.get_creator(), called_on, to_invoke, params)
|
||||
|
||||
@@ -45,14 +45,6 @@
|
||||
. = ..()
|
||||
var/atom/movable/shell = parent.shell
|
||||
component_data["shell_type"] = shell.type
|
||||
var/list/shell_variables = list()
|
||||
for(var/variable in shell.vars - GLOB.duplicate_forbidden_vars)
|
||||
var/variable_data = shell.vars[variable]
|
||||
if(!istext(variable_data) && !isnum(variable_data))
|
||||
continue
|
||||
shell_variables[variable] = variable_data
|
||||
|
||||
component_data["shell_variables"] = shell_variables
|
||||
|
||||
/obj/item/circuit_component/save_shell/load_data_from_list(list/component_data)
|
||||
if(parent.shell)
|
||||
@@ -63,12 +55,8 @@
|
||||
return ..()
|
||||
|
||||
loaded_shell = new shell_type(drop_location())
|
||||
log_admin_circuit("[parent.get_creator()] spawned in [shell_type] at [ADMIN_COORDJMP(loaded_shell)].")
|
||||
if(!loaded_shell)
|
||||
return
|
||||
loaded_shell.datum_flags |= DF_VAR_EDITED
|
||||
|
||||
var/list/shell_variables = component_data["shell_variables"]
|
||||
for(var/variable in shell_variables - GLOB.duplicate_forbidden_vars)
|
||||
var/variable_data = shell_variables[variable]
|
||||
loaded_shell.vv_edit_var(variable, variable_data)
|
||||
return ..()
|
||||
|
||||
@@ -31,5 +31,6 @@
|
||||
if(!operation)
|
||||
return
|
||||
|
||||
log_admin_circuit("[parent.get_creator()] performed SDQL query [operation].")
|
||||
var/result = HandleUserlessSDQL(parent.get_creator(), operation)
|
||||
results.set_output(result)
|
||||
|
||||
@@ -35,4 +35,5 @@
|
||||
var/list/to_resolve = resolved_new_value
|
||||
resolved_new_value = recursive_list_resolve(to_resolve)
|
||||
|
||||
log_admin_circuit("[parent.get_creator()] set the variable '[var_name]' on [object] to [resolved_new_value].")
|
||||
object.vv_edit_var(var_name, resolved_new_value)
|
||||
|
||||
@@ -132,6 +132,7 @@
|
||||
target_datum = SSdcs
|
||||
|
||||
if(target_datum)
|
||||
log_admin_circuit("[parent.get_creator()] registered the signal '[registered_signal]' on [target_datum]")
|
||||
// We override because an admin may try registering a signal on the same object/datum again, so this prevents any runtimes from occuring
|
||||
RegisterSignal(target_datum, registered_signal, .proc/handle_signal_received, override = TRUE)
|
||||
registered_entities |= WEAKREF(target_datum)
|
||||
@@ -198,6 +199,8 @@
|
||||
var/temp_usr = usr
|
||||
usr = null
|
||||
|
||||
var/list/displayArgs = arguments.Copy()
|
||||
log_admin_circuit("[parent.get_creator()] received a signal from [popleft(displayArgs)] ([registered_signal]) with the parameters \[[displayArgs.Join(", ")]]")
|
||||
SScircuit_component.queue_instant_run()
|
||||
run_ports_on_args(arguments)
|
||||
var/list/output = SScircuit_component.execute_instant_run()
|
||||
@@ -218,7 +221,9 @@
|
||||
if(!return_values["bitflag"])
|
||||
return_values["bitflag"] = NONE
|
||||
|
||||
return_values["bitflag"] |= input_signal_ports[port]
|
||||
var/bitflag = input_signal_ports[port]
|
||||
log_admin_circuit("[parent.get_creator()] received bitflag [bitflag] for '[registered_signal]'")
|
||||
return_values["bitflag"] |= bitflag
|
||||
|
||||
#undef COMP_SIGNAL_HANDLER_GLOBAL
|
||||
#undef COMP_SIGNAL_HANDLER_OBJECT
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
resolved_params.Insert(1, spawn_at.value)
|
||||
|
||||
log_admin_circuit("[parent.get_creator()] spawned in [typepath] with parameters \[[resolved_params.Join(", ")]].")
|
||||
var/atom/spawned = new typepath(arglist(resolved_params))
|
||||
spawned.datum_flags |= DF_VAR_EDITED
|
||||
spawned_atom.set_output(spawned)
|
||||
|
||||
Reference in New Issue
Block a user