Makes a lot of entity systems unsubscribe from events on shutdown.
This commit is contained in:
@@ -46,7 +46,6 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
IoCManager.InjectDependencies(this);
|
||||
|
||||
SubscribeNetworkEvent<VerbSystemMessages.VerbsResponseMessage>(FillEntityPopup);
|
||||
SubscribeNetworkEvent<PlayerContainerVisibilityMessage>(HandleContainerVisibilityMessage);
|
||||
@@ -62,11 +61,14 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
UnsubscribeNetworkEvent<VerbSystemMessages.VerbsResponseMessage>();
|
||||
UnsubscribeNetworkEvent<PlayerContainerVisibilityMessage>();
|
||||
UnsubscribeLocalEvent<MoveEvent>();
|
||||
_contextMenuPresenter?.Dispose();
|
||||
|
||||
CommandBinds.Unregister<VerbSystem>();
|
||||
base.Shutdown();
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
|
||||
Reference in New Issue
Block a user