- fix: some message for interactions

This commit is contained in:
2024-02-27 18:22:15 +03:00
parent a31947423c
commit d5b3f707d1
18 changed files with 486 additions and 77 deletions

View File

@@ -14,7 +14,7 @@ public sealed class ArousalSystem : EntitySystem
private void OnComponentInit(EntityUid uid, ArousalComponent component, ComponentInit args)
{
UpdateAlarm(new Entity<ArousalComponent?>(uid,component));
//UpdateAlarm(new Entity<ArousalComponent?>(uid,component));
}
private void UpdateAlarm(Entity<ArousalComponent?> entity)

View File

@@ -0,0 +1,27 @@
using Content.Shared.Hands.Components;
namespace Content.Shared._Amour.InteractionPanel.Checks;
public sealed class HasItemInUserHand : IInteractionCheck
{
public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager)
{
return entityManager.TryGetComponent<HandsComponent>(user, out var handsComponent) && handsComponent.ActiveHand?.HeldEntity is not null;
}
}
public sealed class UserHasHand : IInteractionCheck
{
public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager)
{
return entityManager.HasComponent<HandsComponent>(user);
}
}
public sealed class TargetHasHand : IInteractionCheck
{
public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager)
{
return entityManager.HasComponent<HandsComponent>(target);
}
}

View File

@@ -6,7 +6,7 @@ public sealed class UserHasButt : IInteractionCheck
{
public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager)
{
return entityManager.System<SharedHoleSystem>().TryFind(user.Owner, "Anus", out _);
return entityManager.System<SharedHoleSystem>().HasAccessTo(user.Owner, "Anus");
}
}
@@ -14,7 +14,7 @@ public sealed class TargetHasButt : IInteractionCheck
{
public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager)
{
return entityManager.System<SharedHoleSystem>().TryFind(target.Owner, "Anus", out _);
return entityManager.System<SharedHoleSystem>().HasAccessTo(target.Owner, "Anus");
}
}
@@ -22,7 +22,7 @@ public sealed class UserHasPenis : IInteractionCheck
{
public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager)
{
return entityManager.System<SharedHoleSystem>().TryFind(user.Owner, "Dick", out _);
return entityManager.System<SharedHoleSystem>().HasAccessTo(user.Owner, "Dick");
}
}
@@ -30,7 +30,7 @@ public sealed class TargetHasPenis : IInteractionCheck
{
public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager)
{
return entityManager.System<SharedHoleSystem>().TryFind(target.Owner, "Dick", out _);
return entityManager.System<SharedHoleSystem>().HasAccessTo(target.Owner, "Dick");
}
}
@@ -38,7 +38,7 @@ public sealed class UserHasVagina : IInteractionCheck
{
public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager)
{
return entityManager.System<SharedHoleSystem>().TryFind(user.Owner, "Vagina", out _);
return entityManager.System<SharedHoleSystem>().HasAccessTo(user.Owner, "Vagina");
}
}
@@ -46,7 +46,7 @@ public sealed class TargetHasVagina : IInteractionCheck
{
public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager)
{
return entityManager.System<SharedHoleSystem>().TryFind(target.Owner, "Vagina", out _);
return entityManager.System<SharedHoleSystem>().HasAccessTo(target.Owner, "Vagina");
}
}
@@ -54,7 +54,7 @@ public sealed class UserHasTesticles : IInteractionCheck
{
public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager)
{
return entityManager.System<SharedHoleSystem>().TryFind(user.Owner, "Testicles", out _);
return entityManager.System<SharedHoleSystem>().HasAccessTo(user.Owner, "Testicles");
}
}
@@ -62,7 +62,7 @@ public sealed class TargetHasTesticles : IInteractionCheck
{
public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager)
{
return entityManager.System<SharedHoleSystem>().TryFind(target.Owner, "Testicles", out _);
return entityManager.System<SharedHoleSystem>().HasAccessTo(target.Owner, "Testicles");
}
}
@@ -70,7 +70,7 @@ public sealed class UserHasBreast : IInteractionCheck
{
public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager)
{
return entityManager.System<SharedHoleSystem>().TryFind(user.Owner, "Breast", out _);
return entityManager.System<SharedHoleSystem>().HasAccessTo(user.Owner, "Breast");
}
}
@@ -78,6 +78,6 @@ public sealed class TargetHasBreast : IInteractionCheck
{
public bool IsAvailable(Entity<InteractionPanelComponent> user, Entity<InteractionPanelComponent> target, IEntityManager entityManager)
{
return entityManager.System<SharedHoleSystem>().TryFind(target.Owner, "Breast", out _);
return entityManager.System<SharedHoleSystem>().HasAccessTo(target.Owner, "Breast");
}
}

View File

@@ -26,14 +26,20 @@ public sealed class InteractionState: EuiStateBase
public NetEntity Performer { get; }
public NetEntity Target { get; }
public HashSet<InteractionEntry> AvailableInteractions;
public HashSet<string> DescUser;
public HashSet<string> DescTarget;
public byte? Arousal;
public InteractionState(NetEntity performer, NetEntity target, HashSet<InteractionEntry> availableInteractions, byte? arousal)
public InteractionState(NetEntity performer, NetEntity target, HashSet<InteractionEntry> availableInteractions, byte? arousal, HashSet<string> descUser, HashSet<string> descTarget)
{
Performer = performer;
Target = target;
AvailableInteractions = availableInteractions;
Arousal = arousal;
DescUser = descUser;
DescTarget = descTarget;
}
}