2024-05-03 14:26:57 +03:00
|
|
|
using Content.Shared.Standing.Systems;
|
2024-02-26 21:43:11 +03:00
|
|
|
|
2024-02-23 18:52:03 +03:00
|
|
|
namespace Content.Shared._Amour.InteractionPanel.Checks;
|
|
|
|
|
|
|
|
|
|
public sealed class InteractSelf : IInteractionCheck
|
|
|
|
|
{
|
|
|
|
|
public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager)
|
|
|
|
|
{
|
|
|
|
|
return user == target;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public sealed class CantInteractSelf: IInteractionCheck
|
|
|
|
|
{
|
|
|
|
|
public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager)
|
|
|
|
|
{
|
|
|
|
|
return user != target;
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-02-26 21:43:11 +03:00
|
|
|
|
|
|
|
|
public sealed class IsUserCrawl : IInteractionCheck
|
|
|
|
|
{
|
|
|
|
|
public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager)
|
|
|
|
|
{
|
2024-05-03 14:26:57 +03:00
|
|
|
return entityManager.System<SharedStandingStateSystem>().IsDown(user);
|
2024-02-26 21:43:11 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public sealed class IsTargetCrawl : IInteractionCheck
|
|
|
|
|
{
|
|
|
|
|
public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager)
|
|
|
|
|
{
|
2024-05-03 14:26:57 +03:00
|
|
|
return entityManager.System<SharedStandingStateSystem>().IsDown(target);
|
2024-02-26 21:43:11 +03:00
|
|
|
}
|
|
|
|
|
}
|