]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Remove speech & popups from actions (#15747)
authorLeon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Wed, 26 Apr 2023 04:04:44 +0000 (16:04 +1200)
committerGitHub <noreply@github.com>
Wed, 26 Apr 2023 04:04:44 +0000 (14:04 +1000)
22 files changed:
Content.Client/Actions/ActionsSystem.cs
Content.Client/Ghost/GhostComponent.cs
Content.Client/Ghost/GhostSystem.cs
Content.Server/Actions/ActionsSystem.cs
Content.Server/Magic/Events/ChangeComponentsSpellEvent.cs
Content.Server/Magic/Events/ISpeakSpell.cs [new file with mode: 0644]
Content.Server/Magic/Events/InstantSpawnSpellEvent.cs
Content.Server/Magic/Events/KnockSpellEvent.cs
Content.Server/Magic/Events/ProjectileSpellEvent.cs
Content.Server/Magic/Events/SmiteSpellEvent.cs
Content.Server/Magic/Events/TeleportSpellEvent.cs
Content.Server/Magic/Events/WorldSpawnSpellEvent.cs
Content.Server/Magic/MagicSystem.cs
Content.Shared/Actions/ActionTypes/ActionType.cs
Content.Shared/Actions/SharedActionsSystem.cs
Content.Shared/CombatMode/SharedCombatModeSystem.cs
Resources/Prototypes/Actions/types.yml
Resources/Prototypes/Magic/forcewall_spells.yml
Resources/Prototypes/Magic/knock_spell.yml
Resources/Prototypes/Magic/projectile_spells.yml
Resources/Prototypes/Magic/smite_spells.yml
Resources/Prototypes/Magic/spawn_spells.yml

index a31f23573af48a3c1c5975479993ad8348e56df4..db484df882934829d59dafd5ff8e1f9f438dfbae 100644 (file)
@@ -161,39 +161,6 @@ namespace Content.Client.Actions
                 ActionRemoved?.Invoke(action);
         }
 
