[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:
SkyratBot
2022-02-11 10:25:58 +00:00
committed by GitHub
co-authored by Watermelon914
parent 43ae84c64f
commit 1d2d7d2b6c
11 changed files with 35 additions and 27 deletions
@@ -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