Inline HasComponent entirely
This commit is contained in:
@@ -17,7 +17,7 @@ namespace Content.Server.PowerCell.Components
|
||||
|
||||
public override bool IsEntityCompatible(IEntity entity)
|
||||
{
|
||||
return entity.HasComponent<BatteryComponent>();
|
||||
return IoCManager.Resolve<IEntityManager>().HasComponent<BatteryComponent>(entity.Uid);
|
||||
}
|
||||
|
||||
protected override BatteryComponent GetBatteryFrom(IEntity entity)
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Content.Server.PowerCell
|
||||
!args.CanAccess ||
|
||||
!args.CanInteract ||
|
||||
component.HasCell ||
|
||||
!args.Using.HasComponent<PowerCellComponent>() ||
|
||||
!IoCManager.Resolve<IEntityManager>().HasComponent<PowerCellComponent>(args.Using.Uid) ||
|
||||
!_actionBlockerSystem.CanDrop(args.User.Uid))
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user