Add static "IsPowered" method (#8434)
* Add static "IsPowered" method * Use IsPowered in more places Co-authored-by: wrexbe <wrexbe@protonmail.com>
This commit is contained in:
@@ -6,6 +6,7 @@ using Content.Shared.Buckle.Components;
|
||||
using Content.Shared.Body.Components;
|
||||
using Content.Shared.Bed;
|
||||
using Content.Server.Power.Components;
|
||||
using Content.Server.Power.EntitySystems;
|
||||
using Content.Shared.Emag.Systems;
|
||||
using Content.Shared.MobState.Components;
|
||||
|
||||
@@ -78,7 +79,7 @@ namespace Content.Server.Bed
|
||||
if (!TryComp<SharedBodyComponent>(args.BuckledEntity, out var body))
|
||||
return;
|
||||
|
||||
if (TryComp<ApcPowerReceiverComponent>(uid, out var power) && !power.Powered)
|
||||
if (!this.IsPowered(uid, EntityManager))
|
||||
return;
|
||||
|
||||
var metabolicEvent = new ApplyMetabolicMultiplierEvent()
|
||||
|
||||
Reference in New Issue
Block a user