-        /// <summary>
-        ///     Execute convenience functionality for actions (pop-ups, sound, speech)
-        /// </summary>
-        protected override bool PerformBasicActions(EntityUid user, ActionType action, bool predicted)
-        {
-            var performedAction = action.Sound != null
-                                  || !string.IsNullOrWhiteSpace(action.UserPopup)
-                                  || !string.IsNullOrWhiteSpace(action.Popup);
-
-            if (!GameTiming.IsFirstTimePredicted)
-                return performedAction;
-
-            if (!string.IsNullOrWhiteSpace(action.UserPopup))
-            {
-                var msg = (!action.Toggled || string.IsNullOrWhiteSpace(action.PopupToggleSuffix))
-                    ? Loc.GetString(action.UserPopup)
-                    : Loc.GetString(action.UserPopup + action.PopupToggleSuffix);
-
-                _popupSystem.PopupEntity(msg, user);
-            }
-            else if (!string.IsNullOrWhiteSpace(action.Popup))
-            {
-                var msg = (!action.Toggled || string.IsNullOrWhiteSpace(action.PopupToggleSuffix))
-                    ? Loc.GetString(action.Popup)
-                    : Loc.GetString(action.Popup + action.PopupToggleSuffix);
-
-                _popupSystem.PopupEntity(msg, user);
-            }
-
-            _audio.Play(action.Sound, Filter.Local(), user, false);
-            return performedAction;
-        }
-
         private void OnPlayerAttached(EntityUid uid, ActionsComponent component, PlayerAttachedEvent args)
         {
             LinkAllActions(component);
index 99f19d4a153fac0a7ddb187ad8a16fdc7026c174..d1b02362e7562a853b5331930b9be467300e3515 100644 (file)
@@ -16,7 +16,6 @@ namespace Content.Client.Ghost
             Icon = new SpriteSpecifier.Texture(new ("Interface/VerbIcons/light.svg.192dpi.png")),
             DisplayName = "ghost-gui-toggle-lighting-manager-name",
             Description = "ghost-gui-toggle-lighting-manager-desc",
-            UserPopup = "ghost-gui-toggle-lighting-manager-popup",
             ClientExclusive = true,
             CheckCanInteract = false,
             Event = new ToggleLightingActionEvent(),
@@ -27,7 +26,6 @@ namespace Content.Client.Ghost
             Icon = new SpriteSpecifier.Texture(new ("Interface/VerbIcons/vv.svg.192dpi.png")),
             DisplayName = "ghost-gui-toggle-fov-name",
             Description = "ghost-gui-toggle-fov-desc",
-            UserPopup = "ghost-gui-toggle-fov-popup",
             ClientExclusive = true,
             CheckCanInteract = false,
             Event = new ToggleFoVActionEvent(),
@@ -38,7 +36,6 @@ namespace Content.Client.Ghost
             Icon = new SpriteSpecifier.Rsi(new ("Mobs/Ghosts/ghost_human.rsi"), "icon"),
             DisplayName = "ghost-gui-toggle-ghost-visibility-name",
             Description = "ghost-gui-toggle-ghost-visibility-desc",
-            UserPopup = "ghost-gui-toggle-ghost-visibility-popup",
             ClientExclusive = true,
             CheckCanInteract = false,
             Event = new ToggleGhostsActionEvent(),
index d46c9639fea956431b846744a05ffe6b8275cee8..22f480dc1221b0945f7e1f32f042d1396a386463 100644 (file)
@@ -1,6 +1,7 @@
 using Content.Client.Movement.Systems;
 using Content.Shared.Actions;
 using Content.Shared.Ghost;
+using Content.Shared.Popups;
 using JetBrains.Annotations;
 using Robust.Client.Console;
 using Robust.Client.GameObjects;
@@ -17,6 +18,7 @@ namespace Content.Client.Ghost
         [Dependency] private readonly IPlayerManager _playerManager = default!;
         [Dependency] private readonly SharedActionsSystem _actions = default!;
         [Dependency] private readonly ILightManager _lightManager = default!;
+        [Dependency] private readonly SharedPopupSystem _popup = default!;
         [Dependency] private readonly ContentEyeSystem _contentEye = default!;
 
         public int AvailableGhostRoleCount { get; private set; }
@@ -90,6 +92,7 @@ namespace Content.Client.Ghost
             if (args.Handled)
                 return;
 
+            _popup.PopupEntity(Loc.GetString("ghost-gui-toggle-lighting-manager-popup"), args.Performer);
             _lightManager.Enabled = !_lightManager.Enabled;
             args.Handled = true;
         }
@@ -99,6 +102,7 @@ namespace Content.Client.Ghost
             if (args.Handled)
                 return;
 
+            _popup.PopupEntity(Loc.GetString("ghost-gui-toggle-fov-popup"), args.Performer);
             _contentEye.RequestToggleFov(uid);
             args.Handled = true;
         }
@@ -108,6 +112,7 @@ namespace Content.Client.Ghost
             if (args.Handled)
                 return;
 
+            _popup.PopupEntity(Loc.GetString("ghost-gui-toggle-ghost-visibility-popup"), args.Performer);
             ToggleGhostVisibility();
             args.Handled = true;
         }
index bd38d7308e6db6c9c04797d4a5d75ff0d0c0e31a..495640d98b3a965209ea445b13263aa7c0ff0350 100644 (file)
@@ -10,20 +10,5 @@ namespace Content.Server.Actions
     [UsedImplicitly]
     public sealed class ActionsSystem : SharedActionsSystem
     {
-        [Dependency] private readonly ChatSystem _chat = default!;
-        [Dependency] private readonly MetaDataSystem _metaSystem = default!;
-
-        protected override bool PerformBasicActions(EntityUid user, ActionType action, bool predicted)
-        {
-            var result = base.PerformBasicActions(user, action, predicted);
-
-            if (!string.IsNullOrWhiteSpace(action.Speech))
-            {
-                _chat.TrySendInGameICMessage(user, Loc.GetString(action.Speech), InGameICChatType.Speak, false);
-                result = true;
-            }
-
-            return result;
-        }
     }
 }
