From 1b27f4dd894843b44a45a9f4d686a385696d20e8 Mon Sep 17 00:00:00 2001 From: TryHardo7 Date: Thu, 24 Oct 2024 14:48:11 +0300 Subject: [PATCH] moved bloodmist params from reaperComp to action datafields --- .../SS220/DarkReaper/DarkReaperActions.cs | 26 +++++++++++++++++++ .../SS220/DarkReaper/DarkReaperComponent.cs | 23 ---------------- .../DarkReaper/DarkReaperSharedSystem.cs | 8 +++--- .../DemonRofler/dark_reaper.rsi/meta.json | 2 +- 4 files changed, 31 insertions(+), 28 deletions(-) diff --git a/Content.Shared/SS220/DarkReaper/DarkReaperActions.cs b/Content.Shared/SS220/DarkReaper/DarkReaperActions.cs index b2db69a1b96ff3..c1a3e3bfcd6e3f 100644 --- a/Content.Shared/SS220/DarkReaper/DarkReaperActions.cs +++ b/Content.Shared/SS220/DarkReaper/DarkReaperActions.cs @@ -1,5 +1,7 @@ // © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt using Content.Shared.Actions; +using Robust.Shared.Audio.Systems; +using Robust.Shared.Audio; namespace Content.Shared.SS220.DarkReaper; @@ -29,4 +31,28 @@ public sealed partial class ReaperSmokeEvent : InstantActionEvent public sealed partial class ReaperBloodMistEvent : InstantActionEvent { + [Dependency] private readonly SharedAudioSystem _audio = default!; + /// BLOOD MIST + + /// + /// How long the mist stays for, after it has spread + /// + [DataField] + public TimeSpan BloodMistLength = TimeSpan.FromSeconds(10); + /// + /// Proto of what is being spawned by ability + /// + [DataField] + public string BloodMistProto = "BloodMistSpread"; + + /// + /// BloodMist sound + /// + /// + [DataField, AutoNetworkedField] + public SoundSpecifier BloodMistSound = new SoundPathSpecifier("/Audio/Items/smoke_grenade_smoke.ogg", new() + { + MaxDistance = 7 + }); + } \ No newline at end of file diff --git a/Content.Shared/SS220/DarkReaper/DarkReaperComponent.cs b/Content.Shared/SS220/DarkReaper/DarkReaperComponent.cs index 307f3dbe4d15f5..20f2c902fb4f74 100644 --- a/Content.Shared/SS220/DarkReaper/DarkReaperComponent.cs +++ b/Content.Shared/SS220/DarkReaper/DarkReaperComponent.cs @@ -136,29 +136,6 @@ public sealed partial class DarkReaperComponent : Component [ViewVariables, DataField, AutoNetworkedField] public SoundSpecifier StunAbilitySound = new SoundPathSpecifier("/Audio/SS220/DarkReaper/jnec_scrm.ogg"); - /// BLOOD MIST - - /// - /// How long the mist stays for, after it has spread - /// - [ViewVariables, DataField] - public TimeSpan BloodMistLength = TimeSpan.FromSeconds(10); - /// - /// Proto of what is being spawned by ability - /// - [ViewVariables, DataField] - public string BloodMistProto = "BloodMistSpread"; - - /// - /// BloodMist sound - /// - /// - [ViewVariables, DataField, AutoNetworkedField] - public SoundSpecifier BloodMistSound = new SoundPathSpecifier("/Audio/Items/smoke_grenade_smoke.ogg", new() - { - MaxDistance = 7 - }); - /// ROFL /// diff --git a/Content.Shared/SS220/DarkReaper/DarkReaperSharedSystem.cs b/Content.Shared/SS220/DarkReaper/DarkReaperSharedSystem.cs index f0ec85e9d55a8f..fbb1c9a0a83fe7 100644 --- a/Content.Shared/SS220/DarkReaper/DarkReaperSharedSystem.cs +++ b/Content.Shared/SS220/DarkReaper/DarkReaperSharedSystem.cs @@ -97,9 +97,9 @@ private void OnBloodMistAction(EntityUid uid, DarkReaperComponent comp, ReaperBl if (!comp.PhysicalForm) return; args.Handled = true; - _audio.PlayPredicted(comp.BloodMistSound, uid, uid); + _audio.PlayPredicted(args.BloodMistSound, uid, uid); - DoBloodMistAction(uid, comp); + DoBloodMistAction(uid, args); } private void OnConsumeAction(EntityUid uid, DarkReaperComponent comp, ReaperConsumeEvent args) @@ -191,9 +191,9 @@ protected virtual void DoStunAbility(EntityUid uid, DarkReaperComponent comp) } } - protected virtual void DoBloodMistAction(EntityUid uid, DarkReaperComponent comp) + protected virtual void DoBloodMistAction(EntityUid uid, ReaperBloodMistEvent args) { - Spawn(comp.BloodMistProto, Transform(uid).Coordinates); + Spawn(args.BloodMistProto, Transform(uid).Coordinates); } protected virtual void DoRoflAbility(EntityUid uid, DarkReaperComponent comp) diff --git a/Resources/Textures/SS220/DemonRofler/dark_reaper.rsi/meta.json b/Resources/Textures/SS220/DemonRofler/dark_reaper.rsi/meta.json index f2d5e53863af42..e925c0b6ce3189 100644 --- a/Resources/Textures/SS220/DemonRofler/dark_reaper.rsi/meta.json +++ b/Resources/Textures/SS220/DemonRofler/dark_reaper.rsi/meta.json @@ -1,7 +1,7 @@ { "version": 2, "license": "EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt", - "copyright": "Made by MIXnikita and Lanc for SS220, randomgibs is taken from Paradise build of SS13", + "copyright": "Made by MIXnikita for SS220, randomgibs is taken from Paradise build of SS13, icon_bloodmist made by Lanc for SS220", "size": { "x": 32, "y": 32