Color flash effect fixes (#18952)
This commit is contained in:
@@ -43,6 +43,7 @@ namespace Content.Shared.Cuffs
|
||||
[Dependency] private readonly ISharedAdminLogManager _adminLog = default!;
|
||||
[Dependency] private readonly ActionBlockerSystem _actionBlocker = default!;
|
||||
[Dependency] private readonly AlertsSystem _alerts = default!;
|
||||
[Dependency] private readonly SharedColorFlashEffectSystem _color = default!;
|
||||
[Dependency] private readonly DamageableSystem _damageSystem = default!;
|
||||
[Dependency] private readonly MobStateSystem _mobState = default!;
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
@@ -592,7 +593,7 @@ namespace Content.Shared.Cuffs
|
||||
|
||||
if (target == user)
|
||||
{
|
||||
RaiseNetworkEvent(new ColorFlashEffectEvent(Color.Red, new List<EntityUid>() { user }));
|
||||
_color.RaiseEffect(Color.Red, new List<EntityUid>() { user }, Filter.Pvs(user, entityManager: EntityManager));
|
||||
_popup.PopupEntity(Loc.GetString("cuffable-component-start-uncuffing-self"), user, user);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -28,14 +28,15 @@ namespace Content.Shared.Damage.Systems;
|
||||
public sealed partial class StaminaSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IGameTiming _timing = default!;
|
||||
[Dependency] private readonly INetManager _net = default!;
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
|
||||
[Dependency] private readonly AlertsSystem _alerts = default!;
|
||||
[Dependency] private readonly MetaDataSystem _metadata = default!;
|
||||
[Dependency] private readonly SharedColorFlashEffectSystem _color = default!;
|
||||
[Dependency] private readonly SharedPopupSystem _popup = default!;
|
||||
[Dependency] private readonly SharedStunSystem _stunSystem = default!;
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
[Dependency] private readonly INetManager _net = default!;
|
||||
|
||||
/// <summary>
|
||||
/// How much of a buffer is there between the stun duration and when stuns can be re-applied.
|
||||
@@ -328,7 +329,7 @@ public sealed partial class StaminaSystem : EntitySystem
|
||||
|
||||
if (visual)
|
||||
{
|
||||
RaiseNetworkEvent(new ColorFlashEffectEvent(Color.Aqua, new List<EntityUid>() { uid }));
|
||||
_color.RaiseEffect(Color.Aqua, new List<EntityUid>() { uid }, Filter.Pvs(uid, entityManager: EntityManager));
|
||||
}
|
||||
|
||||
if (_net.IsServer)
|
||||
|
||||
@@ -20,4 +20,4 @@ public sealed class ColorFlashEffectEvent : EntityEventArgs
|
||||
Color = color;
|
||||
Entities = entities;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
8
Content.Shared/Effects/SharedColorFlashEffectSystem.cs
Normal file
8
Content.Shared/Effects/SharedColorFlashEffectSystem.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using Robust.Shared.Player;
|
||||
|
||||
namespace Content.Shared.Effects;
|
||||
|
||||
public abstract class SharedColorFlashEffectSystem : EntitySystem
|
||||
{
|
||||
public abstract void RaiseEffect(Color color, List<EntityUid> entities, Filter filter);
|
||||
}
|
||||
@@ -515,7 +515,7 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
|
||||
// If the target has stamina and is taking blunt damage, they should also take stamina damage based on their blunt to stamina factor
|
||||
if (damageResult.DamageDict.TryGetValue("Blunt", out var bluntDamage))
|
||||
{
|
||||
_stamina.TakeStaminaDamage(ev.Target.Value, (bluntDamage * component.BluntStaminaDamageFactor).Float(), source:user, with:meleeUid == user ? null : meleeUid);
|
||||
_stamina.TakeStaminaDamage(ev.Target.Value, (bluntDamage * component.BluntStaminaDamageFactor).Float(), visual: false, source: user, with: meleeUid == user ? null : meleeUid);
|
||||
}
|
||||
|
||||
if (meleeUid == user)
|
||||
|
||||
Reference in New Issue
Block a user