index c9961605b99554e6f73ac254d0c75803af71a3e5..aa197c46a52dfc6c3a62aecf2fad3221681f5180 100644 (file)
@@ -6,7 +6,7 @@ namespace Content.Server.Magic.Events;
 /// <summary>
 ///     Spell that uses the magic of ECS to add & remove components. Components are first removed, then added.
 /// </summary>
-public sealed class ChangeComponentsSpellEvent : EntityTargetActionEvent
+public sealed class ChangeComponentsSpellEvent : EntityTargetActionEvent, ISpeakSpell
 {
     // TODO allow it to set component data-fields?
     // for now a Hackish way to do that is to remove & add, but that doesn't allow you to selectively set specific data fields.
@@ -18,4 +18,7 @@ public sealed class ChangeComponentsSpellEvent : EntityTargetActionEvent
     [DataField("toRemove")]
     [AlwaysPushInheritance]
     public HashSet<string> ToRemove = new();
+
+    [DataField("speech")]
+    public string? Speech { get; }
 }
diff --git a/Content.Server/Magic/Events/ISpeakSpell.cs b/Content.Server/Magic/Events/ISpeakSpell.cs
new file mode 100644 (file)
index 0000000..d7c7dbe
--- /dev/null
@@ -0,0 +1,10 @@
+namespace Content.Server.Magic.Events;
+
+public interface ISpeakSpell // The speak n spell interface
+{
+    /// <summary>
+    /// Localized string spoken by the caster when casting this spell.
+    /// </summary>
+    public string? Speech { get; }
+}
+
index 4a7123a787a875788daa7c5cf83af4328694d8b5..22f4166b62ba4bc9b1db1bc7a26c6912d2df18cb 100644 (file)
@@ -4,7 +4,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
 
 namespace Content.Server.Magic.Events;
 
