refactor: restructure interaction system into clean layers

This commit is contained in:
2026-08-28 22:35:09 +02:00
parent 3127c1b4af
commit 9fdd565637
33 changed files with 474 additions and 288 deletions
@@ -0,0 +1,19 @@
using Game.Features.Items.Contracts;
namespace Game.Features.Interactions.Application;
public readonly record struct PickupAvailability(bool LeftHand, bool RightHand, bool RequiresBoth);
public sealed class ResolvePickupAvailability
{
public PickupAvailability Resolve(HandRequirement requirement, bool leftHandFree, bool rightHandFree)
{
if (requirement == HandRequirement.Both)
{
bool canUseBoth = leftHandFree && rightHandFree;
return new PickupAvailability(canUseBoth, canUseBoth, true);
}
return new PickupAvailability(leftHandFree, rightHandFree, false);
}
}