Update dragon devour action icon (#20020)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -961,6 +961,8 @@ public sealed class ActionUIController : UIController, IOnStateChanged<GameplayS
|
|||||||
StopTargeting();
|
StopTargeting();
|
||||||
|
|
||||||
SelectingTargetFor = actionId;
|
SelectingTargetFor = actionId;
|
||||||
|
// TODO inform the server
|
||||||
|
action.Toggled = true;
|
||||||
|
|
||||||
// override "held-item" overlay
|
// override "held-item" overlay
|
||||||
var provider = action.Provider;
|
var provider = action.Provider;
|
||||||
@@ -977,6 +979,15 @@ public sealed class ActionUIController : UIController, IOnStateChanged<GameplayS
|
|||||||
handOverlay.IconOverride = _spriteSystem.Frame0(action.Icon);
|
handOverlay.IconOverride = _spriteSystem.Frame0(action.Icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_container != null)
|
||||||
|
{
|
||||||
|
foreach (var button in _container.GetButtons())
|
||||||
|
{
|
||||||
|
if (button.ActionId == actionId)
|
||||||
|
button.UpdateIcons();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: allow world-targets to check valid positions. E.g., maybe:
|
// TODO: allow world-targets to check valid positions. E.g., maybe:
|
||||||
// - Draw a red/green ghost entity
|
// - Draw a red/green ghost entity
|
||||||
// - Add a yes/no checkmark where the HandItemOverlay usually is
|
// - Add a yes/no checkmark where the HandItemOverlay usually is
|
||||||
@@ -1005,10 +1016,27 @@ public sealed class ActionUIController : UIController, IOnStateChanged<GameplayS
|
|||||||
if (SelectingTargetFor == null)
|
if (SelectingTargetFor == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
var oldAction = SelectingTargetFor;
|
||||||
|
if (_actionsSystem != null && _actionsSystem.TryGetActionData(oldAction, out var action))
|
||||||
|
{
|
||||||
|
// TODO inform the server
|
||||||
|
action.Toggled = false;
|
||||||
|
}
|
||||||
|
|
||||||
SelectingTargetFor = null;
|
SelectingTargetFor = null;
|
||||||
|
|
||||||
_targetOutline?.Disable();
|
_targetOutline?.Disable();
|
||||||
_interactionOutline?.SetEnabled(true);
|
_interactionOutline?.SetEnabled(true);
|
||||||
|
|
||||||
|
if (_container != null)
|
||||||
|
{
|
||||||
|
foreach (var button in _container.GetButtons())
|
||||||
|
{
|
||||||
|
if (button.ActionId == oldAction)
|
||||||
|
button.UpdateIcons();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!_overlays.TryGetOverlay<ShowHandItemOverlay>(out var handOverlay))
|
if (!_overlays.TryGetOverlay<ShowHandItemOverlay>(out var handOverlay))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -180,5 +180,6 @@
|
|||||||
noSpawn: true
|
noSpawn: true
|
||||||
components:
|
components:
|
||||||
- type: EntityTargetAction
|
- type: EntityTargetAction
|
||||||
icon: Interface/Actions/devour.png
|
icon: { sprite : Interface/Actions/devour.rsi, state: icon }
|
||||||
|
iconOn: { sprite : Interface/Actions/devour.rsi, state: icon-on }
|
||||||
event: !type:DevourActionEvent
|
event: !type:DevourActionEvent
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 473 B |
BIN
Resources/Textures/Interface/Actions/devour.rsi/icon-on.png
Normal file
BIN
Resources/Textures/Interface/Actions/devour.rsi/icon-on.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 617 B |
BIN
Resources/Textures/Interface/Actions/devour.rsi/icon.png
Normal file
BIN
Resources/Textures/Interface/Actions/devour.rsi/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 597 B |
17
Resources/Textures/Interface/Actions/devour.rsi/meta.json
Normal file
17
Resources/Textures/Interface/Actions/devour.rsi/meta.json
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"license": "CC0-1.0",
|
||||||
|
"copyright": "Created by EmoGarbage404 (github)",
|
||||||
|
"size": {
|
||||||
|
"x": 32,
|
||||||
|
"y": 32
|
||||||
|
},
|
||||||
|
"states": [
|
||||||
|
{
|
||||||
|
"name": "icon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "icon-on"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -25,9 +25,6 @@
|
|||||||
{
|
{
|
||||||
"name": "manifest"
|
"name": "manifest"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "devour"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "carp_summon"
|
"name": "carp_summon"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user