diff --git a/Content.Client/Actions/ActionIconVisualsSystem.cs b/Content.Client/Actions/ActionIconVisualsSystem.cs new file mode 100644 index 0000000000..fdaceecc4e --- /dev/null +++ b/Content.Client/Actions/ActionIconVisualsSystem.cs @@ -0,0 +1,31 @@ +using Content.Shared.Actions; +using Content.Shared.Actions.Components; +using Robust.Client.GameObjects; +using Robust.Shared.Utility; + +namespace Content.Client.Actions; + +public sealed partial class ActionIconVisualsSystem : VisualizerSystem +{ + protected override void OnAppearanceChange(EntityUid uid, ActionComponent comp, ref AppearanceChangeEvent args) + { + if (args.Sprite == null) + return; + + if (AppearanceSystem.TryGetData(uid, ActionState.DynamicIcon, out var icon, args.Component)) + { + if (icon is SpriteSpecifier.EntityPrototype) + SpriteSystem.LayerSetTexture((uid, args.Sprite), ActionVisuals.Icon, SpriteSystem.Frame0(icon)); + else + SpriteSystem.LayerSetSprite((uid, args.Sprite), ActionVisuals.Icon, icon); + } + + if (AppearanceSystem.TryGetData(uid, ActionState.Color, out var color, args.Component)) + { + SpriteSystem.LayerSetColor((uid, args.Sprite), ActionVisuals.Icon, color); + + if (SpriteSystem.LayerExists((uid, args.Sprite), ActionVisuals.IconToggled)) + SpriteSystem.LayerSetColor((uid, args.Sprite), ActionVisuals.IconToggled, color); + } + } +} diff --git a/Content.Client/Actions/ActionsSystem.cs b/Content.Client/Actions/ActionsSystem.cs index aac14a1420..8bab98c419 100644 --- a/Content.Client/Actions/ActionsSystem.cs +++ b/Content.Client/Actions/ActionsSystem.cs @@ -2,10 +2,10 @@ using System.IO; using System.Linq; using Content.Shared.Actions; using Content.Shared.Actions.Components; -using Content.Shared.Charges.Systems; using Content.Shared.Mapping; using Content.Shared.Maps; using JetBrains.Annotations; +using Robust.Client.GameObjects; using Robust.Client.Player; using Robust.Shared.ContentPack; using Robust.Shared.GameStates; @@ -27,11 +27,11 @@ namespace Content.Client.Actions { public delegate void OnActionReplaced(EntityUid actionId); - [Dependency] private SharedChargesSystem _sharedCharges = default!; [Dependency] private IPlayerManager _playerManager = default!; [Dependency] private IResourceManager _resources = default!; [Dependency] private MetaDataSystem _metaData = default!; [Dependency] private ISerializationManager _serialization = default!; + [Dependency] private SpriteSystem _sprite = default!; public event Action? OnActionAdded; public event Action? OnActionRemoved; @@ -68,8 +68,6 @@ namespace Content.Client.Actions public override void UpdateAction(Entity ent) { - // TODO: Decouple this. - ent.Comp.IconColor = _sharedCharges.GetCurrentCharges(ent.Owner) == 0 ? ent.Comp.DisabledIconColor : ent.Comp.OriginalIconColor; base.UpdateAction(ent); if (_playerManager.LocalEntity != ent.Comp.AttachedEntity) return; @@ -153,6 +151,16 @@ namespace Content.Client.Actions ActionsUpdated?.Invoke(); } + /// + /// True if this action has a distinct sprite layer to show while toggled, + /// rather than just highlighting whatever slot displays it. + /// + public bool HasToggleIcon(EntityUid? actionId) + { + return TryComp(actionId, out var sprite) + && _sprite.LayerExists((actionId.Value, sprite), ActionVisuals.IconToggled); + } + public IEnumerable> GetClientActions() { if (_playerManager.LocalEntity is not { } user) diff --git a/Content.Client/Charges/Systems/ChargesSystem.cs b/Content.Client/Charges/Systems/ChargesSystem.cs index 523a52bd76..6756281365 100644 --- a/Content.Client/Charges/Systems/ChargesSystem.cs +++ b/Content.Client/Charges/Systems/ChargesSystem.cs @@ -1,7 +1,5 @@ -using Content.Client.Actions; using Content.Client.Charges.UI; using Content.Client.Items; -using Content.Shared.Actions; using Content.Shared.Charges.Components; using Content.Shared.Charges.Systems; @@ -9,8 +7,6 @@ namespace Content.Client.Charges; public sealed partial class ChargesSystem : SharedChargesSystem { - [Dependency] private ActionsSystem _actions = default!; - private Dictionary _lastCharges = new(); private Dictionary _tempLastCharges = new(); @@ -33,14 +29,11 @@ public sealed partial class ChargesSystem : SharedChargesSystem while (query.MoveNext(out var uid, out var recharge, out var charges)) { - if (_actions.GetAction(uid, false) is not {} action) - continue; - var current = GetCurrentCharges((uid, charges, recharge)); if (!_lastCharges.TryGetValue(uid, out var last) || current != last) { - _actions.UpdateAction(action); + UpdateChargeVisuals((uid, charges, recharge)); } _tempLastCharges[uid] = current; diff --git a/Content.Client/Store/Ui/StoreMenu.xaml.cs b/Content.Client/Store/Ui/StoreMenu.xaml.cs index 5680addbca..ce53d69922 100644 --- a/Content.Client/Store/Ui/StoreMenu.xaml.cs +++ b/Content.Client/Store/Ui/StoreMenu.xaml.cs @@ -1,6 +1,5 @@ using System.Linq; using System.Text; -using Content.Client.Actions; using Content.Client.Message; using Content.Shared.FixedPoint; using Content.Shared.Store; @@ -10,6 +9,7 @@ using Robust.Client.Graphics; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.XAML; +using Robust.Shared.Graphics.RSI; using Robust.Shared.Prototypes; namespace Content.Client.Store.Ui; @@ -141,8 +141,8 @@ public sealed partial class StoreMenu : DefaultWindow else if (listing.ProductAction != null) { var actionId = _entityManager.Spawn(listing.ProductAction); - if (_entityManager.System().GetAction(actionId)?.Comp?.Icon is {} icon) - texture = spriteSys.Frame0(icon); + if (_entityManager.TryGetComponent(actionId, out SpriteComponent? actionSprite)) + texture = actionSprite.Icon?.GetFrame(RsiDirection.South, 0); } var listingInStock = GetListingPriceString(listing); diff --git a/Content.Client/UserInterface/Systems/Actions/ActionUIController.cs b/Content.Client/UserInterface/Systems/Actions/ActionUIController.cs index 0e4b8b1109..c8d67d27e3 100644 --- a/Content.Client/UserInterface/Systems/Actions/ActionUIController.cs +++ b/Content.Client/UserInterface/Systems/Actions/ActionUIController.cs @@ -49,7 +49,6 @@ public sealed partial class ActionUIController : UIController, IOnStateChanged _actions = new(); @@ -363,7 +362,7 @@ public sealed partial class ActionUIController : UIController, IOnStateChanged? Action { get; private set; } public bool Locked { get; set; } @@ -64,13 +61,12 @@ public sealed class ActionButton : Control, IEntityControl public event Action? ActionUnpressed; public event Action? ActionFocusExited; - public ActionButton(IEntityManager entities, SpriteSystem? spriteSys = null, ActionUIController? controller = null) + public ActionButton(IEntityManager entities, ActionUIController? controller = null) { // TODO why is this constructor so slooooow. The rest of the code is fine _entities = entities; _player = IoCManager.Resolve(); - _spriteSys = spriteSys; _controller = controller; MouseFilter = MouseFilterMode.Pass; @@ -85,19 +81,23 @@ public sealed class ActionButton : Control, IEntityControl MinSize = new Vector2(32, 32), Visible = false }; - _bigActionIcon = new TextureRect + _bigActionIcon = new SpriteView { + Name = "Big Action Icon", HorizontalExpand = true, VerticalExpand = true, - Stretch = StretchMode.Scale, - Visible = false + Scale = new Vector2(2, 2), + SetSize = new Vector2(64, 64), + Visible = false, + OverrideDirection = Direction.South, }; - _smallActionIcon = new TextureRect + _smallActionIcon = new SpriteView { + Name = "Small Action Icon", HorizontalAlignment = HAlignment.Right, VerticalAlignment = VAlignment.Bottom, - Stretch = StretchMode.Scale, - Visible = false + Visible = false, + OverrideDirection = Direction.South, }; Label = new Label { @@ -167,7 +167,6 @@ public sealed class ActionButton : Control, IEntityControl protected override void OnThemeUpdated() { base.OnThemeUpdated(); - _buttonBackgroundTexture = Theme.ResolveTexture("SlotBackground"); Label.FontColorOverride = Theme.ResolveColorOrSpecified("whiteText"); } @@ -253,61 +252,36 @@ public sealed class ActionButton : Control, IEntityControl } } - private void SetActionIcon(Texture? texture) + private void UpdateActionIcon() { - if (Action?.Comp is not {} action || texture == null) + if (Action?.Comp is not {} action || !_entities.HasComponent(Action.Value.Owner)) { - _bigActionIcon.Texture = null; _bigActionIcon.Visible = false; - _smallActionIcon.Texture = null; + _bigActionIcon.SetEntity(null); _smallActionIcon.Visible = false; + _smallActionIcon.SetEntity(null); } else if (action.EntityIcon != null && action.ItemIconStyle == ItemActionIconStyle.BigItem) { - _smallActionIcon.Texture = texture; - _smallActionIcon.Modulate = action.IconColor; _smallActionIcon.Visible = true; - _bigActionIcon.Texture = null; + _smallActionIcon.SetEntity(Action.Value.Owner); _bigActionIcon.Visible = false; + _bigActionIcon.SetEntity(null); } else { - _bigActionIcon.Texture = texture; - _bigActionIcon.Modulate = action.IconColor; _bigActionIcon.Visible = true; - _smallActionIcon.Texture = null; + _bigActionIcon.SetEntity(Action.Value.Owner); _smallActionIcon.Visible = false; + _smallActionIcon.SetEntity(null); } } public void UpdateIcons() { UpdateItemIcon(); + UpdateActionIcon(); UpdateBackground(); - - if (Action is not {} action) - { - SetActionIcon(null); - return; - } - - _controller ??= UserInterfaceManager.GetUIController(); - _spriteSys ??= _entities.System(); - var icon = action.Comp.Icon; - if (_controller.SelectingTargetFor == action || action.Comp.Toggled) - { - if (action.Comp.IconOn is {} iconOn) - icon = iconOn; - - if (action.Comp.BackgroundOn is {} background) - _buttonBackgroundTexture = _spriteSys.Frame0(background); - } - else - { - _buttonBackgroundTexture = Theme.ResolveTexture("SlotBackground"); - } - - SetActionIcon(icon != null ? _spriteSys.Frame0(icon) : null); } public void UpdateBackground() @@ -316,7 +290,7 @@ public sealed class ActionButton : Control, IEntityControl if (Action != null || _controller.IsDragging && GetPositionInParent() == Parent?.ChildCount - 1) { - Button.Texture = _buttonBackgroundTexture; + Button.Texture = Theme.ResolveTexture("SlotBackground"); } else { @@ -429,7 +403,8 @@ public sealed class ActionButton : Control, IEntityControl if (action.Toggled || _controller.SelectingTargetFor == Action?.Owner) { // when there's a toggle sprite, we're showing that sprite instead of highlighting this slot - SetOnlyStylePseudoClass(action.IconOn != null + _actionsSys ??= _entities.System(); + SetOnlyStylePseudoClass(_actionsSys.HasToggleIcon(Action?.Owner) ? ContainerButton.StylePseudoClassNormal : ContainerButton.StylePseudoClassPressed); return; diff --git a/Content.Shared/Actions/ActionVisuals.cs b/Content.Shared/Actions/ActionVisuals.cs new file mode 100644 index 0000000000..7dfecc3a59 --- /dev/null +++ b/Content.Shared/Actions/ActionVisuals.cs @@ -0,0 +1,32 @@ +using Robust.Shared.Serialization; + +namespace Content.Shared.Actions; + +/// +/// Sprite layer keys for action entities. +/// +[Serializable, NetSerializable] +public enum ActionVisuals : byte +{ + /// Layer key. The action's base icon. + Icon, + + /// Layer key. Optional, shown only while toggled on. + IconToggled, +} + +/// +/// Appearance data keys for action entities. +/// +[Serializable, NetSerializable] +public enum ActionState : byte +{ + /// Appearance key. Mirrors ActionComponent.Toggled. + Toggled, + + /// Appearance key. Runtime-assigned SpriteSpecifier, for actions with a dynamic icon. + DynamicIcon, + + /// Appearance key. Runtime-assigned tint override, e.g. decal-placement actions. + Color, +} diff --git a/Content.Shared/Actions/Components/ActionComponent.cs b/Content.Shared/Actions/Components/ActionComponent.cs index 8f9b7fa925..b837402816 100644 --- a/Content.Shared/Actions/Components/ActionComponent.cs +++ b/Content.Shared/Actions/Components/ActionComponent.cs @@ -4,7 +4,6 @@ using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; -using Robust.Shared.Utility; namespace Content.Shared.Actions.Components; @@ -16,46 +15,6 @@ namespace Content.Shared.Actions.Components; [EntityCategory("Actions")] public sealed partial class ActionComponent : Component { - /// - /// Icon representing this action in the UI. - /// - [DataField, AutoNetworkedField] - public SpriteSpecifier? Icon; - - /// - /// For toggle actions only, icon to show when toggled on. If omitted, the action will simply be highlighted - /// when turned on. - /// - [DataField, AutoNetworkedField] - public SpriteSpecifier? IconOn; - - /// - /// For toggle actions only, background to show when toggled on. - /// - [DataField] - public SpriteSpecifier? BackgroundOn; - - /// - /// If not null, this color will modulate the action icon color. - /// - /// - /// This currently only exists for decal-placement actions, so that the action icons correspond to the color of - /// the decal. But this is probably useful for other actions, including maybe changing color on toggle. - /// - [DataField, AutoNetworkedField] - public Color IconColor = Color.White; - - /// - /// The original this action was. - /// - [DataField, AutoNetworkedField] - public Color OriginalIconColor; - - /// - /// The color the action should turn to when disabled - /// - [DataField] public Color DisabledIconColor = Color.DimGray; - /// /// Keywords that can be used to search for this action in the action menu. /// @@ -69,7 +28,7 @@ public sealed partial class ActionComponent : Component public bool Enabled = true; /// - /// The toggle state of this action. Toggling switches the currently displayed icon, see and . + /// The toggle state of this action. Toggling switches the currently displayed icon layer. /// /// /// The toggle can set directly via , but it will also be diff --git a/Content.Shared/Actions/SharedActionsSystem.cs b/Content.Shared/Actions/SharedActionsSystem.cs index 04bac21472..051e067e74 100644 --- a/Content.Shared/Actions/SharedActionsSystem.cs +++ b/Content.Shared/Actions/SharedActionsSystem.cs @@ -28,6 +28,7 @@ public abstract partial class SharedActionsSystem : EntitySystem [Dependency] private ActionContainerSystem _actionContainer = default!; [Dependency] private EntityWhitelistSystem _whitelist = default!; [Dependency] private RotateToFaceSystem _rotateToFace = default!; + [Dependency] private SharedAppearanceSystem _appearance = default!; [Dependency] private SharedAudioSystem _audio = default!; [Dependency] private SharedInteractionSystem _interaction = default!; [Dependency] private SharedTransformSystem _transform = default!; @@ -78,9 +79,7 @@ public abstract partial class SharedActionsSystem : EntitySystem private void OnActionMapInit(Entity ent, ref MapInitEvent args) { - var comp = ent.Comp; - comp.OriginalIconColor = comp.IconColor; - DirtyField(ent, ent.Comp, nameof(ActionComponent.OriginalIconColor)); + _appearance.SetData(ent, ActionState.Toggled, ent.Comp.Toggled); } private void OnActionShutdown(Entity ent, ref ComponentShutdown args) @@ -236,6 +235,7 @@ public abstract partial class SharedActionsSystem : EntitySystem return; ent.Comp.Toggled = toggled; + _appearance.SetData(ent, ActionState.Toggled, toggled); UpdateAction(ent); DirtyField(ent, ent.Comp, nameof(ActionComponent.Toggled)); } @@ -974,29 +974,21 @@ public abstract partial class SharedActionsSystem : EntitySystem public void SetIcon(Entity ent, SpriteSpecifier? icon) { - if (!_actionQuery.Resolve(ent, ref ent.Comp) || ent.Comp.Icon == icon) + if (!_actionQuery.Resolve(ent, ref ent.Comp)) return; - ent.Comp.Icon = icon; - DirtyField(ent, ent.Comp, nameof(ActionComponent.Icon)); - } - - public void SetIconOn(Entity ent, SpriteSpecifier? iconOn) - { - if (!_actionQuery.Resolve(ent, ref ent.Comp) || ent.Comp.IconOn == iconOn) - return; - - ent.Comp.IconOn = iconOn; - DirtyField(ent, ent.Comp, nameof(ActionComponent.IconOn)); + if (icon == null) + _appearance.RemoveData(ent.Owner, ActionState.DynamicIcon); + else + _appearance.SetData(ent.Owner, ActionState.DynamicIcon, icon); } public void SetIconColor(Entity ent, Color color) { - if (!_actionQuery.Resolve(ent, ref ent.Comp) || ent.Comp.IconColor == color) + if (!_actionQuery.Resolve(ent, ref ent.Comp)) return; - ent.Comp.IconColor = color; - DirtyField(ent, ent.Comp, nameof(ActionComponent.IconColor)); + _appearance.SetData(ent.Owner, ActionState.Color, color); } /// diff --git a/Content.Shared/Charges/LimitedChargesState.cs b/Content.Shared/Charges/LimitedChargesState.cs new file mode 100644 index 0000000000..25f8cb7edc --- /dev/null +++ b/Content.Shared/Charges/LimitedChargesState.cs @@ -0,0 +1,13 @@ +using Robust.Shared.Serialization; + +namespace Content.Shared.Charges; + +/// +/// Appearance data keys for entities with LimitedCharges. +/// +[Serializable, NetSerializable] +public enum LimitedChargesState : byte +{ + /// True if current charges > 0. + HasCharges, +} diff --git a/Content.Shared/Charges/Systems/SharedChargesSystem.cs b/Content.Shared/Charges/Systems/SharedChargesSystem.cs index 2a7c998632..5a99b2bdf3 100644 --- a/Content.Shared/Charges/Systems/SharedChargesSystem.cs +++ b/Content.Shared/Charges/Systems/SharedChargesSystem.cs @@ -10,6 +10,7 @@ namespace Content.Shared.Charges.Systems; public abstract partial class SharedChargesSystem : EntitySystem { [Dependency] protected IGameTiming _timing = default!; + [Dependency] private SharedAppearanceSystem _appearance = default!; /* * Despite what a bunch of systems do you don't need to continuously tick linear number updates and can just derive it easily. @@ -87,6 +88,13 @@ public abstract partial class SharedChargesSystem : EntitySystem ent.Comp.LastUpdate = _timing.CurTime; Dirty(ent); + UpdateChargeVisuals((ent.Owner, ent.Comp, null)); + } + + protected void UpdateChargeVisuals(Entity entity) + { + var current = GetCurrentCharges(entity); + _appearance.SetData(entity.Owner, LimitedChargesState.HasCharges, current != 0); } [Pure] @@ -138,6 +146,7 @@ public abstract partial class SharedChargesSystem : EntitySystem action.Comp1.LastCharges = Math.Clamp(action.Comp1.LastCharges + addCharges, 0, action.Comp1.MaxCharges); Dirty(action.Owner, action.Comp1); + UpdateChargeVisuals(action); } public bool TryUseCharge(Entity entity) @@ -208,6 +217,7 @@ public abstract partial class SharedChargesSystem : EntitySystem action.Comp.LastCharges = adjusted; action.Comp.LastUpdate = _timing.CurTime; Dirty(action); + UpdateChargeVisuals((action.Owner, action.Comp, null)); } /// diff --git a/Resources/Prototypes/Actions/anomaly.yml b/Resources/Prototypes/Actions/anomaly.yml index 3c1d270870..22f2ae5598 100644 --- a/Resources/Prototypes/Actions/anomaly.yml +++ b/Resources/Prototypes/Actions/anomaly.yml @@ -6,6 +6,9 @@ components: - type: Action useDelay: 30 - icon: { sprite: Structures/Specific/anomaly.rsi, state: anom1 } + - type: Sprite + sprite: Structures/Specific/anomaly.rsi + layers: + - state: anom1 - type: InstantAction event: !type:ActionAnomalyPulseEvent diff --git a/Resources/Prototypes/Actions/borgs.yml b/Resources/Prototypes/Actions/borgs.yml index 59c008352c..339e501d4f 100644 --- a/Resources/Prototypes/Actions/borgs.yml +++ b/Resources/Prototypes/Actions/borgs.yml @@ -6,10 +6,11 @@ components: - type: Action itemIconStyle: NoItem - icon: - sprite: Interface/Actions/actions_borg.rsi - state: state-laws useDelay: 0.5 + - type: Sprite + sprite: Interface/Actions/actions_borg.rsi + layers: + - state: state-laws - type: InstantAction event: !type:ToggleLawsScreenEvent @@ -20,9 +21,10 @@ components: - type: Action itemIconStyle: NoItem - icon: - sprite: Interface/Actions/actions_borg.rsi - state: select-type useDelay: 0.5 + - type: Sprite + sprite: Interface/Actions/actions_borg.rsi + layers: + - state: select-type - type: InstantAction event: !type:BorgToggleSelectTypeEvent diff --git a/Resources/Prototypes/Actions/changeling.yml b/Resources/Prototypes/Actions/changeling.yml index 4a10e759db..d5864f781d 100644 --- a/Resources/Prototypes/Actions/changeling.yml +++ b/Resources/Prototypes/Actions/changeling.yml @@ -8,9 +8,10 @@ useDelay: 2 raiseOnAction: true itemIconStyle: BigAction - icon: - sprite: Interface/Actions/changeling.rsi - state: armblade + - type: Sprite + sprite: Interface/Actions/changeling.rsi + layers: + - state: armblade - type: InstantAction event: !type:OnRetractableItemActionEvent - type: RetractableItemAction @@ -30,9 +31,10 @@ useDelay: 60 # TODO: Short cooldown but chemical cost raiseOnAction: true checkCanInteract: false - icon: - sprite: Interface/Actions/changeling2.rsi - state: biodegrade + - type: Sprite + sprite: Interface/Actions/changeling2.rsi + layers: + - state: biodegrade - type: InstantAction event: !type:ChangelingBiodegradeActionEvent - type: ChangelingBiodegradeAbility @@ -43,10 +45,16 @@ description: Consume the essence of your victims and subsume their identity and mind into your own. components: - type: Action - icon: { sprite : Interface/Actions/changeling.rsi, state: "devour" } - iconOn: { sprite : Interface/Actions/changeling.rsi, state: "devour_on" } itemIconStyle: BigAction priority: 1 + - type: Sprite + sprite: Interface/Actions/changeling.rsi + layers: + - state: "devour" + map: ["enum.ActionVisuals.Icon"] + - state: "devour_on" + map: ["enum.ActionVisuals.IconToggled"] + visible: false - type: ActionRequireMouthUncovered - type: TargetAction - type: EntityTargetAction @@ -58,7 +66,10 @@ description: Transform and assume the identities of those you have devoured. components: - type: Action - icon: { sprite : Interface/Actions/changeling.rsi, state: "transform" } + - type: Sprite + sprite: Interface/Actions/changeling.rsi + layers: + - state: "transform" - type: InstantAction event: !type:ChangelingTransformActionEvent @@ -69,7 +80,10 @@ description: Opens the ability store. components: - type: Action - icon: { sprite : Interface/Actions/changeling2.rsi, state: "shop" } + - type: Sprite + sprite: Interface/Actions/changeling2.rsi + layers: + - state: "shop" - type: entity parent: BaseAction @@ -79,9 +93,10 @@ components: - type: Action itemIconStyle: BigAction - icon: - sprite: Interface/Actions/changeling2.rsi - state: mimicry + - type: Sprite + sprite: Interface/Actions/changeling2.rsi + layers: + - state: mimicry - type: InstantAction event: !type:VoiceMaskSetNameEvent @@ -92,12 +107,18 @@ description: Sneakily absorb the identity of unsuspecting victims. Does not grant DNA to your store or objective progress. components: - type: Action - icon: { sprite : Interface/Actions/changeling2.rsi, state: "extract_dna_off" } - iconOn: { sprite : Interface/Actions/changeling2.rsi, state: "extract_dna_on" } itemIconStyle: BigAction priority: 1 useDelay: 90 # TODO: Chemical cost, maybe this could be a DoAfter action? raiseOnUser: true + - type: Sprite + sprite: Interface/Actions/changeling2.rsi + layers: + - state: "extract_dna_off" + map: ["enum.ActionVisuals.Icon"] + - state: "extract_dna_on" + map: ["enum.ActionVisuals.IconToggled"] + visible: false - type: TargetAction - type: EntityTargetAction canTargetSelf: false @@ -135,9 +156,10 @@ useDelay: 60 # TODO: Chemical cost raiseOnAction: true itemIconStyle: BigAction - icon: - sprite: Interface/Actions/changeling2.rsi - state: blind_sting + - type: Sprite + sprite: Interface/Actions/changeling2.rsi + layers: + - state: blind_sting - type: EntityEffectAction effects: - !type:AddReagentToBloodstream @@ -154,9 +176,10 @@ useDelay: 60 # TODO: Chemical cost raiseOnAction: true itemIconStyle: BigAction - icon: - sprite: Interface/Actions/changeling2.rsi - state: cryogenic_sting + - type: Sprite + sprite: Interface/Actions/changeling2.rsi + layers: + - state: cryogenic_sting - type: EntityEffectAction effects: - !type:AddReagentToBloodstream @@ -173,9 +196,10 @@ useDelay: 180 # TODO: Chemical cost raiseOnAction: true itemIconStyle: BigAction - icon: - sprite: Interface/Actions/changeling2.rsi - state: lethal_sting + - type: Sprite + sprite: Interface/Actions/changeling2.rsi + layers: + - state: lethal_sting - type: EntityEffectAction effects: - !type:AddReagentToBloodstream @@ -192,9 +216,10 @@ useDelay: 90 # TODO: Chemical cost raiseOnAction: true itemIconStyle: BigAction - icon: - sprite: Interface/Actions/changeling2.rsi - state: hallucination_sting + - type: Sprite + sprite: Interface/Actions/changeling2.rsi + layers: + - state: hallucination_sting - type: EntityEffectAction effects: - !type:AddReagentToBloodstream @@ -217,9 +242,10 @@ checkCanInteract: false # You can transform if you are killed checkConsciousness: false itemIconStyle: BigAction - icon: - sprite: Interface/Actions/changeling2.rsi - state: last_resort + - type: Sprite + sprite: Interface/Actions/changeling2.rsi + layers: + - state: last_resort - type: InstantAction event: !type:ChangelingLastResortActionEvent - type: ChangelingLastResortAbility @@ -233,9 +259,10 @@ - type: Action useDelay: 10 itemIconStyle: BigAction - icon: - sprite: Interface/Actions/changeling2.rsi - state: take_over_corpse + - type: Sprite + sprite: Interface/Actions/changeling2.rsi + layers: + - state: take_over_corpse - type: EntityTargetAction event: !type:ChangelingTakeOverCorpseActionEvent - type: TargetAction @@ -248,9 +275,10 @@ components: - type: Action itemIconStyle: BigAction - icon: - sprite: Interface/Actions/changeling2.rsi - state: nv_on + - type: Sprite + sprite: Interface/Actions/changeling2.rsi + layers: + - state: nv_on - type: entity parent: BaseAction @@ -258,12 +286,13 @@ name: Screech description: We produce a deafening screech that weakens those around us. components: + - type: Sprite + sprite: Interface/Actions/changeling2.rsi + layers: + - state: screech - type: Action useDelay: 60 # unbalanced :godo: raiseOnAction: true - icon: - sprite: Interface/Actions/changeling2.rsi - state: screech - type: ScreechAction effects: - !type:MovementSpeedModifier diff --git a/Resources/Prototypes/Actions/crit.yml b/Resources/Prototypes/Actions/crit.yml index 8dd3e1ece3..66c0913e72 100644 --- a/Resources/Prototypes/Actions/crit.yml +++ b/Resources/Prototypes/Actions/crit.yml @@ -16,9 +16,10 @@ - type: Action startDelay: true useDelay: 10 - icon: - sprite: Mobs/Ghosts/ghost_human.rsi - state: icon + - type: Sprite + sprite: Mobs/Ghosts/ghost_human.rsi + layers: + - state: icon - type: InstantAction event: !type:CritSuccumbEvent @@ -30,9 +31,10 @@ components: - type: Action useDelay: 30 - icon: - sprite: Interface/Actions/actions_crit.rsi - state: fakedeath + - type: Sprite + sprite: Interface/Actions/actions_crit.rsi + layers: + - state: fakedeath - type: InstantAction event: !type:CritFakeDeathEvent @@ -43,8 +45,9 @@ description: Whisper your last words to anyone nearby, and then succumb to your fate. You only have 30 characters to work with. components: - type: Action - icon: - sprite: Interface/Actions/actions_crit.rsi - state: lastwords + - type: Sprite + sprite: Interface/Actions/actions_crit.rsi + layers: + - state: lastwords - type: InstantAction event: !type:CritLastWordsEvent diff --git a/Resources/Prototypes/Actions/diona.yml b/Resources/Prototypes/Actions/diona.yml index be127b61d1..778954b103 100644 --- a/Resources/Prototypes/Actions/diona.yml +++ b/Resources/Prototypes/Actions/diona.yml @@ -5,9 +5,10 @@ description: Split apart into 3 nymphs. components: - type: Action - icon: - sprite: Mobs/Species/Diona/organs.rsi - state: brain + - type: Sprite + sprite: Mobs/Species/Diona/organs.rsi + layers: + - state: brain - type: InstantAction event: !type:GibActionEvent {} @@ -19,8 +20,9 @@ components: - type: Action useDelay: 600 # Once every 10 minutes. Keep them dead for a fair bit before reforming - icon: - sprite: Mobs/Species/Diona/parts.rsi - state: full + - type: Sprite + sprite: Mobs/Species/Diona/parts.rsi + layers: + - state: full - type: InstantAction event: !type:ReformEvent {} diff --git a/Resources/Prototypes/Actions/internals.yml b/Resources/Prototypes/Actions/internals.yml index d3c1e95fc0..f0c6dbd9ac 100644 --- a/Resources/Prototypes/Actions/internals.yml +++ b/Resources/Prototypes/Actions/internals.yml @@ -6,11 +6,13 @@ components: - type: Action useDelay: 1 - icon: - sprite: Interface/Alerts/internals.rsi - state: internal2 - iconOn: - sprite: Interface/Alerts/internals.rsi - state: internal1 + - type: Sprite + sprite: Interface/Alerts/internals.rsi + layers: + - state: internal2 + map: ["enum.ActionVisuals.Icon"] + - state: internal1 + map: ["enum.ActionVisuals.IconToggled"] + visible: false - type: InstantAction event: !type:ToggleActionEvent diff --git a/Resources/Prototypes/Actions/mapping.yml b/Resources/Prototypes/Actions/mapping.yml index f944d715dd..ab14119009 100644 --- a/Resources/Prototypes/Actions/mapping.yml +++ b/Resources/Prototypes/Actions/mapping.yml @@ -21,7 +21,10 @@ id: BaseMappingSpawnAction # not abstract but the event has to be set in code components: - type: Action - icon: Tiles/cropped_parallax.png + - type: Sprite + layers: + - texture: Tiles/cropped_parallax.png + map: ["enum.ActionVisuals.Icon"] - type: InstantAction event: null # has to be set with SetEvent in MappingSystem @@ -31,7 +34,9 @@ name: Erase Entity components: - type: Action - icon: Interface/VerbIcons/delete.svg.192dpi.png + - type: Sprite + layers: + - texture: Interface/VerbIcons/delete.svg.192dpi.png - type: InstantAction event: !type:StartPlacementActionEvent eraser: true diff --git a/Resources/Prototypes/Actions/mech.yml b/Resources/Prototypes/Actions/mech.yml index 1db758fc97..3ef0bc6f4d 100644 --- a/Resources/Prototypes/Actions/mech.yml +++ b/Resources/Prototypes/Actions/mech.yml @@ -14,9 +14,10 @@ components: - type: Action useDelay: 0.5 - icon: - sprite: Interface/Actions/actions_mecha.rsi - state: mech_cycle_equip_on + - type: Sprite + sprite: Interface/Actions/actions_mecha.rsi + layers: + - state: mech_cycle_equip_on - type: InstantAction event: !type:MechToggleEquipmentEvent @@ -28,9 +29,10 @@ components: - type: Action useDelay: 1 - icon: - sprite: Interface/Actions/actions_mecha.rsi - state: mech_view_stats + - type: Sprite + sprite: Interface/Actions/actions_mecha.rsi + layers: + - state: mech_view_stats - type: InstantAction event: !type:MechOpenUiEvent @@ -41,8 +43,9 @@ description: Ejects the pilot from the mech components: - type: Action - icon: - sprite: Interface/Actions/actions_mecha.rsi - state: mech_eject + - type: Sprite + sprite: Interface/Actions/actions_mecha.rsi + layers: + - state: mech_eject - type: InstantAction event: !type:MechEjectPilotEvent diff --git a/Resources/Prototypes/Actions/ninja.yml b/Resources/Prototypes/Actions/ninja.yml index c1fcf8dd7a..12b38b3bd7 100644 --- a/Resources/Prototypes/Actions/ninja.yml +++ b/Resources/Prototypes/Actions/ninja.yml @@ -17,11 +17,12 @@ components: - type: Action useDelay: 0.5 - icon: - sprite: Objects/Weapons/Throwable/throwing_star.rsi - state: icon itemIconStyle: NoItem priority: -10 + - type: Sprite + sprite: Objects/Weapons/Throwable/throwing_star.rsi + layers: + - state: icon - type: InstantAction event: !type:CreateItemEvent {} @@ -33,11 +34,12 @@ components: - type: Action useDelay: 1 - icon: - sprite: Objects/Weapons/Melee/energykatana.rsi - state: icon itemIconStyle: NoItem priority: -11 + - type: Sprite + sprite: Objects/Weapons/Melee/energykatana.rsi + layers: + - state: icon - type: InstantAction event: !type:RecallKatanaEvent {} @@ -48,11 +50,12 @@ description: Disable any nearby technology with an electro-magnetic pulse. components: - type: Action - icon: - sprite: Objects/Weapons/Grenades/empgrenade.rsi - state: icon itemIconStyle: BigAction priority: -13 + - type: Sprite + sprite: Objects/Weapons/Grenades/empgrenade.rsi + layers: + - state: icon - type: InstantAction event: !type:NinjaEmpEvent {} @@ -77,15 +80,16 @@ description: Teleport to anywhere you can see, if your Energy Katana is in your hand. components: - type: Action - icon: - sprite: Objects/Magic/magicactions.rsi - state: blink itemIconStyle: NoItem sound: path: /Audio/Magic/blink.ogg params: volume: 5 priority: -12 + - type: Sprite + sprite: Objects/Magic/magicactions.rsi + layers: + - state: blink - type: TargetAction checkCanAccess: false range: 0 diff --git a/Resources/Prototypes/Actions/polymorph.yml b/Resources/Prototypes/Actions/polymorph.yml index 398e61a8e3..61273a50d8 100644 --- a/Resources/Prototypes/Actions/polymorph.yml +++ b/Resources/Prototypes/Actions/polymorph.yml @@ -32,9 +32,10 @@ description: Polymorphs you into a Spider. components: - type: Action - icon: - sprite: Mobs/Animals/spider.rsi - state: tarantula + - type: Sprite + sprite: Mobs/Animals/spider.rsi + layers: + - state: tarantula - type: InstantAction event: !type:PolymorphActionEvent protoId: WizardSpider @@ -46,9 +47,10 @@ description: CLANG! components: - type: Action - icon: - sprite: Objects/Fun/immovable_rod.rsi - state: icon + - type: Sprite + sprite: Objects/Fun/immovable_rod.rsi + layers: + - state: icon - type: InstantAction event: !type:PolymorphActionEvent protoId: WizardRod @@ -62,9 +64,10 @@ - type: Magic - type: Action useDelay: 30 - icon: - sprite: Objects/Magic/magicactions.rsi - state: jaunt + - type: Sprite + sprite: Objects/Magic/magicactions.rsi + layers: + - state: jaunt - type: InstantAction event: !type:PolymorphActionEvent protoId: Jaunt diff --git a/Resources/Prototypes/Actions/revenant.yml b/Resources/Prototypes/Actions/revenant.yml index ef80480a96..8fabccd271 100644 --- a/Resources/Prototypes/Actions/revenant.yml +++ b/Resources/Prototypes/Actions/revenant.yml @@ -12,8 +12,10 @@ components: - type: Action useDelay: 15 - icon: Interface/Actions/defile.png itemIconStyle: BigAction + - type: Sprite + layers: + - texture: Interface/Actions/defile.png - type: InstantAction event: !type:RevenantDefileActionEvent @@ -24,9 +26,11 @@ description: Costs 40 Essence. components: - type: Action - icon: Interface/Actions/overloadlight.png useDelay: 20 itemIconStyle: BigAction + - type: Sprite + layers: + - texture: Interface/Actions/overloadlight.png - type: InstantAction event: !type:RevenantOverloadLightsActionEvent @@ -49,8 +53,10 @@ description: Costs 60 Essence. components: - type: Action - icon: Interface/Actions/malfunction.png useDelay: 20 itemIconStyle: BigAction + - type: Sprite + layers: + - texture: Interface/Actions/malfunction.png - type: InstantAction event: !type:RevenantMalfunctionActionEvent diff --git a/Resources/Prototypes/Actions/spider.yml b/Resources/Prototypes/Actions/spider.yml index da3785ed84..32b2bbbee6 100644 --- a/Resources/Prototypes/Actions/spider.yml +++ b/Resources/Prototypes/Actions/spider.yml @@ -5,8 +5,10 @@ description: Spawns a web that slows your prey down. components: - type: Action - icon: Interface/Actions/web.png useDelay: 25 + - type: Sprite + layers: + - texture: Interface/Actions/web.png - type: InstantAction event: !type:SpiderWebActionEvent @@ -17,7 +19,9 @@ description: Weave a bit of silk for use in arts and crafts. components: - type: Action - icon: Interface/Actions/web.png useDelay: 1 + - type: Sprite + layers: + - texture: Interface/Actions/web.png - type: InstantAction event: !type:SericultureActionEvent diff --git a/Resources/Prototypes/Actions/station_ai.yml b/Resources/Prototypes/Actions/station_ai.yml index 9e9bc9f650..ab57b36fdb 100644 --- a/Resources/Prototypes/Actions/station_ai.yml +++ b/Resources/Prototypes/Actions/station_ai.yml @@ -8,9 +8,10 @@ - type: Action priority: -9 itemIconStyle: BigAction - icon: - sprite: Interface/Actions/actions_ai.rsi - state: ai_core + - type: Sprite + sprite: Interface/Actions/actions_ai.rsi + layers: + - state: ai_core - type: InstantAction event: !type:JumpToCoreEvent @@ -23,9 +24,10 @@ - type: Action priority: -3 itemIconStyle: NoItem - icon: - sprite: Interface/Actions/actions_ai.rsi - state: state_laws useDelay: 0.5 + - type: Sprite + sprite: Interface/Actions/actions_ai.rsi + layers: + - state: state_laws - type: InstantAction event: !type:ToggleLawsScreenEvent diff --git a/Resources/Prototypes/Actions/types.yml b/Resources/Prototypes/Actions/types.yml index 6686da2835..26117feb6a 100644 --- a/Resources/Prototypes/Actions/types.yml +++ b/Resources/Prototypes/Actions/types.yml @@ -6,6 +6,26 @@ id: BaseAction components: - type: Action + - type: Sprite + layers: + - map: ["enum.ActionVisuals.Icon"] + - type: Appearance + - type: GenericVisualizer + visuals: + enum.ActionState.Toggled: + enum.ActionVisuals.Icon: + True: { visible: false } + False: { visible: true } + enum.ActionVisuals.IconToggled: + True: { visible: true } + False: { visible: false } + enum.LimitedChargesState.HasCharges: + enum.ActionVisuals.Icon: + True: { color: White } + False: { color: DimGray } + enum.ActionVisuals.IconToggled: + True: { color: White } + False: { color: DimGray } # base proto for an action that requires a DoAfter - type: entity @@ -59,8 +79,10 @@ components: - type: Action useDelay: 10 - icon: Interface/Actions/scream.png checkCanInteract: false + - type: Sprite + layers: + - texture: Interface/Actions/scream.png - type: InstantAction event: !type:EmoteActionEvent emote: Scream @@ -72,7 +94,9 @@ description: Succumb to your infection and become a zombie. components: - type: Action - icon: Interface/Actions/zombie-turn.png + - type: Sprite + layers: + - texture: Interface/Actions/zombie-turn.png - type: InstantAction event: !type:ZombifySelfActionEvent @@ -84,8 +108,14 @@ components: - type: Action useDelay: 1 - icon: { sprite: Objects/Tools/flashlight.rsi, state: flashlight } - iconOn: { sprite: Objects/Tools/flashlight.rsi, state: flashlight-on } + - type: Sprite + sprite: Objects/Tools/flashlight.rsi + layers: + - state: flashlight + map: ["enum.ActionVisuals.Icon"] + - state: flashlight-on + map: ["enum.ActionVisuals.IconToggled"] + visible: false - type: entity parent: BaseAction @@ -96,10 +126,11 @@ - type: Action itemIconStyle: BigAction priority: -20 - icon: - sprite: Clothing/Back/Backpacks/backpack.rsi - state: icon useDelay: 1 + - type: Sprite + sprite: Clothing/Back/Backpacks/backpack.rsi + layers: + - state: icon - type: InstantAction event: !type:OpenStorageImplantEvent @@ -113,9 +144,10 @@ - type: Action itemIconStyle: BigAction priority: -20 - icon: - sprite: Actions/Implants/implants.rsi - state: explosive + - type: Sprite + sprite: Actions/Implants/implants.rsi + layers: + - state: explosive - type: entity parent: [BaseSuicideAction, BaseImplantAction] @@ -126,9 +158,10 @@ - type: Action itemIconStyle: BigAction priority: -20 - icon: - sprite: Objects/Magic/magicactions.rsi - state: gib + - type: Sprite + sprite: Objects/Magic/magicactions.rsi + layers: + - state: gib - type: entity parent: BaseImplantAction @@ -142,9 +175,11 @@ checkCanInteract: false itemIconStyle: BigAction priority: -20 - icon: - sprite: Actions/Implants/implants.rsi - state: freedom + - type: Sprite + sprite: Actions/Implants/implants.rsi + layers: + - state: freedom + map: ["enum.ActionVisuals.Icon"] - type: entity parent: BaseAction @@ -155,9 +190,10 @@ - type: Action itemIconStyle: BigAction priority: -20 - icon: - sprite: Objects/Devices/communication.rsi - state: old-radio + - type: Sprite + sprite: Objects/Devices/communication.rsi + layers: + - state: old-radio - type: InstantAction event: !type:OpenUplinkImplantEvent @@ -174,9 +210,11 @@ useDelay: 5 itemIconStyle: BigAction priority: -20 - icon: - sprite: Objects/Weapons/Grenades/empgrenade.rsi - state: icon + - type: Sprite + sprite: Objects/Weapons/Grenades/empgrenade.rsi + layers: + - state: icon + map: ["enum.ActionVisuals.Icon"] - type: entity parent: BaseImplantAction @@ -191,9 +229,11 @@ useDelay: 5 itemIconStyle: BigAction priority: -20 - icon: - sprite: Structures/Specific/anomaly.rsi - state: anom4 + - type: Sprite + sprite: Structures/Specific/anomaly.rsi + layers: + - state: anom4 + map: ["enum.ActionVisuals.Icon"] - type: entity parent: BaseImplantAction @@ -208,9 +248,11 @@ - type: Action itemIconStyle: BigAction priority: -20 - icon: - sprite: Clothing/OuterClothing/Hardsuits/lingspacesuit.rsi - state: icon + - type: Sprite + sprite: Clothing/OuterClothing/Hardsuits/lingspacesuit.rsi + layers: + - state: icon + map: ["enum.ActionVisuals.Icon"] - type: entity parent: BaseAction @@ -231,9 +273,14 @@ description: Enter combat mode components: - type: Action - icon: Interface/Actions/harmOff.png - iconOn: Interface/Actions/harm.png priority: -100 + - type: Sprite + layers: + - texture: Interface/Actions/harmOff.png + map: ["enum.ActionVisuals.Icon"] + - texture: Interface/Actions/harm.png + map: ["enum.ActionVisuals.IconToggled"] + visible: false - type: InstantAction event: !type:ToggleCombatActionEvent @@ -252,7 +299,10 @@ description: Change the name others hear to something else. components: - type: Action - icon: { sprite: Interface/Actions/voice-mask.rsi, state: icon } + - type: Sprite + sprite: Interface/Actions/voice-mask.rsi + layers: + - state: icon - type: InstantAction event: !type:VoiceMaskSetNameEvent @@ -263,7 +313,10 @@ description: Spray water towards your enemies. components: - type: Action - icon: { sprite: Clothing/Neck/Misc/pins.rsi, state: flower } + - type: Sprite + sprite: Clothing/Neck/Misc/pins.rsi + layers: + - state: flower - type: InstantAction event: !type:SprayLiquidEvent @@ -285,8 +338,14 @@ description: Raise or lower your shield. components: - type: Action - icon: { sprite: Objects/Weapons/Melee/shields.rsi, state: teleriot-icon } - iconOn: { sprite: Objects/Weapons/Melee/shields.rsi, state: teleriot-on } + - type: Sprite + sprite: Objects/Weapons/Melee/shields.rsi + layers: + - state: teleriot-icon + map: ["enum.ActionVisuals.Icon"] + - state: teleriot-on + map: ["enum.ActionVisuals.IconToggled"] + visible: false - type: entity parent: BaseMentalAction @@ -297,7 +356,10 @@ - type: Action clientExclusive: true temporary: true - icon: { sprite: Objects/Tools/multitool.rsi, state: icon } + - type: Sprite + sprite: Objects/Tools/multitool.rsi + layers: + - state: icon - type: InstantAction event: !type:ClearAllOverlaysEvent @@ -308,8 +370,11 @@ description: Uses hunger to lay an egg. components: - type: Action - icon: { sprite: Objects/Consumable/Food/egg.rsi, state: icon } useDelay: 60 + - type: Sprite + sprite: Objects/Consumable/Food/egg.rsi + layers: + - state: icon - type: InstantAction event: !type:EggLayInstantActionEvent @@ -320,7 +385,10 @@ description: Go to sleep. components: - type: Action - icon: { sprite: Clothing/Head/Hats/pyjamasyndicatered.rsi, state: icon } + - type: Sprite + sprite: Clothing/Head/Hats/pyjamasyndicatered.rsi + layers: + - state: icon - type: InstantAction event: !type:SleepActionEvent @@ -333,7 +401,10 @@ - type: Action startDelay: true useDelay: 2 - icon: { sprite: Clothing/Head/Hats/pyjamasyndicatered.rsi, state: icon } + - type: Sprite + sprite: Clothing/Head/Hats/pyjamasyndicatered.rsi + layers: + - state: icon - type: InstantAction event: !type:WakeActionEvent @@ -344,8 +415,11 @@ description: Activates your honking implant, which will produce the signature sound of the clown. components: - type: Action - icon: { sprite: Objects/Fun/bikehorn.rsi, state: icon } useDelay: 1 + - type: Sprite + sprite: Objects/Fun/bikehorn.rsi + layers: + - state: icon - type: entity parent: BaseAction @@ -356,7 +430,9 @@ - type: Action priority: -1 useDelay: 30 - icon: Interface/Actions/firestarter.png + - type: Sprite + layers: + - texture: Interface/Actions/firestarter.png - type: InstantAction event: !type:FireStarterActionEvent @@ -367,9 +443,14 @@ description: Close your eyes to protect your peepers, or open your eyes to enjoy the pretty lights. components: - type: Action - icon: Interface/Actions/eyeopen.png - iconOn: Interface/Actions/eyeclose.png useDelay: 1 # so u cant give yourself and observers eyestrain by rapidly spamming the action + - type: Sprite + layers: + - texture: Interface/Actions/eyeopen.png + map: ["enum.ActionVisuals.Icon"] + - texture: Interface/Actions/eyeclose.png + map: ["enum.ActionVisuals.IconToggled"] + visible: false - type: InstantAction event: !type:ToggleEyesActionEvent @@ -380,11 +461,13 @@ description: Start or stop wagging your tail. components: - type: Action - icon: { sprite: Mobs/Customization/reptilian_parts.rsi, state: tail_smooth_behind } - iconOn: { sprite: Mobs/Customization/reptilian_parts.rsi, state: tail_smooth_behind } itemIconStyle: NoItem useDelay: 1 # emote spam checkCanInteract: false + - type: Sprite + sprite: Mobs/Customization/reptilian_parts.rsi + layers: + - state: tail_smooth_behind - type: entity parent: BaseAction @@ -393,11 +476,17 @@ description: Turn the Fake Mindshield implant's transmission on/off components: - type: Action - icon: { sprite: Interface/Actions/actions_fakemindshield.rsi, state: icon } - iconOn: { sprite: Interface/Actions/actions_fakemindshield.rsi, state: icon-on } itemIconStyle: NoItem useDelay: 1 raiseOnUser: true + - type: Sprite + sprite: Interface/Actions/actions_fakemindshield.rsi + layers: + - state: icon + map: ["enum.ActionVisuals.Icon"] + - state: icon-on + map: ["enum.ActionVisuals.IconToggled"] + visible: false - type: InstantAction event: !type:FakeMindShieldToggleEvent - type: Tag @@ -411,11 +500,12 @@ description: Toggles the paramedic siren on and off. components: - type: Action - icon: - sprite: Clothing/OuterClothing/Hardsuits/paramed.rsi - state: icon-siren useDelay: 1 itemIconStyle: BigAction + - type: Sprite + sprite: Clothing/OuterClothing/Hardsuits/paramed.rsi + layers: + - state: icon-siren - type: entity parent: BaseAction @@ -425,9 +515,10 @@ components: - type: Action useDelay: 2 - icon: - sprite: Interface/Actions/night_vision.rsi - state: icon + - type: Sprite + sprite: Interface/Actions/night_vision.rsi + layers: + - state: icon - type: InstantAction event: !type:ToggleNightVisionEvent {} @@ -436,10 +527,12 @@ id: ActionToggleWaggingVulpkanin components: - type: Action - icon: { sprite: Mobs/Customization/Vulpkanin/tail_markings.rsi, state: tail-wag-icon } - iconOn: { sprite: Mobs/Customization/Vulpkanin/tail_markings.rsi, state: tail-wag-icon } itemIconStyle: NoItem useDelay: 1 # Prevents Emote Spam + - type: Sprite + sprite: Mobs/Customization/Vulpkanin/tail_markings.rsi + layers: + - state: tail-wag-icon - type: entity parent: BaseAction @@ -449,9 +542,10 @@ components: - type: Action useDelay: 8 - icon: - sprite: Interface/Actions/jump.rsi - state: icon + - type: Sprite + sprite: Interface/Actions/jump.rsi + layers: + - state: icon - type: InstantAction event: !type:GravityJumpEvent {} @@ -462,9 +556,10 @@ components: - type: Action useDelay: 16 - icon: - sprite: Interface/Actions/actions_borg.rsi - state: xenoborg-jump-module + - type: Sprite + sprite: Interface/Actions/actions_borg.rsi + layers: + - state: xenoborg-jump-module - type: entity parent: BaseAction @@ -474,9 +569,10 @@ components: - type: Action useDelay: 12 - icon: - sprite: Interface/Actions/jump.rsi - state: icon + - type: Sprite + sprite: Interface/Actions/jump.rsi + layers: + - state: icon - type: InstantAction event: !type:GravityJumpEvent {} @@ -487,10 +583,11 @@ description: Begin or stop being rooted to the floor. components: - type: Action - icon: Interface/Actions/rooting.png - iconOn: Interface/Actions/rooting.png itemIconStyle: NoItem useDelay: 1 + - type: Sprite + layers: + - texture: Interface/Actions/rooting.png - type: entity id: ActionChameleonController @@ -499,8 +596,11 @@ components: - type: Action priority: -20 - icon: { sprite: Actions/Implants/implants.rsi, state: chameleon } itemIconStyle: BigAction + - type: Sprite + sprite: Actions/Implants/implants.rsi + layers: + - state: chameleon - type: InstantAction event: !type:ChameleonControllerOpenMenuEvent @@ -511,7 +611,9 @@ description: Opens the store components: - type: Action - icon: Interface/Actions/shop.png + - type: Sprite + layers: + - texture: Interface/Actions/shop.png - type: InstantAction event: !type:IntrinsicStoreActionEvent @@ -520,5 +622,8 @@ id: ActionChangeVoiceMaskImplant components: - type: Action - icon: { sprite: Interface/Actions/voice-mask.rsi, state: icon } itemIconStyle: BigAction + - type: Sprite + sprite: Interface/Actions/voice-mask.rsi + layers: + - state: icon diff --git a/Resources/Prototypes/Entities/Clothing/Masks/base_clothingmask.yml b/Resources/Prototypes/Entities/Clothing/Masks/base_clothingmask.yml index f0bbac31e5..d85b977d91 100644 --- a/Resources/Prototypes/Entities/Clothing/Masks/base_clothingmask.yml +++ b/Resources/Prototypes/Entities/Clothing/Masks/base_clothingmask.yml @@ -26,8 +26,14 @@ description: Handy, but prevents insertion of pie into your pie hole. components: - type: Action - icon: { sprite: Clothing/Mask/gas.rsi, state: icon } - iconOn: Interface/Default/blocked.png + - type: Sprite + sprite: Clothing/Mask/gas.rsi + layers: + - state: icon + map: ["enum.ActionVisuals.Icon"] + - texture: Interface/Default/blocked.png + map: ["enum.ActionVisuals.IconToggled"] + visible: false - type: InstantAction event: !type:ToggleMaskEvent diff --git a/Resources/Prototypes/Entities/Clothing/Neck/misc.yml b/Resources/Prototypes/Entities/Clothing/Neck/misc.yml index 60ea7c49ec..ce39667297 100644 --- a/Resources/Prototypes/Entities/Clothing/Neck/misc.yml +++ b/Resources/Prototypes/Entities/Clothing/Neck/misc.yml @@ -22,12 +22,13 @@ name: Listen with stethoscope components: - type: Action - icon: - sprite: Clothing/Neck/Misc/stethoscope.rsi - state: icon priority: -1 itemIconStyle: BigAction checkCanInteract: false + - type: Sprite + sprite: Clothing/Neck/Misc/stethoscope.rsi + layers: + - state: icon - type: TargetAction - type: EntityTargetAction event: !type:StethoscopeActionEvent diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/asteroid.yml b/Resources/Prototypes/Entities/Mobs/NPCs/asteroid.yml index 6ee68e56c2..c4e2649550 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/asteroid.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/asteroid.yml @@ -101,15 +101,17 @@ components: - type: Action raiseOnUser: true - icon: - sprite: Mobs/Aliens/Asteroid/goliath.rsi - state: goliath_tentacle_spawn - iconOn: - sprite: Mobs/Aliens/Asteroid/goliath.rsi - state: goliath_tentacle_wiggle sound: path: "/Audio/Weapons/slash.ogg" useDelay: 8 + - type: Sprite + sprite: Mobs/Aliens/Asteroid/goliath.rsi + layers: + - state: goliath_tentacle_spawn + map: ["enum.ActionVisuals.Icon"] + - state: goliath_tentacle_wiggle + map: ["enum.ActionVisuals.IconToggled"] + visible: false - type: TargetAction range: 10 - type: WorldTargetAction diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml b/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml index cc08ff8f08..e9e761735c 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml @@ -324,9 +324,10 @@ components: - type: Action useDelay: 4 - icon: - sprite: Interface/Actions/actions_rat_king.rsi - state: ratKingArmy + - type: Sprite + sprite: Interface/Actions/actions_rat_king.rsi + layers: + - state: ratKingArmy - type: InstantAction event: !type:RatKingRaiseArmyActionEvent @@ -338,9 +339,10 @@ components: - type: Action useDelay: 6 - icon: - sprite: Interface/Actions/actions_rat_king.rsi - state: ratKingDomain + - type: Sprite + sprite: Interface/Actions/actions_rat_king.rsi + layers: + - state: ratKingDomain - type: InstantAction event: !type:RatKingDomainActionEvent @@ -352,13 +354,15 @@ components: - type: Action useDelay: 1 - icon: - sprite: Interface/Actions/actions_rat_king.rsi - state: stayOff - iconOn: - sprite: Interface/Actions/actions_rat_king.rsi - state: stay priority: 5 + - type: Sprite + sprite: Interface/Actions/actions_rat_king.rsi + layers: + - state: stayOff + map: ["enum.ActionVisuals.Icon"] + - state: stay + map: ["enum.ActionVisuals.IconToggled"] + visible: false - type: InstantAction event: !type:RatKingOrderActionEvent type: Stay @@ -371,13 +375,15 @@ components: - type: Action useDelay: 1 - icon: - sprite: Interface/Actions/actions_rat_king.rsi - state: followOff - iconOn: - sprite: Interface/Actions/actions_rat_king.rsi - state: follow priority: 6 + - type: Sprite + sprite: Interface/Actions/actions_rat_king.rsi + layers: + - state: followOff + map: ["enum.ActionVisuals.Icon"] + - state: follow + map: ["enum.ActionVisuals.IconToggled"] + visible: false - type: InstantAction event: !type:RatKingOrderActionEvent type: Follow @@ -390,13 +396,15 @@ components: - type: Action useDelay: 1 - icon: - sprite: Interface/Actions/actions_rat_king.rsi - state: attackOff - iconOn: - sprite: Interface/Actions/actions_rat_king.rsi - state: attack priority: 7 + - type: Sprite + sprite: Interface/Actions/actions_rat_king.rsi + layers: + - state: attackOff + map: ["enum.ActionVisuals.Icon"] + - state: attack + map: ["enum.ActionVisuals.IconToggled"] + visible: false - type: InstantAction event: !type:RatKingOrderActionEvent type: CheeseEm @@ -409,13 +417,15 @@ components: - type: Action useDelay: 1 - icon: - sprite: Interface/Actions/actions_rat_king.rsi - state: looseOff - iconOn: - sprite: Interface/Actions/actions_rat_king.rsi - state: loose priority: 8 + - type: Sprite + sprite: Interface/Actions/actions_rat_king.rsi + layers: + - state: looseOff + map: ["enum.ActionVisuals.Icon"] + - state: loose + map: ["enum.ActionVisuals.IconToggled"] + visible: false - type: InstantAction event: !type:RatKingOrderActionEvent diff --git a/Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml b/Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml index 25d77a0112..be06e22ab4 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml @@ -122,10 +122,16 @@ id: BaseAGhostAction components: - type: Action - icon: { sprite: Structures/Machines/parts.rsi, state: box_0 } - iconOn: { sprite: Structures/Machines/parts.rsi, state: box_2 } keywords: [ "AI", "console", "interface" ] priority: -10 + - type: Sprite + sprite: Structures/Machines/parts.rsi + layers: + - state: box_0 + map: ["enum.ActionVisuals.Icon"] + - state: box_2 + map: ["enum.ActionVisuals.IconToggled"] + visible: false - type: entity parent: BaseAGhostAction @@ -143,10 +149,12 @@ description: View a Communications Interface. components: - type: Action - icon: { sprite: Interface/Actions/actions_ai.rsi, state: comms_console } - iconOn: { sprite: Interface/Actions/actions_ai.rsi, state: comms_console } keywords: [ "AI", "console", "interface" ] priority: -4 + - type: Sprite + sprite: Interface/Actions/actions_ai.rsi + layers: + - state: comms_console - type: InstantAction event: !type:ToggleIntrinsicUIEvent { key: enum.CommunicationsConsoleUiKey.Key } @@ -157,10 +165,16 @@ description: View a Mass Scanner Interface. components: - type: Action - icon: { sprite: Interface/Actions/actions_ai.rsi, state: mass_scanner } - iconOn: { sprite: Interface/Actions/actions_ai.rsi, state: comms_console } keywords: [ "AI", "console", "interface" ] priority: -6 + - type: Sprite + sprite: Interface/Actions/actions_ai.rsi + layers: + - state: mass_scanner + map: ["enum.ActionVisuals.Icon"] + - state: comms_console + map: ["enum.ActionVisuals.IconToggled"] + visible: false - type: InstantAction event: !type:ToggleIntrinsicUIEvent { key: enum.RadarConsoleUiKey.Key } @@ -180,10 +194,12 @@ description: View a Crew Monitoring Interface. components: - type: Action - icon: { sprite: Interface/Actions/actions_ai.rsi, state: crew_monitor } - iconOn: { sprite: Interface/Actions/actions_ai.rsi, state: crew_monitor } keywords: [ "AI", "console", "interface" ] priority: -8 + - type: Sprite + sprite: Interface/Actions/actions_ai.rsi + layers: + - state: crew_monitor - type: InstantAction event: !type:ToggleIntrinsicUIEvent { key: enum.CrewMonitoringUIKey.Key } @@ -194,9 +210,11 @@ description: View a Station Records Interface. components: - type: Action - icon: { sprite: Interface/Actions/actions_ai.rsi, state: station_records } - iconOn: { sprite: Interface/Actions/actions_ai.rsi, state: station_records } keywords: [ "AI", "console", "interface" ] priority: -7 + - type: Sprite + sprite: Interface/Actions/actions_ai.rsi + layers: + - state: station_records - type: InstantAction event: !type:ToggleIntrinsicUIEvent { key: enum.GeneralStationRecordConsoleKey.Key } diff --git a/Resources/Prototypes/Entities/Mobs/Player/dragon.yml b/Resources/Prototypes/Entities/Mobs/Player/dragon.yml index 9a2c187c4e..df74c3a6d8 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/dragon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/dragon.yml @@ -216,11 +216,12 @@ description: Summons a carp rift that will periodically spawns carps. components: - type: Action - icon: - sprite: Interface/Actions/carp_rift.rsi - state: icon useDelay: 1 priority: 3 + - type: Sprite + sprite: Interface/Actions/carp_rift.rsi + layers: + - state: icon - type: InstantAction event: !type:DragonSpawnRiftActionEvent @@ -231,10 +232,16 @@ description: Attempt to break a structure with your jaws or swallow a creature. components: - type: Action - icon: { sprite : Interface/Actions/devour.rsi, state: icon } - iconOn: { sprite : Interface/Actions/devour.rsi, state: icon-on } itemIconStyle: BigAction priority: 1 + - type: Sprite + sprite: Interface/Actions/devour.rsi + layers: + - state: icon + map: ["enum.ActionVisuals.Icon"] + - state: icon-on + map: ["enum.ActionVisuals.IconToggled"] + visible: false - type: TargetAction - type: EntityTargetAction canTargetSelf: false @@ -255,11 +262,14 @@ - type: Action useDelay: 5 # TODO: actual sprite and iconOn - icon: { sprite : Objects/Weapons/Guns/Projectiles/magic.rsi, state: fireball } itemIconStyle: BigAction priority: 2 sound: !type:SoundPathSpecifier path: /Audio/Animals/space_dragon_breath.ogg + - type: Sprite + sprite: Objects/Weapons/Guns/Projectiles/magic.rsi + layers: + - state: fireball - type: TargetAction checkCanAccess: false range: 0 diff --git a/Resources/Prototypes/Entities/Mobs/Player/guardian.yml b/Resources/Prototypes/Entities/Mobs/Player/guardian.yml index 31fd3bfd18..827db01161 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/guardian.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/guardian.yml @@ -262,7 +262,9 @@ description: Either manifests the guardian or recalls it back into your body components: - type: Action - icon: Interface/Actions/manifest.png useDelay: 2 + - type: Sprite + layers: + - texture: Interface/Actions/manifest.png - type: InstantAction event: !type:GuardianToggleActionEvent diff --git a/Resources/Prototypes/Entities/Mobs/Player/mothershipcore.yml b/Resources/Prototypes/Entities/Mobs/Player/mothershipcore.yml index 6493bf2d6c..c1882ba572 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/mothershipcore.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/mothershipcore.yml @@ -243,10 +243,12 @@ description: View the Xenoborgs Control Console components: - type: Action - icon: { sprite: Interface/Actions/actions_borg.rsi, state: xenoborg-control-computer } - iconOn: { sprite: Interface/Actions/actions_borg.rsi, state: xenoborg-control-computer } keywords: [ "Mothership Core", "console", "interface" ] priority: -6 + - type: Sprite + sprite: Interface/Actions/actions_borg.rsi + layers: + - state: xenoborg-control-computer - type: InstantAction event: !type:ToggleIntrinsicUIEvent { key: enum.RoboticsConsoleUiKey.Key } @@ -257,9 +259,11 @@ description: View the Xenoborgs Camera Monitor components: - type: Action - icon: { sprite: Interface/Actions/actions_borg.rsi, state: xenoborg-camera-computer } - iconOn: { sprite: Interface/Actions/actions_borg.rsi, state: xenoborg-camera-computer } keywords: [ "Mothership Core", "console", "interface" ] priority: -6 + - type: Sprite + sprite: Interface/Actions/actions_borg.rsi + layers: + - state: xenoborg-camera-computer - type: InstantAction event: !type:ToggleIntrinsicUIEvent { key: enum.SurveillanceCameraMonitorUiKey.Key } diff --git a/Resources/Prototypes/Entities/Mobs/Player/observer.yml b/Resources/Prototypes/Entities/Mobs/Player/observer.yml index 43c1c0e8d8..cdc2ed055d 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/observer.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/observer.yml @@ -127,10 +127,12 @@ description: Scare your crew members because of boredom! components: - type: Action - icon: Interface/Actions/scream.png checkCanInteract: false startDelay: true useDelay: 120 + - type: Sprite + layers: + - texture: Interface/Actions/scream.png - type: InstantAction event: !type:BooActionEvent @@ -141,8 +143,10 @@ description: Toggle light rendering to better observe dark areas. components: - type: Action - icon: Interface/VerbIcons/light.svg.192dpi.png clientExclusive: true + - type: Sprite + layers: + - texture: Interface/VerbIcons/light.svg.192dpi.png - type: InstantAction event: !type:ToggleLightingActionEvent @@ -153,8 +157,10 @@ description: Toggles field-of-view in order to see what players see. components: - type: Action - icon: Interface/VerbIcons/vv.svg.192dpi.png clientExclusive: true + - type: Sprite + layers: + - texture: Interface/VerbIcons/vv.svg.192dpi.png - type: InstantAction event: !type:ToggleFoVActionEvent @@ -165,8 +171,11 @@ description: Toggle the visibility of other ghosts. components: - type: Action - icon: { sprite: Mobs/Ghosts/ghost_human.rsi, state: icon } clientExclusive: true + - type: Sprite + sprite: Mobs/Ghosts/ghost_human.rsi + layers: + - state: icon - type: InstantAction event: !type:ToggleGhostsActionEvent @@ -177,9 +186,13 @@ description: Toggle between hearing all messages and hearing only radio & nearby messages. components: - type: Action - icon: - sprite: Clothing/Ears/Headsets/base.rsi - state: icon - iconOn: Interface/Actions/ghostHearingToggled.png + - type: Sprite + sprite: Clothing/Ears/Headsets/base.rsi + layers: + - state: icon + map: ["enum.ActionVisuals.Icon"] + - texture: Interface/Actions/ghostHearingToggled.png + map: ["enum.ActionVisuals.IconToggled"] + visible: false - type: InstantAction event: !type:ToggleGhostHearingActionEvent diff --git a/Resources/Prototypes/Entities/Objects/Devices/chameleon_projector.yml b/Resources/Prototypes/Entities/Objects/Devices/chameleon_projector.yml index 57502f1219..e4c965def8 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/chameleon_projector.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/chameleon_projector.yml @@ -98,8 +98,10 @@ description: Use this to prevent your disguise from rotating, making it easier to hide in some scenarios. components: - type: Action - icon: Interface/VerbIcons/refresh.svg.192dpi.png itemIconStyle: BigAction + - type: Sprite + layers: + - texture: Interface/VerbIcons/refresh.svg.192dpi.png - type: InstantAction event: !type:DisguiseToggleNoRotEvent @@ -110,9 +112,10 @@ description: For many objects you will want to be anchored to not be completely obvious. components: - type: Action - icon: - sprite: Objects/Tools/wrench.rsi - state: icon itemIconStyle: BigAction + - type: Sprite + sprite: Objects/Tools/wrench.rsi + layers: + - state: icon - type: InstantAction event: !type:DisguiseToggleAnchoredEvent diff --git a/Resources/Prototypes/Entities/Objects/Fun/pai.yml b/Resources/Prototypes/Entities/Objects/Fun/pai.yml index 9d33debcf6..c3bf8ebcf9 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/pai.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/pai.yml @@ -201,8 +201,11 @@ description: View a mass scanner interface. components: - type: Action - icon: { sprite: Interface/Actions/actions_ai.rsi, state: mass_scanner } itemIconStyle: NoItem + - type: Sprite + sprite: Interface/Actions/actions_ai.rsi + layers: + - state: mass_scanner - type: InstantAction event: !type:OpenUiActionEvent key: enum.RadarConsoleUiKey.Key @@ -214,8 +217,10 @@ description: Open your portable MIDI interface to soothe your owner. components: - type: Action - icon: Interface/Actions/pai-midi.png itemIconStyle: NoItem + - type: Sprite + layers: + - texture: Interface/Actions/pai-midi.png - type: InstantAction event: !type:OpenUiActionEvent key: enum.InstrumentUiKey.Key @@ -227,8 +232,11 @@ description: Open your map interface and guide your owner. components: - type: Action - icon: { sprite: Interface/Actions/pai-map.rsi, state: icon } itemIconStyle: NoItem + - type: Sprite + sprite: Interface/Actions/pai-map.rsi + layers: + - state: icon - type: InstantAction event: !type:OpenUiActionEvent key: enum.StationMapUiKey.Key diff --git a/Resources/Prototypes/Entities/Objects/Specific/Chapel/bibles.yml b/Resources/Prototypes/Entities/Objects/Specific/Chapel/bibles.yml index 0f4e0a7442..ab458a6003 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Chapel/bibles.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Chapel/bibles.yml @@ -102,8 +102,11 @@ description: Summon a familiar that will aid you and gain humanlike intelligence once inhabited by a soul. components: - type: Action - icon: { sprite: Clothing/Head/Hats/witch.rsi, state: icon } useDelay: 1 + - type: Sprite + sprite: Clothing/Head/Hats/witch.rsi + layers: + - state: icon - type: InstantAction event: !type:SummonActionEvent diff --git a/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/xenoartifacts.yml b/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/xenoartifacts.yml index bb2a76fc5e..b04341fae1 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/xenoartifacts.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Xenoarchaeology/xenoartifacts.yml @@ -57,9 +57,10 @@ description: Activate yourself, causing chaos to those near you. components: - type: Action - icon: - sprite: Objects/Specific/Xenoarchaeology/xeno_artifacts.rsi - state: ano29 useDelay: 300 + - type: Sprite + sprite: Objects/Specific/Xenoarchaeology/xeno_artifacts.rsi + layers: + - state: ano29 - type: InstantAction event: !type:ArtifactSelfActivateEvent diff --git a/Resources/Prototypes/Entities/Objects/Tools/jetpacks.yml b/Resources/Prototypes/Entities/Objects/Tools/jetpacks.yml index 94dd306d8c..eca7f43725 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/jetpacks.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/jetpacks.yml @@ -70,13 +70,15 @@ description: Toggles the jetpack, giving you movement outside the station. components: - type: Action - icon: - sprite: Objects/Tanks/Jetpacks/blue.rsi - state: icon - iconOn: - sprite: Objects/Tanks/Jetpacks/blue.rsi - state: icon-on useDelay: 1.0 + - type: Sprite + sprite: Objects/Tanks/Jetpacks/blue.rsi + layers: + - state: icon + map: ["enum.ActionVisuals.Icon"] + - state: icon-on + map: ["enum.ActionVisuals.IconToggled"] + visible: false - type: InstantAction event: !type:ToggleJetpackEvent diff --git a/Resources/Prototypes/Magic/animate_spell.yml b/Resources/Prototypes/Magic/animate_spell.yml index 68994cce9b..f2faa3503e 100644 --- a/Resources/Prototypes/Magic/animate_spell.yml +++ b/Resources/Prototypes/Magic/animate_spell.yml @@ -8,9 +8,10 @@ useDelay: 0 sound: !type:SoundPathSpecifier path: /Audio/Magic/staff_animation.ogg - icon: - sprite: Objects/Magic/magicactions.rsi - state: spell_default + - type: Sprite + sprite: Objects/Magic/magicactions.rsi + layers: + - state: spell_default - type: EntityTargetAction whitelist: components: diff --git a/Resources/Prototypes/Magic/event_spells.yml b/Resources/Prototypes/Magic/event_spells.yml index 8afd6e987d..2f4919b7aa 100644 --- a/Resources/Prototypes/Magic/event_spells.yml +++ b/Resources/Prototypes/Magic/event_spells.yml @@ -7,9 +7,10 @@ - type: Action useDelay: 120 itemIconStyle: BigAction - icon: - sprite: Mobs/Ghosts/ghost_human.rsi - state: icon + - type: Sprite + sprite: Mobs/Ghosts/ghost_human.rsi + layers: + - state: icon - type: InstantAction event: !type:ToggleGhostVisibilityToAllEvent @@ -25,9 +26,10 @@ - type: Action useDelay: 300 itemIconStyle: BigAction - icon: - sprite: Objects/Weapons/Guns/Rifles/ak.rsi - state: base + - type: Sprite + sprite: Objects/Weapons/Guns/Rifles/ak.rsi + layers: + - state: base - type: InstantAction event: !type:RandomGlobalSpawnSpellEvent makeSurvivorAntagonist: true @@ -173,9 +175,10 @@ - type: Action useDelay: 300 itemIconStyle: BigAction - icon: - sprite: Objects/Magic/magicactions.rsi - state: magicmissile + - type: Sprite + sprite: Objects/Magic/magicactions.rsi + layers: + - state: magicmissile - type: InstantAction event: !type:RandomGlobalSpawnSpellEvent makeSurvivorAntagonist: true diff --git a/Resources/Prototypes/Magic/forcewall_spells.yml b/Resources/Prototypes/Magic/forcewall_spells.yml index c0c5a2eec6..41cf3bbff5 100644 --- a/Resources/Prototypes/Magic/forcewall_spells.yml +++ b/Resources/Prototypes/Magic/forcewall_spells.yml @@ -9,9 +9,10 @@ itemIconStyle: BigAction sound: !type:SoundPathSpecifier path: /Audio/Magic/forcewall.ogg - icon: - sprite: Objects/Magic/magicactions.rsi - state: shield + - type: Sprite + sprite: Objects/Magic/magicactions.rsi + layers: + - state: shield - type: InstantAction event: !type:InstantSpawnSpellEvent prototype: WallForce diff --git a/Resources/Prototypes/Magic/knock_spell.yml b/Resources/Prototypes/Magic/knock_spell.yml index ca84465d2b..8ad14051d1 100644 --- a/Resources/Prototypes/Magic/knock_spell.yml +++ b/Resources/Prototypes/Magic/knock_spell.yml @@ -9,9 +9,10 @@ itemIconStyle: BigAction sound: !type:SoundPathSpecifier path: /Audio/Magic/knock.ogg - icon: - sprite: Objects/Magic/magicactions.rsi - state: knock + - type: Sprite + sprite: Objects/Magic/magicactions.rsi + layers: + - state: knock - type: InstantAction event: !type:KnockSpellEvent - type: SpeakOnAction diff --git a/Resources/Prototypes/Magic/mindswap_spell.yml b/Resources/Prototypes/Magic/mindswap_spell.yml index 4fbb1748b7..5900f2ab7e 100644 --- a/Resources/Prototypes/Magic/mindswap_spell.yml +++ b/Resources/Prototypes/Magic/mindswap_spell.yml @@ -8,9 +8,10 @@ useDelay: 180 sound: !type:SoundPathSpecifier path: /Audio/Magic/staff_animation.ogg - icon: - sprite: Mobs/Species/Human/organs.rsi - state: brain + - type: Sprite + sprite: Mobs/Species/Human/organs.rsi + layers: + - state: brain - type: EntityTargetAction whitelist: components: diff --git a/Resources/Prototypes/Magic/projectile_spells.yml b/Resources/Prototypes/Magic/projectile_spells.yml index 87ed8772f0..35ec1fdf2e 100644 --- a/Resources/Prototypes/Magic/projectile_spells.yml +++ b/Resources/Prototypes/Magic/projectile_spells.yml @@ -11,9 +11,10 @@ raiseOnUser: true sound: !type:SoundPathSpecifier path: /Audio/Magic/fireball.ogg - icon: - sprite: Objects/Magic/magicactions.rsi - state: fireball + - type: Sprite + sprite: Objects/Magic/magicactions.rsi + layers: + - state: fireball - type: TargetAction range: 60 checkCanAccess: false diff --git a/Resources/Prototypes/Magic/recall_spell.yml b/Resources/Prototypes/Magic/recall_spell.yml index 72082c3834..7d26bf74ed 100644 --- a/Resources/Prototypes/Magic/recall_spell.yml +++ b/Resources/Prototypes/Magic/recall_spell.yml @@ -15,9 +15,10 @@ pitch: 1.2 maxDistance: 5 variation: 0.2 - icon: - sprite: Objects/Magic/magicactions.rsi - state: item_recall + - type: Sprite + sprite: Objects/Magic/magicactions.rsi + layers: + - state: item_recall - type: InstantAction event: !type:OnItemRecallActionEvent - type: ItemRecall diff --git a/Resources/Prototypes/Magic/repulse_spell.yml b/Resources/Prototypes/Magic/repulse_spell.yml index 96a90ce2ec..95fbd303e7 100644 --- a/Resources/Prototypes/Magic/repulse_spell.yml +++ b/Resources/Prototypes/Magic/repulse_spell.yml @@ -15,8 +15,9 @@ useDelay: 40 raiseOnAction: true itemIconStyle: BigAction - icon: - sprite: Objects/Magic/magicactions.rsi - state: repulse + - type: Sprite + sprite: Objects/Magic/magicactions.rsi + layers: + - state: repulse - type: InstantAction event: !type:RepulseAttractActionEvent diff --git a/Resources/Prototypes/Magic/rune_spells.yml b/Resources/Prototypes/Magic/rune_spells.yml index 551a5bee00..c7f444fcb3 100644 --- a/Resources/Prototypes/Magic/rune_spells.yml +++ b/Resources/Prototypes/Magic/rune_spells.yml @@ -5,10 +5,10 @@ components: - type: Action itemIconStyle: BigAction - icon: - sprite: Objects/Magic/magicactions.rsi - state: spell_default - + - type: Sprite + sprite: Objects/Magic/magicactions.rsi + layers: + - state: spell_default - type: entity parent: BaseRuneAction id: ActionFlashRune diff --git a/Resources/Prototypes/Magic/smoke_spell.yml b/Resources/Prototypes/Magic/smoke_spell.yml index a63f6e1ebf..35300ce8ec 100644 --- a/Resources/Prototypes/Magic/smoke_spell.yml +++ b/Resources/Prototypes/Magic/smoke_spell.yml @@ -7,9 +7,10 @@ - type: Action useDelay: 10 itemIconStyle: BigAction - icon: - sprite: Actions/smokeaction.rsi - state: smokeaction + - type: Sprite + sprite: Actions/smokeaction.rsi + layers: + - state: smokeaction - type: InstantAction event: !type:InstantSpawnSpellEvent prototype: WizardSmoke diff --git a/Resources/Prototypes/Magic/spawn_spells.yml b/Resources/Prototypes/Magic/spawn_spells.yml index a151e6f028..2c44defb85 100644 --- a/Resources/Prototypes/Magic/spawn_spells.yml +++ b/Resources/Prototypes/Magic/spawn_spells.yml @@ -7,9 +7,10 @@ - type: Action useDelay: 10 itemIconStyle: BigAction - icon: - sprite: Objects/Magic/magicactions.rsi - state: spell_default + - type: Sprite + sprite: Objects/Magic/magicactions.rsi + layers: + - state: spell_default - type: TargetAction range: 4 - type: WorldTargetAction diff --git a/Resources/Prototypes/Magic/teleport_spells.yml b/Resources/Prototypes/Magic/teleport_spells.yml index fc166e8c4b..9cc253e597 100644 --- a/Resources/Prototypes/Magic/teleport_spells.yml +++ b/Resources/Prototypes/Magic/teleport_spells.yml @@ -9,9 +9,10 @@ itemIconStyle: BigAction sound: !type:SoundPathSpecifier path: /Audio/Magic/blink.ogg - icon: - sprite: Objects/Magic/magicactions.rsi - state: blink + - type: Sprite + sprite: Objects/Magic/magicactions.rsi + layers: + - state: blink - type: TargetAction range: 16 # default examine-range. # ^ should probably add better validation that the clicked location is on the users screen somewhere, @@ -31,9 +32,10 @@ useDelay: 15 sound: !type:SoundPathSpecifier path: /Audio/Magic/Eldritch/voidblink.ogg - icon: - sprite: Objects/Magic/Eldritch/eldritch_actions.rsi - state: voidblink + - type: Sprite + sprite: Objects/Magic/Eldritch/eldritch_actions.rsi + layers: + - state: voidblink - type: TargetAction accessMask: - Opaque diff --git a/Resources/Prototypes/Magic/touch_spells.yml b/Resources/Prototypes/Magic/touch_spells.yml index 5376c2d954..ac55aaf49e 100644 --- a/Resources/Prototypes/Magic/touch_spells.yml +++ b/Resources/Prototypes/Magic/touch_spells.yml @@ -32,9 +32,10 @@ - type: Action sound: !type:SoundPathSpecifier path: /Audio/Magic/disintegrate.ogg - icon: - sprite: Objects/Magic/magicactions.rsi - state: gib + - type: Sprite + sprite: Objects/Magic/magicactions.rsi + layers: + - state: gib - type: EntityTargetAction event: !type:SmiteSpellEvent - type: SpeakOnAction @@ -60,9 +61,10 @@ useDelay: 120 sound: !type:SoundPathSpecifier path: /Audio/Items/brokenbikehorn.ogg - icon: - sprite: Clothing/Mask/cluwne.rsi - state: icon + - type: Sprite + sprite: Clothing/Mask/cluwne.rsi + layers: + - state: icon - type: EntityTargetAction event: !type:ChangeComponentsSpellEvent toAdd: @@ -82,9 +84,10 @@ useDelay: 60 sound: !type:SoundPathSpecifier path: /Audio/Effects/slip.ogg - icon: - sprite: Objects/Specific/Janitorial/soap.rsi - state: omega-4 + - type: Sprite + sprite: Objects/Specific/Janitorial/soap.rsi + layers: + - state: omega-4 - type: EntityTargetAction event: !type:ChangeComponentsSpellEvent toAdd: diff --git a/Resources/Prototypes/Magic/utility_spells.yml b/Resources/Prototypes/Magic/utility_spells.yml index e95e4a6a28..3c2abf32bf 100644 --- a/Resources/Prototypes/Magic/utility_spells.yml +++ b/Resources/Prototypes/Magic/utility_spells.yml @@ -7,9 +7,10 @@ - type: Action useDelay: 30 itemIconStyle: BigAction - icon: - sprite: Objects/Weapons/Guns/Basic/wands.rsi - state: nothing + - type: Sprite + sprite: Objects/Weapons/Guns/Basic/wands.rsi + layers: + - state: nothing - type: InstantAction event: !type:ChargeSpellEvent charge: 1 diff --git a/Resources/Prototypes/Roles/Jobs/Civilian/mime.yml b/Resources/Prototypes/Roles/Jobs/Civilian/mime.yml index 8ff045173d..f2452399a7 100644 --- a/Resources/Prototypes/Roles/Jobs/Civilian/mime.yml +++ b/Resources/Prototypes/Roles/Jobs/Civilian/mime.yml @@ -40,9 +40,10 @@ - type: Action priority: -1 useDelay: 30 - icon: - sprite: Structures/Walls/solid.rsi - state: full + - type: Sprite + sprite: Structures/Walls/solid.rsi + layers: + - state: full - type: InstantAction event: !type:InvisibleWallActionEvent