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,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);
}
}
}
}