Fix action bar not filling with mappables (#17218)
* Fix action bar not filling with mappables * Update Content.Client/UserInterface/Systems/Actions/ActionUIController.cs --------- Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -157,6 +157,7 @@ public sealed class DecalPlacementSystem : EntitySystem
|
||||
DisplayName = $"{_decalId} ({_decalColor.ToHex()}, {(int) _decalAngle.Degrees})", // non-unique actions may be considered duplicates when saving/loading.
|
||||
Icon = decalProto.Sprite,
|
||||
Repeat = true,
|
||||
ClientExclusive = true,
|
||||
CheckCanAccess = false,
|
||||
CheckCanInteract = false,
|
||||
Range = -1,
|
||||
|
||||
@@ -84,6 +84,7 @@ public sealed partial class MappingSystem : EntitySystem
|
||||
|
||||
ev.Action = new InstantAction()
|
||||
{
|
||||
ClientExclusive = true,
|
||||
CheckCanInteract = false,
|
||||
Event = actionEvent,
|
||||
DisplayName = Loc.GetString(tileDef.Name),
|
||||
@@ -97,6 +98,7 @@ public sealed partial class MappingSystem : EntitySystem
|
||||
{
|
||||
ev.Action = new InstantAction()
|
||||
{
|
||||
ClientExclusive = true,
|
||||
CheckCanInteract = false,
|
||||
Event = actionEvent,
|
||||
DisplayName = "action-name-mapping-erase",
|
||||
@@ -111,6 +113,7 @@ public sealed partial class MappingSystem : EntitySystem
|
||||
|
||||
ev.Action = new InstantAction()
|
||||
{
|
||||
ClientExclusive = true,
|
||||
CheckCanInteract = false,
|
||||
Event = actionEvent,
|
||||
DisplayName = actionEvent.EntityType,
|
||||
|
||||
@@ -667,8 +667,19 @@ public sealed class ActionUIController : UIController, IOnStateChanged<GameplayS
|
||||
private void OnActionPressed(GUIBoundKeyEventArgs args, ActionButton button)
|
||||
{
|
||||
if (args.Function == EngineKeyFunctions.UIClick)
|
||||
{
|
||||
if (button.Action == null)
|
||||
{
|
||||
var ev = new FillActionSlotEvent();
|
||||
EntityManager.EventBus.RaiseEvent(EventSource.Local, ev);
|
||||
if (ev.Action != null)
|
||||
SetAction(button, ev.Action);
|
||||
}
|
||||
else
|
||||
{
|
||||
_menuDragHelper.MouseDown(button);
|
||||
}
|
||||
|
||||
args.Handle();
|
||||
}
|
||||
else if (args.Function == EngineKeyFunctions.UIRightClick)
|
||||
|
||||
Reference in New Issue
Block a user