Update use secondary hotkey (#11592)
This commit is contained in:
@@ -155,7 +155,7 @@ namespace Content.Client.Administration.Systems
|
|||||||
|
|
||||||
if (function == EngineKeyFunctions.UIClick)
|
if (function == EngineKeyFunctions.UIClick)
|
||||||
_clientConsoleHost.ExecuteCommand($"vv {uid}");
|
_clientConsoleHost.ExecuteCommand($"vv {uid}");
|
||||||
else if (function == EngineKeyFunctions.AltUse)
|
else if (function == EngineKeyFunctions.UseSecondary)
|
||||||
_verbSystem.VerbMenu.OpenVerbMenu(uid, true);
|
_verbSystem.VerbMenu.OpenVerbMenu(uid, true);
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
@@ -173,7 +173,7 @@ namespace Content.Client.Administration.Systems
|
|||||||
|
|
||||||
if (function == EngineKeyFunctions.UIClick)
|
if (function == EngineKeyFunctions.UIClick)
|
||||||
_clientConsoleHost.ExecuteCommand($"vv {uid}");
|
_clientConsoleHost.ExecuteCommand($"vv {uid}");
|
||||||
else if (function == EngineKeyFunctions.AltUse)
|
else if (function == EngineKeyFunctions.UseSecondary)
|
||||||
_verbSystem.VerbMenu.OpenVerbMenu(uid, true);
|
_verbSystem.VerbMenu.OpenVerbMenu(uid, true);
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ namespace Content.Client.Administration.UI.CustomControls
|
|||||||
if (OverrideText != null && args.Button.Children.FirstOrDefault()?.Children?.FirstOrDefault() is Label label)
|
if (OverrideText != null && args.Button.Children.FirstOrDefault()?.Children?.FirstOrDefault() is Label label)
|
||||||
label.Text = GetText(selectedPlayer);
|
label.Text = GetText(selectedPlayer);
|
||||||
}
|
}
|
||||||
else if (args.Event.Function == EngineKeyFunctions.AltUse)
|
else if (args.Event.Function == EngineKeyFunctions.UseSecondary)
|
||||||
{
|
{
|
||||||
_verbSystem.VerbMenu.OpenVerbMenu(selectedPlayer.EntityUid);
|
_verbSystem.VerbMenu.OpenVerbMenu(selectedPlayer.EntityUid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ namespace Content.Client.ContextMenu.UI
|
|||||||
_cfg.OnValueChanged(CCVars.EntityMenuGroupingType, OnGroupingChanged, true);
|
_cfg.OnValueChanged(CCVars.EntityMenuGroupingType, OnGroupingChanged, true);
|
||||||
|
|
||||||
CommandBinds.Builder
|
CommandBinds.Builder
|
||||||
.Bind(EngineKeyFunctions.AltUse, new PointerInputCmdHandler(HandleOpenEntityMenu, outsidePrediction: true))
|
.Bind(EngineKeyFunctions.UseSecondary, new PointerInputCmdHandler(HandleOpenEntityMenu, outsidePrediction: true))
|
||||||
.Register<EntityMenuPresenter>();
|
.Register<EntityMenuPresenter>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ namespace Content.Client.ContextMenu.UI
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// open verb menu?
|
// open verb menu?
|
||||||
if (args.Function == EngineKeyFunctions.AltUse)
|
if (args.Function == EngineKeyFunctions.UseSecondary)
|
||||||
{
|
{
|
||||||
_verbSystem.VerbMenu.OpenVerbMenu(entity.Value);
|
_verbSystem.VerbMenu.OpenVerbMenu(entity.Value);
|
||||||
args.Handle();
|
args.Handle();
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ namespace Content.Client.Items.Managers
|
|||||||
_entitySystemManager.GetEntitySystem<ExamineSystem>()
|
_entitySystemManager.GetEntitySystem<ExamineSystem>()
|
||||||
.DoExamine(item.Value);
|
.DoExamine(item.Value);
|
||||||
}
|
}
|
||||||
else if (args.Function == EngineKeyFunctions.AltUse)
|
else if (args.Function == EngineKeyFunctions.UseSecondary)
|
||||||
{
|
{
|
||||||
_entitySystemManager.GetEntitySystem<VerbSystem>().VerbMenu.OpenVerbMenu(item.Value);
|
_entitySystemManager.GetEntitySystem<VerbSystem>().VerbMenu.OpenVerbMenu(item.Value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ namespace Content.Client.Options.UI.Tabs
|
|||||||
|
|
||||||
AddHeader("ui-options-header-interaction-basic");
|
AddHeader("ui-options-header-interaction-basic");
|
||||||
AddButton(EngineKeyFunctions.Use);
|
AddButton(EngineKeyFunctions.Use);
|
||||||
AddButton(EngineKeyFunctions.AltUse);
|
AddButton(EngineKeyFunctions.UseSecondary);
|
||||||
AddButton(ContentKeyFunctions.UseItemInHand);
|
AddButton(ContentKeyFunctions.UseItemInHand);
|
||||||
AddButton(ContentKeyFunctions.AltUseItemInHand);
|
AddButton(ContentKeyFunctions.AltUseItemInHand);
|
||||||
AddButton(ContentKeyFunctions.ActivateItemInWorld);
|
AddButton(ContentKeyFunctions.ActivateItemInWorld);
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ public sealed partial class MeleeWeaponSystem : SharedMeleeWeaponSystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
var useDown = _inputSystem.CmdStates.GetState(EngineKeyFunctions.Use);
|
var useDown = _inputSystem.CmdStates.GetState(EngineKeyFunctions.Use);
|
||||||
var altDown = _inputSystem.CmdStates.GetState(EngineKeyFunctions.AltUse);
|
var altDown = _inputSystem.CmdStates.GetState(EngineKeyFunctions.UseSecondary);
|
||||||
var currentTime = Timing.CurTime;
|
var currentTime = Timing.CurTime;
|
||||||
|
|
||||||
// Heavy attack.
|
// Heavy attack.
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ binds:
|
|||||||
type: State
|
type: State
|
||||||
key: MouseLeft
|
key: MouseLeft
|
||||||
canFocus: true
|
canFocus: true
|
||||||
- function: AltUse
|
- function: UseSecondary
|
||||||
type: State
|
type: State
|
||||||
key: MouseRight
|
key: MouseRight
|
||||||
canFocus: true
|
canFocus: true
|
||||||
|
|||||||
Reference in New Issue
Block a user