Fix context menu for admin menu (#20030)

This commit is contained in:
metalgearsloth
2023-09-12 14:34:20 +10:00
committed by GitHub
parent ace2ddbb73
commit 748ca93f5c
3 changed files with 6 additions and 6 deletions

View File

@@ -154,16 +154,16 @@ public sealed class AdminUIController : UIController, IOnStateEntered<GameplaySt
private void PlayerTabEntryPressed(ButtonEventArgs args)
{
if (args.Button is not PlayerTabEntry button
|| button.PlayerUid == null)
|| button.PlayerEntity == null)
return;
var uid = button.PlayerUid.Value;
var entity = button.PlayerEntity.Value;
var function = args.Event.Function;
if (function == EngineKeyFunctions.UIClick)
_conHost.ExecuteCommand($"vv {uid}");
_conHost.ExecuteCommand($"vv {entity}");
else if (function == EngineKeyFunctions.UseSecondary)
_verb.OpenVerbMenu(uid, true);
_verb.OpenVerbMenu(EntityManager.GetEntity(entity), true);
else
return;