From cec641d24b2d3792ab0a50217291080f0cdba5e0 Mon Sep 17 00:00:00 2001 From: whateverusername0 Date: Tue, 6 Aug 2024 13:51:46 +1000 Subject: [PATCH 1/6] gg --- ...eHitEvent.cs => TakeStaminaDamageEvent.cs} | 12 ++++--- .../Damage/Systems/StaminaSystem.cs | 36 +++++++++++++------ .../Inventory/InventorySystem.Relay.cs | 2 ++ .../StaminaDamageResistanceComponent.cs | 12 +++++++ .../StaminaDamageResistanceSystem.cs | 26 ++++++++++++++ .../Locale/en-US/armor/armor-examine.ftl | 1 + 6 files changed, 74 insertions(+), 15 deletions(-) rename Content.Shared/Damage/Events/{StaminaMeleeHitEvent.cs => TakeStaminaDamageEvent.cs} (67%) create mode 100644 Content.Shared/Stunnable/StaminaDamageResistanceComponent.cs create mode 100644 Content.Shared/Stunnable/StaminaDamageResistanceSystem.cs diff --git a/Content.Shared/Damage/Events/StaminaMeleeHitEvent.cs b/Content.Shared/Damage/Events/TakeStaminaDamageEvent.cs similarity index 67% rename from Content.Shared/Damage/Events/StaminaMeleeHitEvent.cs rename to Content.Shared/Damage/Events/TakeStaminaDamageEvent.cs index c5ed0ddb602..b50b591efaf 100644 --- a/Content.Shared/Damage/Events/StaminaMeleeHitEvent.cs +++ b/Content.Shared/Damage/Events/TakeStaminaDamageEvent.cs @@ -1,5 +1,5 @@ using Content.Shared.Damage.Components; -using Robust.Shared.Collections; +using Content.Shared.Inventory; namespace Content.Shared.Damage.Events; @@ -7,12 +7,14 @@ namespace Content.Shared.Damage.Events; /// The components in the list are going to be hit, /// give opportunities to change the damage or other stuff. /// -public sealed class StaminaMeleeHitEvent : HandledEntityEventArgs +public sealed class TakeStaminaDamageEvent : HandledEntityEventArgs, IInventoryRelayEvent { + public SlotFlags TargetSlots { get; } = SlotFlags.WITHOUT_POCKET; + /// /// List of hit stamina components. /// - public List<(EntityUid Entity, StaminaComponent Component)> HitList; + public EntityUid Target; /// /// The multiplier. Generally, try to use *= or /= instead of overwriting. @@ -24,8 +26,8 @@ public sealed class StaminaMeleeHitEvent : HandledEntityEventArgs /// public float FlatModifier = 0; - public StaminaMeleeHitEvent(List<(EntityUid Entity, StaminaComponent Component)> hitList) + public TakeStaminaDamageEvent(EntityUid target) { - HitList = hitList; + Target = target; } } diff --git a/Content.Shared/Damage/Systems/StaminaSystem.cs b/Content.Shared/Damage/Systems/StaminaSystem.cs index de5338615ee..2e1b53995c1 100644 --- a/Content.Shared/Damage/Systems/StaminaSystem.cs +++ b/Content.Shared/Damage/Systems/StaminaSystem.cs @@ -166,20 +166,20 @@ private void OnMeleeHit(EntityUid uid, StaminaDamageOnHitComponent component, Me toHit.Add((ent, stam)); } - var hitEvent = new StaminaMeleeHitEvent(toHit); - RaiseLocalEvent(uid, hitEvent); + foreach (var (ent, comp) in toHit) + { + var hitEvent = new TakeStaminaDamageEvent((ent, comp)); + RaiseLocalEvent(uid, hitEvent); - if (hitEvent.Handled) - return; + if (hitEvent.Handled) + return; - var damage = component.Damage; + var damage = component.Damage; - damage *= hitEvent.Multiplier; + damage *= hitEvent.Multiplier; - damage += hitEvent.FlatModifier; + damage += hitEvent.FlatModifier; - foreach (var (ent, comp) in toHit) - { TakeStaminaDamage(ent, damage / toHit.Count, comp, source: args.User, with: args.Weapon, sound: component.Sound); } } @@ -204,12 +204,28 @@ private void OnThrowHit(EntityUid uid, StaminaDamageOnCollideComponent component private void OnCollide(EntityUid uid, StaminaDamageOnCollideComponent component, EntityUid target) { + if (!TryComp(target, out var stamComp)) + return; + var ev = new StaminaDamageOnHitAttemptEvent(); RaiseLocalEvent(uid, ref ev); if (ev.Cancelled) return; - TakeStaminaDamage(target, component.Damage, source: uid, sound: component.Sound); + // goobstation + var hitEvent = new TakeStaminaDamageEvent((target, stamComp)); + RaiseLocalEvent(target, hitEvent); + + if (hitEvent.Handled) + return; + + var damage = component.Damage; + + damage *= hitEvent.Multiplier; + + damage += hitEvent.FlatModifier; + + TakeStaminaDamage(target, damage, source: uid, sound: component.Sound); } private void SetStaminaAlert(EntityUid uid, StaminaComponent? component = null) diff --git a/Content.Shared/Inventory/InventorySystem.Relay.cs b/Content.Shared/Inventory/InventorySystem.Relay.cs index c43a5885077..3308e881c52 100644 --- a/Content.Shared/Inventory/InventorySystem.Relay.cs +++ b/Content.Shared/Inventory/InventorySystem.Relay.cs @@ -1,5 +1,6 @@ using Content.Shared.Chemistry; using Content.Shared.Damage; +using Content.Shared.Damage.Events; using Content.Shared.Electrocution; using Content.Shared.Explosion; using Content.Shared.Eye.Blinding.Systems; @@ -20,6 +21,7 @@ public partial class InventorySystem public void InitializeRelay() { SubscribeLocalEvent(RelayInventoryEvent); + SubscribeLocalEvent(RelayInventoryEvent); SubscribeLocalEvent(RelayInventoryEvent); SubscribeLocalEvent(RelayInventoryEvent); SubscribeLocalEvent(RelayInventoryEvent); diff --git a/Content.Shared/Stunnable/StaminaDamageResistanceComponent.cs b/Content.Shared/Stunnable/StaminaDamageResistanceComponent.cs new file mode 100644 index 00000000000..dc291bbe8ba --- /dev/null +++ b/Content.Shared/Stunnable/StaminaDamageResistanceComponent.cs @@ -0,0 +1,12 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Stunnable; + +[RegisterComponent, NetworkedComponent] +public sealed partial class StaminaDamageResistanceComponent : Component +{ + /// + /// 1 - no reduction, 0 - full reduction + /// + [DataField] public float Coefficient = 1; +} diff --git a/Content.Shared/Stunnable/StaminaDamageResistanceSystem.cs b/Content.Shared/Stunnable/StaminaDamageResistanceSystem.cs new file mode 100644 index 00000000000..7632eed504d --- /dev/null +++ b/Content.Shared/Stunnable/StaminaDamageResistanceSystem.cs @@ -0,0 +1,26 @@ +using Content.Shared.Damage.Events; +using Content.Shared.Examine; +using Content.Shared.Inventory; + +namespace Content.Shared.Stunnable; + +public sealed partial class StaminaDamageResistanceSystem : EntitySystem +{ + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent>(OnStaminaMeleeHit); + SubscribeLocalEvent(OnExamine); + } + + private void OnStaminaMeleeHit(Entity ent, ref InventoryRelayedEvent args) + { + args.Args.Multiplier *= ent.Comp.Coefficient; + } + private void OnExamine(Entity ent, ref ExaminedEvent args) + { + var percentage = (1 - ent.Comp.Coefficient) * 100; + args.PushMarkup(Loc.GetString("armor-examine-stamina", ("num", percentage))); + } +} diff --git a/Resources/Locale/en-US/armor/armor-examine.ftl b/Resources/Locale/en-US/armor/armor-examine.ftl index d49a1373f28..6dc511e66e5 100644 --- a/Resources/Locale/en-US/armor/armor-examine.ftl +++ b/Resources/Locale/en-US/armor/armor-examine.ftl @@ -17,3 +17,4 @@ armor-damage-type-cold = Cold armor-damage-type-poison = Poison armor-damage-type-shock = Shock armor-damage-type-structural = Structural +armor-examine-stamina = Reduces your stamina damage by [color=cyan]{$num}%[/color]. \ No newline at end of file From 4d235298e6d86e21188d58ade5578e5ee43397e9 Mon Sep 17 00:00:00 2001 From: whateverusername0 Date: Tue, 6 Aug 2024 13:59:54 +1000 Subject: [PATCH 2/6] c --- .../OuterClothing/base_clothingouter.yml | 2 + .../Clothing/OuterClothing/hardsuits.yml | 44 +++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/base_clothingouter.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/base_clothingouter.yml index 8f4312e7711..1e5f259afaf 100644 --- a/Resources/Prototypes/Entities/Clothing/OuterClothing/base_clothingouter.yml +++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/base_clothingouter.yml @@ -141,6 +141,8 @@ - type: Clothing equipDelay: 2.5 # Hardsuits are heavy and take a while to put on/off. unequipDelay: 2.5 + - type: StaminaDamageResistance + coefficient: 0.75 # 25% - type: entity abstract: true diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/hardsuits.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/hardsuits.yml index e0d8e7290da..70ab3016469 100644 --- a/Resources/Prototypes/Entities/Clothing/OuterClothing/hardsuits.yml +++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/hardsuits.yml @@ -100,6 +100,8 @@ - type: HeldSpeedModifier - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitEngineering + - type: StaminaDamageResistance + coefficient: 0.75 # 25% #Spationaut Hardsuit - type: entity @@ -221,6 +223,8 @@ - type: HeldSpeedModifier - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitSecurity + - type: StaminaDamageResistance + coefficient: 0.75 # 25% #Brigmedic Hardsuit - type: entity @@ -248,6 +252,8 @@ - type: HeldSpeedModifier - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitBrigmedic + - type: StaminaDamageResistance + coefficient: 0.75 # 25% #Warden's Hardsuit - type: entity @@ -278,6 +284,8 @@ - type: HeldSpeedModifier - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitWarden + - type: StaminaDamageResistance + coefficient: 0.65 # 35% #Captain's Hardsuit - type: entity @@ -310,6 +318,8 @@ - type: HeldSpeedModifier - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitCap + - type: StaminaDamageResistance + coefficient: 0.5 # 50% #Chief Engineer's Hardsuit - type: entity @@ -345,6 +355,8 @@ - type: ClothingGrantComponent component: - type: SupermatterImmune + - type: StaminaDamageResistance + coefficient: 0.65 # 35% #Chief Medical Officer's Hardsuit - type: entity @@ -412,6 +424,8 @@ price: 750 - type: StealTarget stealGroup: ClothingOuterHardsuitRd + - type: StaminaDamageResistance + coefficient: 0.75 # 25% as in "shock resistance" :trollface: #Head of Security's Hardsuit - type: entity @@ -443,6 +457,8 @@ - type: HeldSpeedModifier - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitSecurityRed + - type: StaminaDamageResistance + coefficient: 0.5 # 50% #Luxury Mining Hardsuit - type: entity @@ -520,6 +536,8 @@ - Hardsuit - WhitelistChameleon - HidesHarpyWings + - type: StaminaDamageResistance + coefficient: 0.5 # 50% # Syndicate Medic Hardsuit - type: entity @@ -539,6 +557,8 @@ - Hardsuit - WhitelistChameleon - HidesHarpyWings + - type: StaminaDamageResistance + coefficient: 0.5 # 50% #Syndicate Elite Hardsuit - type: entity @@ -575,6 +595,8 @@ - type: HeldSpeedModifier - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitSyndieElite + - type: StaminaDamageResistance + coefficient: 0.5 # 50% #Syndicate Commander Hardsuit - type: entity @@ -607,6 +629,8 @@ - type: HeldSpeedModifier - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitSyndieCommander + - type: StaminaDamageResistance + coefficient: 0.5 # 50% #Cybersun Juggernaut Hardsuit - type: entity @@ -639,6 +663,8 @@ - type: HeldSpeedModifier - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitCybersun + - type: StaminaDamageResistance + coefficient: 0.5 # 50% #Wizard Hardsuit - type: entity @@ -671,6 +697,8 @@ - type: HeldSpeedModifier - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitWizard + - type: StaminaDamageResistance + coefficient: 0.5 # 50% #Ling Space Suit - type: entity @@ -766,6 +794,8 @@ clothingPrototype: ClothingHeadHelmetHardsuitPirateCap - type: StaticPrice price: 0 + - type: StaminaDamageResistance + coefficient: 0.75 # 25% #CENTCOMM / ERT HARDSUITS #ERT Leader Hardsuit @@ -781,6 +811,8 @@ sprite: Clothing/OuterClothing/Hardsuits/ERTSuits/ertleader.rsi - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitERTLeader + - type: StaminaDamageResistance + coefficient: 0.5 # 50% #ERT Chaplain Hardsuit - type: entity @@ -795,6 +827,8 @@ sprite: Clothing/OuterClothing/Hardsuits/ERTSuits/ertchaplain.rsi - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitERTChaplain + - type: StaminaDamageResistance + coefficient: 0.5 # 50% #ERT Engineer Hardsuit - type: entity @@ -809,6 +843,8 @@ sprite: Clothing/OuterClothing/Hardsuits/ERTSuits/ertengineer.rsi - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitERTEngineer + - type: StaminaDamageResistance + coefficient: 0.5 # 50% #ERT Medic Hardsuit - type: entity @@ -823,6 +859,8 @@ sprite: Clothing/OuterClothing/Hardsuits/ERTSuits/ertmedical.rsi - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitERTMedical + - type: StaminaDamageResistance + coefficient: 0.5 # 50% #ERT Security Hardsuit - type: entity @@ -841,6 +879,8 @@ tags: - Hardsuit - WhitelistChameleon + - type: StaminaDamageResistance + coefficient: 0.5 # 50% #ERT Janitor Hardsuit - type: entity @@ -855,6 +895,8 @@ sprite: Clothing/OuterClothing/Hardsuits/ERTSuits/ertjanitor.rsi - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitERTJanitor + - type: StaminaDamageResistance + coefficient: 0.5 # 50% #Deathsquad - type: entity @@ -889,6 +931,8 @@ - type: HeldSpeedModifier - type: ToggleableClothing clothingPrototype: ClothingHeadHelmetHardsuitDeathsquad + - type: StaminaDamageResistance + coefficient: 0.1 # 90% #CBURN Hardsuit - type: entity From cb8086fde643e9748d12626e50c838ab206d7172 Mon Sep 17 00:00:00 2001 From: whateverusername0 Date: Tue, 6 Aug 2024 14:12:03 +1000 Subject: [PATCH 3/6] bruh advertisment unreal --- Content.Shared/Damage/Systems/StaminaSystem.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Content.Shared/Damage/Systems/StaminaSystem.cs b/Content.Shared/Damage/Systems/StaminaSystem.cs index 2e1b53995c1..384df26e221 100644 --- a/Content.Shared/Damage/Systems/StaminaSystem.cs +++ b/Content.Shared/Damage/Systems/StaminaSystem.cs @@ -212,7 +212,6 @@ private void OnCollide(EntityUid uid, StaminaDamageOnCollideComponent component, if (ev.Cancelled) return; - // goobstation var hitEvent = new TakeStaminaDamageEvent((target, stamComp)); RaiseLocalEvent(target, hitEvent); From d22c13f2b70fa38bca282d643e14621ca5a13f3a Mon Sep 17 00:00:00 2001 From: whateverusername0 Date: Tue, 6 Aug 2024 14:18:38 +1000 Subject: [PATCH 4/6] dammit --- Content.Shared/Damage/Events/TakeStaminaDamageEvent.cs | 2 +- Content.Shared/Damage/Systems/StaminaSystem.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Content.Shared/Damage/Events/TakeStaminaDamageEvent.cs b/Content.Shared/Damage/Events/TakeStaminaDamageEvent.cs index b50b591efaf..6fca9dc2ef3 100644 --- a/Content.Shared/Damage/Events/TakeStaminaDamageEvent.cs +++ b/Content.Shared/Damage/Events/TakeStaminaDamageEvent.cs @@ -9,7 +9,7 @@ namespace Content.Shared.Damage.Events; /// public sealed class TakeStaminaDamageEvent : HandledEntityEventArgs, IInventoryRelayEvent { - public SlotFlags TargetSlots { get; } = SlotFlags.WITHOUT_POCKET; + public SlotFlags TargetSlots { get; } = ~SlotFlags.POCKET; /// /// List of hit stamina components. diff --git a/Content.Shared/Damage/Systems/StaminaSystem.cs b/Content.Shared/Damage/Systems/StaminaSystem.cs index 384df26e221..5c46e6055d1 100644 --- a/Content.Shared/Damage/Systems/StaminaSystem.cs +++ b/Content.Shared/Damage/Systems/StaminaSystem.cs @@ -168,7 +168,7 @@ private void OnMeleeHit(EntityUid uid, StaminaDamageOnHitComponent component, Me foreach (var (ent, comp) in toHit) { - var hitEvent = new TakeStaminaDamageEvent((ent, comp)); + var hitEvent = new TakeStaminaDamageEvent(ent); RaiseLocalEvent(uid, hitEvent); if (hitEvent.Handled) @@ -212,7 +212,7 @@ private void OnCollide(EntityUid uid, StaminaDamageOnCollideComponent component, if (ev.Cancelled) return; - var hitEvent = new TakeStaminaDamageEvent((target, stamComp)); + var hitEvent = new TakeStaminaDamageEvent(target); RaiseLocalEvent(target, hitEvent); if (hitEvent.Handled) From ca22ddeb43890c5a0189d6168d5b7edfb7b65d3e Mon Sep 17 00:00:00 2001 From: whateverusername0 Date: Tue, 6 Aug 2024 14:40:51 +1000 Subject: [PATCH 5/6] god save my soul --- Content.Server/Nyanotrasen/Abilities/Boxer/BoxingSystem.cs | 4 ++-- Content.Server/Nyanotrasen/Abilities/Oni/OniSystem.cs | 4 ++-- Content.Server/Nyanotrasen/Psionics/PsionicsSystem.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Content.Server/Nyanotrasen/Abilities/Boxer/BoxingSystem.cs b/Content.Server/Nyanotrasen/Abilities/Boxer/BoxingSystem.cs index 8bb68cb6f55..6f533c34199 100644 --- a/Content.Server/Nyanotrasen/Abilities/Boxer/BoxingSystem.cs +++ b/Content.Server/Nyanotrasen/Abilities/Boxer/BoxingSystem.cs @@ -14,7 +14,7 @@ public override void Initialize() base.Initialize(); SubscribeLocalEvent(OnInit); SubscribeLocalEvent(OnMeleeHit); - SubscribeLocalEvent(OnStamHit); + SubscribeLocalEvent(OnStamHit); } private void OnInit(EntityUid uid, BoxerComponent component, ComponentInit args) @@ -27,7 +27,7 @@ private void OnMeleeHit(EntityUid uid, BoxerComponent component, MeleeHitEvent a args.ModifiersList.Add(component.UnarmedModifiers); } - private void OnStamHit(EntityUid uid, BoxingGlovesComponent component, StaminaMeleeHitEvent args) + private void OnStamHit(EntityUid uid, BoxingGlovesComponent component, TakeStaminaDamageEvent args) { if (!_containerSystem.TryGetContainingContainer(uid, out var equipee)) return; diff --git a/Content.Server/Nyanotrasen/Abilities/Oni/OniSystem.cs b/Content.Server/Nyanotrasen/Abilities/Oni/OniSystem.cs index 6fdb27097e9..4fc078e85bc 100644 --- a/Content.Server/Nyanotrasen/Abilities/Oni/OniSystem.cs +++ b/Content.Server/Nyanotrasen/Abilities/Oni/OniSystem.cs @@ -21,7 +21,7 @@ public override void Initialize() SubscribeLocalEvent(OnEntRemoved); SubscribeLocalEvent(OnOniMeleeHit); SubscribeLocalEvent(OnHeldMeleeHit); - SubscribeLocalEvent(OnStamHit); + SubscribeLocalEvent(OnStamHit); } private void OnEntInserted(EntityUid uid, OniComponent component, EntInsertedIntoContainerMessage args) @@ -68,7 +68,7 @@ private void OnHeldMeleeHit(EntityUid uid, HeldByOniComponent component, MeleeHi args.ModifiersList.Add(oni.MeleeModifiers); } - private void OnStamHit(EntityUid uid, HeldByOniComponent component, StaminaMeleeHitEvent args) + private void OnStamHit(EntityUid uid, HeldByOniComponent component, TakeStaminaDamageEvent args) { if (!TryComp(component.Holder, out var oni)) return; diff --git a/Content.Server/Nyanotrasen/Psionics/PsionicsSystem.cs b/Content.Server/Nyanotrasen/Psionics/PsionicsSystem.cs index 5a96af2e96b..b5388f6b87b 100644 --- a/Content.Server/Nyanotrasen/Psionics/PsionicsSystem.cs +++ b/Content.Server/Nyanotrasen/Psionics/PsionicsSystem.cs @@ -51,7 +51,7 @@ public override void Initialize() base.Initialize(); SubscribeLocalEvent(OnStartup); SubscribeLocalEvent(OnMeleeHit); - SubscribeLocalEvent(OnStamHit); + SubscribeLocalEvent(OnStamHit); SubscribeLocalEvent(OnInit); SubscribeLocalEvent(OnRemove); @@ -110,7 +110,7 @@ private void OnRemove(EntityUid uid, PsionicComponent component, ComponentRemove _npcFactonSystem.RemoveFaction(uid, "PsionicInterloper"); } - private void OnStamHit(EntityUid uid, AntiPsionicWeaponComponent component, StaminaMeleeHitEvent args) + private void OnStamHit(EntityUid uid, AntiPsionicWeaponComponent component, TakeStaminaDamageEvent args) { var bonus = false; foreach (var stam in args.HitList) From b0469f14e5f3e1f13025bab684c78c37e16f61f1 Mon Sep 17 00:00:00 2001 From: whateverusername0 Date: Tue, 6 Aug 2024 14:41:28 +1000 Subject: [PATCH 6/6] sd --- Content.Server/Nyanotrasen/Psionics/PsionicsSystem.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Content.Server/Nyanotrasen/Psionics/PsionicsSystem.cs b/Content.Server/Nyanotrasen/Psionics/PsionicsSystem.cs index b5388f6b87b..33505e3f6fc 100644 --- a/Content.Server/Nyanotrasen/Psionics/PsionicsSystem.cs +++ b/Content.Server/Nyanotrasen/Psionics/PsionicsSystem.cs @@ -113,11 +113,9 @@ private void OnRemove(EntityUid uid, PsionicComponent component, ComponentRemove private void OnStamHit(EntityUid uid, AntiPsionicWeaponComponent component, TakeStaminaDamageEvent args) { var bonus = false; - foreach (var stam in args.HitList) - { - if (HasComp(stam.Entity)) - bonus = true; - } + + if (HasComp(args.Target)) + bonus = true; if (!bonus) return;