Skip to content

Commit

Permalink
moved bloodmist params from reaperComp to action datafields
Browse files Browse the repository at this point in the history
  • Loading branch information
TryHardo7 committed Oct 24, 2024
1 parent b0d79f5 commit 1b27f4d
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 28 deletions.
26 changes: 26 additions & 0 deletions Content.Shared/SS220/DarkReaper/DarkReaperActions.cs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -29,4 +31,28 @@ public sealed partial class ReaperSmokeEvent : InstantActionEvent

public sealed partial class ReaperBloodMistEvent : InstantActionEvent
{
[Dependency] private readonly SharedAudioSystem _audio = default!;
/// BLOOD MIST

/// <summary>
/// How long the mist stays for, after it has spread
/// </summary>
[DataField]
public TimeSpan BloodMistLength = TimeSpan.FromSeconds(10);
/// <summary>
/// Proto of what is being spawned by ability
/// </summary>
[DataField]
public string BloodMistProto = "BloodMistSpread";

/// <summary>
/// BloodMist sound
/// </summary>
///
[DataField, AutoNetworkedField]
public SoundSpecifier BloodMistSound = new SoundPathSpecifier("/Audio/Items/smoke_grenade_smoke.ogg", new()
{
MaxDistance = 7
});

}
23 changes: 0 additions & 23 deletions Content.Shared/SS220/DarkReaper/DarkReaperComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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

/// <summary>
/// How long the mist stays for, after it has spread
/// </summary>
[ViewVariables, DataField]
public TimeSpan BloodMistLength = TimeSpan.FromSeconds(10);
/// <summary>
/// Proto of what is being spawned by ability
/// </summary>
[ViewVariables, DataField]
public string BloodMistProto = "BloodMistSpread";

/// <summary>
/// BloodMist sound
/// </summary>
///
[ViewVariables, DataField, AutoNetworkedField]
public SoundSpecifier BloodMistSound = new SoundPathSpecifier("/Audio/Items/smoke_grenade_smoke.ogg", new()
{
MaxDistance = 7
});

/// ROFL

/// <summary>
Expand Down
8 changes: 4 additions & 4 deletions Content.Shared/SS220/DarkReaper/DarkReaperSharedSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 1b27f4d

Please sign in to comment.