first commit

This commit is contained in:
2025-07-06 00:23:46 +02:00
commit 38f50c8819
1788 changed files with 112878 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
namespace NitroxClient.GameLogic.Simulation
{
public class HandInteraction<T> : LockRequestContext where T : IHandTarget
{
public T Target { get; }
public GUIHand GuiHand { get; }
public HandInteraction(T Target, GUIHand GuiHand)
{
this.Target = Target;
this.GuiHand = GuiHand;
}
}
}

View File

@@ -0,0 +1,27 @@
using NitroxModel.DataStructures;
namespace NitroxClient.GameLogic.Simulation
{
public class LockRequest<T> : LockRequestBase where T : LockRequestContext
{
public delegate void LockRequestCompleted(NitroxId id, bool lockAquired, T context);
private LockRequestCompleted onComplete;
private T context { get; }
public LockRequest(NitroxId id, SimulationLockType lockType, LockRequestCompleted onComplete, T context) : base(id, lockType)
{
this.onComplete = onComplete;
this.context = context;
}
public override void LockRequestComplete(NitroxId id, bool lockAquired)
{
if (onComplete != null)
{
onComplete(id, lockAquired, (T)context);
}
}
}
}

View File

@@ -0,0 +1,18 @@
using NitroxModel.DataStructures;
namespace NitroxClient.GameLogic.Simulation
{
public abstract class LockRequestBase
{
public NitroxId Id { get; }
public SimulationLockType LockType { get; }
public abstract void LockRequestComplete(NitroxId id, bool lockAquired);
public LockRequestBase(NitroxId Id, SimulationLockType LockType) : base()
{
this.Id = Id;
this.LockType = LockType;
}
}
}

View File

@@ -0,0 +1,7 @@
namespace NitroxClient.GameLogic.Simulation
{
// Additional metadata that is necessary to process a lock request
public interface LockRequestContext
{
}
}

View File

@@ -0,0 +1,16 @@
using UnityEngine;
namespace NitroxClient.GameLogic.Simulation
{
public class PropulsionGrab : LockRequestContext
{
public PropulsionCannon Cannon { get; }
public GameObject GrabbedObject { get; }
public PropulsionGrab(PropulsionCannon Cannon, GameObject GrabbedObject)
{
this.Cannon = Cannon;
this.GrabbedObject = GrabbedObject;
}
}
}