Convert Regions/Spawns to JSON (#138)
This commit is contained in:
parent
b8316e9202
commit
390f30e706
117 changed files with 97306 additions and 4848 deletions
|
|
@ -47,7 +47,7 @@ namespace Server.Utilities
|
|||
// check all given args map to params.
|
||||
for (var i = 0; i < args.Length; i++)
|
||||
// if a null reference is passed, but the type is not nullable
|
||||
if ((args[i] == null && paramList[i].ParameterType.IsValueType)
|
||||
if (args[i] == null && paramList[i].ParameterType.IsValueType
|
||||
// or if an arg is not null and is not assignable to the parameter type, skip.
|
||||
|| !(args[i] == null || paramList[i].ParameterType.IsAssignableFrom(args[i])))
|
||||
return false;
|
||||
|
|
@ -65,7 +65,8 @@ namespace Server.Utilities
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new TypeInitializationException(type.ToString(), e);
|
||||
Console.WriteLine(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ namespace Server
|
|||
{
|
||||
public interface IRandomProvider
|
||||
{
|
||||
public uint Next(uint c);
|
||||
public ulong Next(ulong max);
|
||||
public uint Next(uint max);
|
||||
public bool NextBool();
|
||||
public void GetBytes(Span<byte> b);
|
||||
public double NextDouble();
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ namespace Server
|
|||
|
||||
public override void GetBytes(Span<byte> data) => m_Random.GetBytes(data);
|
||||
|
||||
public ulong Next(ulong c) => throw new NotImplementedException();
|
||||
|
||||
public uint Next(uint c) => throw new NotImplementedException();
|
||||
|
||||
public bool NextBool() => throw new NotImplementedException();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue