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:
Watermelon914
2022-02-11 01:06:35 -08:00
committed by GitHub
parent 6cc7b1792d
commit 6e2de00ab4
11 changed files with 35 additions and 27 deletions
@@ -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 ..()