-public sealed class InstantSpawnSpellEvent : InstantActionEvent
+public sealed class InstantSpawnSpellEvent : InstantActionEvent, ISpeakSpell
 {
     /// <summary>
     /// What entity should be spawned.
@@ -15,6 +15,9 @@ public sealed class InstantSpawnSpellEvent : InstantActionEvent
     [DataField("preventCollide")]
     public bool PreventCollideWithCaster = true;
 
+    [DataField("speech")]
+    public string? Speech { get; }
+
     /// <summary>
     /// Gets the targeted spawn positons; may lead to multiple entities being spawned.
     /// </summary>
index 946fdf8b0a5cfbc89e8aee9f82eac1b297ade9dc..8a25a5f495f08c52d214b53f2bc9dcc953c8748e 100644 (file)
@@ -3,7 +3,7 @@ using Robust.Shared.Audio;
 
 namespace Content.Server.Magic.Events;
 
-public sealed class KnockSpellEvent : InstantActionEvent
+public sealed class KnockSpellEvent : InstantActionEvent, ISpeakSpell
 {
     /// <summary>
     /// The range this spell opens doors in
@@ -20,4 +20,7 @@ public sealed class KnockSpellEvent : InstantActionEvent
     /// </summary>
     [DataField("knockVolume")]
     public float KnockVolume = 5f;
+
+    [DataField("speech")]
+    public string? Speech { get; }
 }
index 396b0478ebfb1682db84c57cd7d1aee530f1f99b..bede745b92a34c06d7aed30d0ad09d7fe44fbfd9 100644 (file)
@@ -5,7 +5,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
 
 namespace Content.Server.Magic.Events;
 
-public sealed class ProjectileSpellEvent : WorldTargetActionEvent
+public sealed class ProjectileSpellEvent : WorldTargetActionEvent, ISpeakSpell
 {
     /// <summary>
     /// What entity should be spawned.
@@ -17,4 +17,7 @@ public sealed class ProjectileSpellEvent : WorldTargetActionEvent
     /// Gets the targeted spawn positions; may lead to multiple entities being spawned.
     /// </summary>
     [DataField("posData")] public MagicSpawnData Pos = new TargetCasterPos();
+
+    [DataField("speech")]
+    public string? Speech { get; }
 }
index e6aa36a9084862abfbb56afe2d4a76ed9773dff0..3a0001fdc33a61ea42ffff4c76002e0d56925d03 100644 (file)
@@ -2,11 +2,14 @@
 
 namespace Content.Server.Magic.Events;
 
-public sealed class SmiteSpellEvent : EntityTargetActionEvent
+public sealed class SmiteSpellEvent : EntityTargetActionEvent, ISpeakSpell
 {
     /// <summary>
     ///     Should this smite delete all parts/mechanisms gibbed except for the brain?
     /// </summary>
     [DataField("deleteNonBrainParts")]
     public bool DeleteNonBrainParts = true;
+
+    [DataField("speech")]
+    public string? Speech { get; }
 }
index 3d567d4a123dc23e99d03bf718697a564a14f90f..d26c719a4102846046e940c4bc26ee5c4f7f8e33 100644 (file)
@@ -3,11 +3,13 @@ using Robust.Shared.Audio;
 
 namespace Content.Server.Magic.Events;
 
-public sealed class TeleportSpellEvent : WorldTargetActionEvent
+public sealed class TeleportSpellEvent : WorldTargetActionEvent, ISpeakSpell
 {
     [DataField("blinkSound")]
     public SoundSpecifier BlinkSound = new SoundPathSpecifier("/Audio/Magic/blink.ogg");
 
+    [DataField("speech")]
+    public string? Speech { get; }
 
     /// <summary>
     /// Volume control for the spell.
index 533d9bfcdb44c470959344d2ebb045cfcef88f12..a0f19b8788df32a01f08794d1b0518a86a7ebd19 100644 (file)
@@ -3,7 +3,7 @@ using Content.Shared.Storage;
 
 namespace Content.Server.Magic.Events;
 
-public sealed class WorldSpawnSpellEvent : WorldTargetActionEvent
+public sealed class WorldSpawnSpellEvent : WorldTargetActionEvent, ISpeakSpell
 {
     // TODO:This class needs combining with InstantSpawnSpellEvent
 
@@ -25,5 +25,8 @@ public sealed class WorldSpawnSpellEvent : WorldTargetActionEvent
     /// Lifetime to set for the entities to self delete
     /// </summary>
     [DataField("lifetime")] public float? Lifetime;
+
+    [DataField("speech")]
+    public string? Speech { get; }
 }
 
index 5374d9ab748603d980c58b570bc1a7979cdfa323..c69243376225e6c6074f352addc8cde35aa56266 100644 (file)
@@ -1,5 +1,6 @@
 using Content.Server.Body.Components;
 using Content.Server.Body.Systems;
+using Content.Server.Chat.Systems;
 using Content.Server.Coordinates.Helpers;
 using Content.Server.Doors.Systems;
 using Content.Server.Magic.Events;
@@ -23,6 +24,7 @@ using Robust.Shared.Player;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Random;
 using Robust.Shared.Serialization.Manager;
+using Robust.Shared.Serialization.Manager.Exceptions;
 
 namespace Content.Server.Magic;
 
@@ -46,6 +48,7 @@ public sealed class MagicSystem : EntitySystem
     [Dependency] private readonly PhysicsSystem _physics = default!;
     [Dependency] private readonly SharedTransformSystem _transformSystem = default!;
     [Dependency] private readonly SharedAudioSystem _audio = default!;
+    [Dependency] private readonly ChatSystem _chat = default!;
 
     public override void Initialize()
     {
@@ -144,6 +147,7 @@ public sealed class MagicSystem : EntitySystem
             }
         }
 
+        Speak(args);
         args.Handled = true;
     }
 
@@ -152,6 +156,9 @@ public sealed class MagicSystem : EntitySystem
         if (ev.Handled)
             return;
 
