mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 04:57:57 +01:00
[MIRROR] Save 0.6-0.7s of init time by splitting registering lists of signals into its own proc, and optimizing QDELETED [MDB IGNORE] (#17670)
* Save 0.6-0.7s of init time by splitting registering lists of signals into its own proc, and optimizing QDELETED * modular RegisterSignals Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: tastyfish <crazychris32@gmail.com>
This commit is contained in:
@@ -156,7 +156,7 @@
|
||||
. = ..()
|
||||
if(istype(shell, /obj/machinery/door/airlock))
|
||||
attached_airlock = shell
|
||||
RegisterSignal(shell, list(
|
||||
RegisterSignals(shell, list(
|
||||
COMSIG_OBJ_ALLOWED,
|
||||
COMSIG_AIRLOCK_SHELL_ALLOWED,
|
||||
), PROC_REF(handle_allowed))
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
signal = add_output_port("Signal", PORT_TYPE_SIGNAL)
|
||||
|
||||
/obj/item/circuit_component/assembly_input/register_shell(atom/movable/shell)
|
||||
RegisterSignal(shell, list(COMSIG_ASSEMBLY_PULSED, COMSIG_ITEM_ATTACK_SELF), PROC_REF(on_pulsed))
|
||||
RegisterSignals(shell, list(COMSIG_ASSEMBLY_PULSED, COMSIG_ITEM_ATTACK_SELF), PROC_REF(on_pulsed))
|
||||
|
||||
/obj/item/circuit_component/assembly_input/unregister_shell(atom/movable/shell)
|
||||
UnregisterSignal(shell, list(COMSIG_ASSEMBLY_PULSED, COMSIG_ITEM_ATTACK_SELF))
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
var/obj/item/circuit_component/vendor_component/vendor_component = new(parent)
|
||||
parent.add_component(vendor_component, user)
|
||||
vendor_components += vendor_component
|
||||
RegisterSignal(vendor_component, list(
|
||||
RegisterSignals(vendor_component, list(
|
||||
COMSIG_PARENT_QDELETING,
|
||||
COMSIG_CIRCUIT_COMPONENT_REMOVED,
|
||||
), PROC_REF(remove_vendor_component))
|
||||
|
||||
Reference in New Issue
Block a user