mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-06 17:58:05 +02:00
Automatically unsubscribe event bus registrations in entity system shutdown. (#1758)
* Automatically unsubscribe event bus registrations in entity system shutdown. * Fix incorrect unsubscription of local events, obsolete unsubscribe methods. That's what we got tests for. * = null instead of .Clear()
This commit is contained in:
@@ -22,14 +22,6 @@ namespace Robust.Client.GameObjects
|
||||
}
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeNetworkEvent<BoundUIWrapMessage>();
|
||||
UnsubscribeLocalEvent<ClientUserInterfaceComponent, ComponentShutdown>();
|
||||
}
|
||||
|
||||
private void MessageReceived(BoundUIWrapMessage ev)
|
||||
{
|
||||
var cmp = ComponentManager.GetComponent<ClientUserInterfaceComponent>(ev.Entity);
|
||||
|
||||
Reference in New Issue
Block a user