+        ev.Handled = true;
+        Speak(ev);
+
         var xform = Transform(ev.Performer);
         var userVelocity = _physics.GetMapLinearVelocity(ev.Performer);
 
@@ -170,6 +177,11 @@ public sealed class MagicSystem : EntitySystem
 
     private void OnChangeComponentsSpell(ChangeComponentsSpellEvent ev)
     {
+        if (ev.Handled)
+            return;
+        ev.Handled = true;
+        Speak(ev);
+
         foreach (var toRemove in ev.ToRemove)
         {
             if (_compFact.TryGetRegistration(toRemove, out var registration))
@@ -263,6 +275,7 @@ public sealed class MagicSystem : EntitySystem
         _transformSystem.SetCoordinates(args.Performer, args.Target);
         transform.AttachToGridOrMap();
         _audio.PlayPvs(args.BlinkSound, args.Performer, AudioParams.Default.WithVolume(args.BlinkVolume));
+        Speak(args);
         args.Handled = true;
     }
 
@@ -275,6 +288,9 @@ public sealed class MagicSystem : EntitySystem
         if (args.Handled)
             return;
 
+        args.Handled = true;
+        Speak(args);
+
         //Get the position of the player
         var transform = Transform(args.Performer);
         var coords = transform.Coordinates;
@@ -290,8 +306,6 @@ public sealed class MagicSystem : EntitySystem
             if (TryComp<DoorComponent>(entity, out var doorComp) && doorComp.State is not DoorState.Open)
                 _doorSystem.StartOpening(doorComp.Owner);
         }
-
-        args.Handled = true;
     }
 
     private void OnSmiteSpell(SmiteSpellEvent ev)
@@ -299,6 +313,9 @@ public sealed class MagicSystem : EntitySystem
         if (ev.Handled)
             return;
 
+        ev.Handled = true;
+        Speak(ev);
+
         var direction = Transform(ev.Target).MapPosition.Position - Transform(ev.Performer).MapPosition.Position;
         var impulseVector = direction * 10000;
 
@@ -337,7 +354,7 @@ public sealed class MagicSystem : EntitySystem
         var targetMapCoords = args.Target;
 
         SpawnSpellHelper(args.Contents, targetMapCoords, args.Lifetime, args.Offset);
-
+        Speak(args);
         args.Handled = true;
     }
 
@@ -373,4 +390,13 @@ public sealed class MagicSystem : EntitySystem
     }
 
     #endregion
+
+    private void Speak(BaseActionEvent args)
+    {
+        if (args is not ISpeakSpell speak || string.IsNullOrWhiteSpace(speak.Speech))
+            return;
+
+        _chat.TrySendInGameICMessage(args.Performer, Loc.GetString(speak.Speech),
+            InGameICChatType.Speak, false);
+    }
 }
index 566c02d12f26c25e169e4d08c7470b2d7ebb1fe1..202465a4fe382268962d951cd98c74fd50adba0b 100644 (file)
@@ -157,39 +157,12 @@ public abstract class ActionType : IEquatable<ActionType>, IComparable, ICloneab
     [DataField("itemIconStyle")]
     public ItemActionIconStyle ItemIconStyle;
 
-    /// <summary>
-    ///     If not null, the user will speak these words when performing the action. Convenient feature to have for some
-    ///     actions. Gets passed through localization.
-    /// </summary>
-    [DataField("speech")]
-    public string? Speech;
-
     /// <summary>
     ///     If not null, this sound will be played when performing this action.
     /// </summary>
     [DataField("sound")]
     public SoundSpecifier? Sound;
 
