mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-06 06:52:39 +00:00
[MIRROR] Fixes an issue with tags for mobs not properly being handled correctly and adds logging to admin circuits [MDB IGNORE] (#11441)
* 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. * Fixes an issue with tags for mobs not properly being handled correctly and adds logging to admin circuits Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
This commit is contained in:
@@ -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 ..()
|
||||
|
||||
Reference in New Issue
Block a user