- fix: Fix crawl.

This commit is contained in:
Aviu00
2024-03-22 13:40:57 +03:00
parent 02b2c19035
commit fc75b6e10f
2 changed files with 6 additions and 9 deletions

View File

@@ -1,19 +1,16 @@
using System.Numerics;
using Content.Server._Amour.Animation; using Content.Server._Amour.Animation;
using Content.Server._Amour.Crawl;
using Content.Server._Amour.Hole; using Content.Server._Amour.Hole;
using Content.Server.Hands.Systems; using Content.Server.Hands.Systems;
using Content.Server.Pulling; using Content.Server.Pulling;
using Content.Shared._Amour.Animation;
using Content.Shared._Amour.InteractionPanel; using Content.Shared._Amour.InteractionPanel;
using Content.Shared.Hands.Components; using Content.Shared.Hands.Components;
using Robust.Shared.Animations; using Content.Shared.Standing;
namespace Content.Server._Amour.InteractionPanel; namespace Content.Server._Amour.InteractionPanel;
public sealed class Interactions : EntitySystem public sealed class Interactions : EntitySystem
{ {
[Dependency] private readonly CrawlSystem _crawlSystem = default!; [Dependency] private readonly StandingStateSystem _standingState = default!;
[Dependency] private readonly SharebleAnimationSystem _animationSystem = default!; [Dependency] private readonly SharebleAnimationSystem _animationSystem = default!;
[Dependency] private readonly PullingSystem _pullingSystem = default!; [Dependency] private readonly PullingSystem _pullingSystem = default!;
[Dependency] private readonly HoleSystem _holeSystem = default!; [Dependency] private readonly HoleSystem _holeSystem = default!;
@@ -47,7 +44,7 @@ public sealed class Interactions : EntitySystem
_pullingSystem.TryStartPull(uid, args.Target); _pullingSystem.TryStartPull(uid, args.Target);
break; break;
case "CrawlTarget" : case "CrawlTarget" :
_crawlSystem.EnableCrawl(args.Target); _standingState.TryLieDown(args.Target);
break; break;
case "ItemOnButt": case "ItemOnButt":
PutHole(uid,"Anus"); PutHole(uid,"Anus");

View File

@@ -1,4 +1,4 @@
using Content.Shared._Amour.Crawl; using Content.Shared.Standing;
namespace Content.Shared._Amour.InteractionPanel.Checks; namespace Content.Shared._Amour.InteractionPanel.Checks;
@@ -22,7 +22,7 @@ public sealed class IsUserCrawl : IInteractionCheck
{ {
public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager) public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager)
{ {
return entityManager.HasComponent<CrawlComponent>(user); return entityManager.System<StandingStateSystem>().IsDown(user);
} }
} }
@@ -30,6 +30,6 @@ public sealed class IsTargetCrawl : IInteractionCheck
{ {
public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager) public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager)
{ {
return entityManager.HasComponent<CrawlComponent>(target); return entityManager.System<StandingStateSystem>().IsDown(target);
} }
} }