-    /// <summary>
-    ///     A pop-up to show the user when performing this action. Gets passed through localization.
-    /// </summary>
-    [DataField("userPopup")]
-    public string? UserPopup;
-
-    /// <summary>
-    ///     A pop-up to show to all players when performing this action. Gets passed through localization.
-    /// </summary>
-    [DataField("popup")]
-    public string? Popup;
-
-    /// <summary>
-    ///     If not null, this string will be appended to the pop-up localization strings when the action was toggled on
-    ///     after execution. Exists to make it easy to have a different pop-up for turning the action on or off (e.g.,
-    ///     combat mode toggle).
-    /// </summary>
-    [DataField("popupToggleSuffix")]
-    public string? PopupToggleSuffix = null;
-
     /// <summary>
     ///     Compares two actions based on their properties. This is used to determine equality when the client requests the
     ///     server to perform some action. Also determines the order in which actions are automatically added to the action bar.
@@ -256,12 +229,8 @@ public abstract class ActionType : IEquatable<ActionType>, IComparable, ICloneab
         AutoRemove = toClone.AutoRemove;
         ItemIconStyle = toClone.ItemIconStyle;
         CheckCanInteract = toClone.CheckCanInteract;
-        Speech = toClone.Speech;
         UseDelay = toClone.UseDelay;
         Sound = toClone.Sound;
-        UserPopup = toClone.UserPopup;
-        Popup = toClone.Popup;
-        PopupToggleSuffix = toClone.PopupToggleSuffix;
         ItemIconStyle = toClone.ItemIconStyle;
         _entityIcon = toClone._entityIcon;
     }
index 558b87853660889557637e80fb0b41782e1da255..324c260a1edfe8b98de7582f50731127d3c93e85 100644 (file)
@@ -284,8 +284,8 @@ public abstract class SharedActionsSystem : EntitySystem
             handled = actionEvent.Handled;
         }
 
-        // Execute convenience functionality (pop-ups, sound, speech)
-        handled |= PerformBasicActions(performer, action, predicted);
+        _audio.PlayPredicted(action.Sound, performer,predicted ? performer : null);
+        handled |= action.Sound != null;
 
         if (!handled)
             return; // no interaction occurred.
@@ -312,30 +312,6 @@ public abstract class SharedActionsSystem : EntitySystem
         if (dirty && component != null)
             Dirty(component);
     }
-
-    /// <summary>
-    ///     Execute convenience functionality for actions (pop-ups, sound, speech)
-    /// </summary>
-    protected virtual bool PerformBasicActions(EntityUid performer, ActionType action, bool predicted)
-    {
-        if (action.Sound == null && string.IsNullOrWhiteSpace(action.Popup))
-            return false;
-
-        var filter = predicted ? Filter.PvsExcept(performer) : Filter.Pvs(performer);
-
-        _audio.Play(action.Sound, filter, performer, true);
-
-        if (string.IsNullOrWhiteSpace(action.Popup))
-            return true;
-
-        var msg = (!action.Toggled || string.IsNullOrWhiteSpace(action.PopupToggleSuffix))
-            ? Loc.GetString(action.Popup)
-            : Loc.GetString(action.Popup + action.PopupToggleSuffix);
-
-        _popupSystem.PopupEntity(msg, performer, filter, true);
-
-        return true;
-    }
     #endregion
 
     #region AddRemoveActions
index fb05e32039f93d6f953a05ae3e5027db3e6e481c..46e263b63c59b02223d0eae6e4ba75262a517196 100644 (file)
@@ -1,8 +1,10 @@
 using Content.Shared.Actions;
 using Content.Shared.Actions.ActionTypes;
+using Content.Shared.Popups;
 using Content.Shared.Targeting;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Serialization;
