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,23 @@
using System.Collections.Generic;
using NitroxServer.Helper;
namespace NitroxServer.Resources;
public class RandomSpawnSpoofer
{
private readonly Dictionary<string, string[]> randomPossibilitiesByClassId;
public RandomSpawnSpoofer(Dictionary<string, string[]> randomPossibilitiesByClassId)
{
this.randomPossibilitiesByClassId = randomPossibilitiesByClassId;
}
public void PickRandomClassIdIfRequired(ref string classId)
{
if (randomPossibilitiesByClassId.TryGetValue(classId, out string[] choices))
{
int randomIndex = XORRandom.NextIntRange(0, choices.Length);
classId = choices[randomIndex];
}
}
}