Fix verbs in mapping state (#30631)

This commit is contained in:
metalgearsloth
2024-08-04 15:35:02 +10:00
committed by GitHub
parent f8bbc31903
commit c3c5a6ba22

View File

@@ -60,13 +60,18 @@ namespace Content.Client.Verbs.UI
public void OnStateEntered(MappingState state)
{
_context.OnContextKeyEvent += OnKeyBindDown;
_context.OnContextClosed += Close;
_verbSystem.OnVerbsResponse += HandleVerbsResponse;
}
public void OnStateExited(MappingState state)
{
_context.OnContextKeyEvent -= OnKeyBindDown;
_context.OnContextClosed -= Close;
if (_verbSystem != null)
_verbSystem.OnVerbsResponse -= HandleVerbsResponse;
Close();
}
/// <summary>