+using Robust.Shared.Timing;
 
 namespace Content.Shared.CombatMode
 {
@@ -10,6 +12,8 @@ namespace Content.Shared.CombatMode
     {
         [Dependency] private readonly IPrototypeManager _protoMan = default!;
         [Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
+        [Dependency] private readonly SharedPopupSystem _popup = default!;
+        [Dependency] private readonly IGameTiming _timing = default!;
 
         public override void Initialize()
         {
@@ -43,8 +47,14 @@ namespace Content.Shared.CombatMode
             if (args.Handled)
                 return;
 
-            SetInCombatMode(uid, !component.IsInCombatMode, component);
             args.Handled = true;
+            SetInCombatMode(uid, !component.IsInCombatMode, component);
+
+            if (!_timing.IsFirstTimePredicted)
+                return;
+
+            var msg = component.IsInCombatMode ? "action-popup-combat" : "action-popup-combat-enabled";
+            _popup.PopupEntity(Loc.GetString(msg), args.Performer);
         }
 
         public void SetCanDisarm(EntityUid entity, bool canDisarm, CombatModeComponent? component = null)
index 5d5e7c2bd59a86c1deb043dd417f6633f6188519..50817c5c5e3170dab79e5d8dae37b8c15aaad826 100644 (file)
@@ -73,8 +73,6 @@
   checkCanInteract: false
   icon: Interface/Actions/harmOff.png
   iconOn: Interface/Actions/harm.png
-  userPopup: action-popup-combat
-  popupToggleSuffix: -enabled
   event: !type:ToggleCombatActionEvent
 
 - type: instantAction
index ab5c038ba9d58d2db4d16618e7a5ae74ebbdf46d..815852ac630c2e0d752293bd2cc717048560bdd1 100644 (file)
@@ -3,7 +3,6 @@
   name: action-name-spell-forcewall
   description: action-description-spell-forcewall
   useDelay: 10
-  speech: action-speech-spell-forcewall
   itemIconStyle: BigAction
   sound: !type:SoundPathSpecifier
     path: /Audio/Magic/forcewall.ogg
@@ -13,3 +12,4 @@
   serverEvent: !type:InstantSpawnSpellEvent
     prototype: WallForce
     posData: !type:TargetInFront
+    speech: action-speech-spell-forcewall
index 3cfade9290f00a7a14640db114ecb3d295fbc5da..b9fd07e97847d74aad2ad59e1434e9e21e1cd8f9 100644 (file)
@@ -3,9 +3,9 @@
   name: action-name-spell-knock
   description: action-description-spell-knock
   useDelay: 10
-  speech: action-speech-spell-knock
   itemIconStyle: BigAction
   icon:
     sprite: Objects/Magic/magicactions.rsi
     state: knock
   serverEvent: !type:KnockSpellEvent
+    speech: action-speech-spell-knock
index 0a8924e76ad17ac0182c74fe228bd98bcd8d277b..15a6b261b02d88ed0a3bd4cfab5ce1174d87277c 100644 (file)
@@ -3,7 +3,6 @@
   name: action-name-spell-fireball
   description: action-description-spell-fireball
   useDelay: 30
-  speech: action-speech-spell-fireball
   itemIconStyle: BigAction
   checkCanAccess: false
   range: 60
@@ -15,3 +14,4 @@
   serverEvent: !type:ProjectileSpellEvent
     prototype: ProjectileFireball
     posData: !type:TargetCasterPos
+    speech: action-speech-spell-fireball
index c2e31f301c751f6069b1d834631b473c6b823a55..b85fff98f4748d2e9befc8d7e6c2ac8518698321 100644 (file)
@@ -3,7 +3,6 @@
   name: action-name-spell-smite
   description: action-description-spell-smite
   useDelay: 60
-  speech: action-speech-spell-smite
   itemIconStyle: BigAction
   whitelist:
     components:
@@ -16,3 +15,4 @@
     sprite: Objects/Magic/magicactions.rsi
     state: gib
   serverEvent: !type:SmiteSpellEvent
+    speech: action-speech-spell-smite
index 98aa3639a63d4899cfdb53c7a0c46893b3ff609b..40a1d38d38b03f03d9646357248208244cfed79c 100644 (file)
@@ -4,7 +4,6 @@
   description: action-description-spell-summon-magicarp
   useDelay: 10
   range: 4
-  speech: action-speech-spell-summon-magicarp
   itemIconStyle: BigAction
   icon:
     sprite: Objects/Magic/magicactions.rsi
@@ -14,3 +13,4 @@
       - id: MobCarpMagic
         amount: 3
     offsetVector2: 0, 1
+    speech: action-speech-spell-summon-magicarp