Move and rename damage effect to color flash effect (#18263)
* move damage effect to different package * rename to ColorFlashEffect * renaming some other things
This commit is contained in:
@@ -10,6 +10,7 @@ using Content.Server.Weapons.Ranged.Components;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Damage.Systems;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Effects;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Interaction.Components;
|
||||
using Content.Shared.Projectiles;
|
||||
@@ -225,7 +226,7 @@ public sealed partial class GunSystem : SharedGunSystem
|
||||
{
|
||||
var hitEntity = lastHit.Value;
|
||||
if (hitscan.StaminaDamage > 0f)
|
||||
_stamina.TakeStaminaDamage(hitEntity, hitscan.StaminaDamage, source:user);
|
||||
_stamina.TakeStaminaDamage(hitEntity, hitscan.StaminaDamage, source: user);
|
||||
|
||||
var dmg = hitscan.Damage;
|
||||
|
||||
@@ -239,7 +240,7 @@ public sealed partial class GunSystem : SharedGunSystem
|
||||
if (!Deleted(hitEntity))
|
||||
{
|
||||
if (dmg.Total > FixedPoint2.Zero)
|
||||
RaiseNetworkEvent(new DamageEffectEvent(Color.Red, new List<EntityUid> {hitEntity}), Filter.Pvs(hitEntity, entityManager: EntityManager));
|
||||
RaiseNetworkEvent(new ColorFlashEffectEvent(Color.Red, new List<EntityUid> { hitEntity }), Filter.Pvs(hitEntity, entityManager: EntityManager));
|
||||
|
||||
// TODO get fallback position for playing hit sound.
|
||||
PlayImpactSound(hitEntity, dmg, hitscan.Sound, hitscan.ForceSound);
|
||||
@@ -343,7 +344,7 @@ public sealed partial class GunSystem : SharedGunSystem
|
||||
return angle;
|
||||
}
|
||||
|
||||
protected override void Popup(string message, EntityUid? uid, EntityUid? user) {}
|
||||
protected override void Popup(string message, EntityUid? uid, EntityUid? user) { }
|
||||
|
||||
protected override void CreateEffect(EntityUid uid, MuzzleFlashEvent message, EntityUid? user = null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user