diff --git a/Content.Shared/Power/EntitySystems/SharedBatterySystem.cs b/Content.Shared/Power/EntitySystems/SharedBatterySystem.cs index 90931ef9f1..a9d5db3f33 100644 --- a/Content.Shared/Power/EntitySystems/SharedBatterySystem.cs +++ b/Content.Shared/Power/EntitySystems/SharedBatterySystem.cs @@ -12,12 +12,12 @@ public abstract class SharedBatterySystem : EntitySystem SubscribeLocalEvent(OnEmpPulse); } - private void OnEmpPulse(EntityUid uid, BatteryComponent component, ref EmpPulseEvent args) + private void OnEmpPulse(Entity entity, ref EmpPulseEvent args) { args.Affected = true; - UseCharge(uid, args.EnergyConsumption, component); + UseCharge(entity, args.EnergyConsumption, entity.Comp); // Apply a cooldown to the entity's self recharge if needed to avoid it immediately self recharging after an EMP. - TrySetChargeCooldown(uid); + TrySetChargeCooldown(entity); } public virtual float UseCharge(EntityUid uid, float value, BatteryComponent? battery = null) diff --git a/Content.Shared/PowerCell/SharedPowerCellSystem.cs b/Content.Shared/PowerCell/SharedPowerCellSystem.cs index 651ccbe068..7457cae434 100644 --- a/Content.Shared/PowerCell/SharedPowerCellSystem.cs +++ b/Content.Shared/PowerCell/SharedPowerCellSystem.cs @@ -77,9 +77,9 @@ public abstract class SharedPowerCellSystem : EntitySystem RaiseLocalEvent(uid, new PowerCellChangedEvent(true), false); } - private void OnCellEmpAttempt(EntityUid uid, PowerCellComponent component, EmpAttemptEvent args) + private void OnCellEmpAttempt(Entity entity, ref EmpAttemptEvent args) { - var parent = Transform(uid).ParentUid; + var parent = Transform(entity).ParentUid; if (_siliconEmp.ShouldTakeDamageInsteadOfPowerDrain(parent)) // DeltaV - Silicon EMP return;