mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
fix compile errors
This commit is contained in:
1 parent
945474e9fc
commit
aa8391c542
8 files changed
+27
-27
No files matched your search
@@ -11,13 +11,13 @@ public static class IGameManagerEx
|
||||
opt.SetBool(name, value);
|
||||
}
|
||||
|
||||
public void Set(bool value, NormalGameOptionsV11 opt)
|
||||
public void Set(bool value, NormalGameOptionsV12 opt)
|
||||
{
|
||||
if (name is not BoolOptionNames.GhostsDoTasks and not BoolOptionNames.Roles)
|
||||
opt.SetBool(name, value);
|
||||
}
|
||||
|
||||
public void Set(bool value, HideNSeekGameOptionsV11 opt)
|
||||
public void Set(bool value, HideNSeekGameOptionsV12 opt)
|
||||
{
|
||||
opt.SetBool(name, value);
|
||||
}
|
||||
@@ -30,12 +30,12 @@ public static class IGameManagerEx
|
||||
opt.SetInt(name, value);
|
||||
}
|
||||
|
||||
public void Set(int value, NormalGameOptionsV11 opt)
|
||||
public void Set(int value, NormalGameOptionsV12 opt)
|
||||
{
|
||||
opt.SetInt(name, value);
|
||||
}
|
||||
|
||||
public void Set(int value, HideNSeekGameOptionsV11 opt)
|
||||
public void Set(int value, HideNSeekGameOptionsV12 opt)
|
||||
{
|
||||
opt.SetInt(name, value);
|
||||
}
|
||||
@@ -48,12 +48,12 @@ public static class IGameManagerEx
|
||||
opt.SetFloat(name, value);
|
||||
}
|
||||
|
||||
public void Set(float value, NormalGameOptionsV11 opt)
|
||||
public void Set(float value, NormalGameOptionsV12 opt)
|
||||
{
|
||||
opt.SetFloat(name, value);
|
||||
}
|
||||
|
||||
public void Set(float value, HideNSeekGameOptionsV11 opt)
|
||||
public void Set(float value, HideNSeekGameOptionsV12 opt)
|
||||
{
|
||||
opt.SetFloat(name, value);
|
||||
}
|
||||
@@ -66,12 +66,12 @@ public static class IGameManagerEx
|
||||
opt.SetByte(name, value);
|
||||
}
|
||||
|
||||
public void Set(byte value, NormalGameOptionsV11 opt)
|
||||
public void Set(byte value, NormalGameOptionsV12 opt)
|
||||
{
|
||||
opt.SetByte(name, value);
|
||||
}
|
||||
|
||||
public void Set(byte value, HideNSeekGameOptionsV11 opt)
|
||||
public void Set(byte value, HideNSeekGameOptionsV12 opt)
|
||||
{
|
||||
opt.SetByte(name, value);
|
||||
}
|
||||
@@ -84,12 +84,12 @@ public static class IGameManagerEx
|
||||
opt.SetUInt(name, value);
|
||||
}
|
||||
|
||||
public void Set(uint value, NormalGameOptionsV11 opt)
|
||||
public void Set(uint value, NormalGameOptionsV12 opt)
|
||||
{
|
||||
opt.SetUInt(name, value);
|
||||
}
|
||||
|
||||
public void Set(uint value, HideNSeekGameOptionsV11 opt)
|
||||
public void Set(uint value, HideNSeekGameOptionsV12 opt)
|
||||
{
|
||||
opt.SetUInt(name, value);
|
||||
}
|
||||
|
||||
@@ -23,15 +23,15 @@ public abstract class GameOptionsSender
|
||||
writer.Write((byte)currentGameMode);
|
||||
|
||||
#if IL2CPP
|
||||
if (opt.TryCastFast(out NormalGameOptionsV11 normalOpt))
|
||||
NormalGameOptionsV11.Serialize(writer, normalOpt);
|
||||
else if (opt.TryCastFast(out HideNSeekGameOptionsV11 hnsOpt))
|
||||
if (opt.TryCastFast(out NormalGameOptionsV12 normalOpt))
|
||||
NormalGameOptionsV12.Serialize(writer, normalOpt);
|
||||
else if (opt.TryCastFast(out HideNSeekGameOptionsV12 hnsOpt))
|
||||
#else
|
||||
if (opt is NormalGameOptionsV11 normalOpt)
|
||||
NormalGameOptionsV11.Serialize(writer, normalOpt);
|
||||
else if (opt is HideNSeekGameOptionsV11 hnsOpt)
|
||||
if (opt is NormalGameOptionsV12 normalOpt)
|
||||
NormalGameOptionsV12.Serialize(writer, normalOpt);
|
||||
else if (opt is HideNSeekGameOptionsV12 hnsOpt)
|
||||
#endif
|
||||
HideNSeekGameOptionsV11.Serialize(writer, hnsOpt);
|
||||
HideNSeekGameOptionsV12.Serialize(writer, hnsOpt);
|
||||
else
|
||||
Logger.Error("Option cast failed", ToString());
|
||||
|
||||
|
||||
@@ -19,9 +19,9 @@ public sealed class PlayerGameOptionsSender(PlayerControl player) : GameOptionsS
|
||||
|
||||
private static IGameOptions BasedGameOptions =>
|
||||
#if IL2CPP
|
||||
Main.RealOptionsData.Restore(new NormalGameOptionsV11(new UnityLogger().CastFast<ILogger>()).CastFast<IGameOptions>());
|
||||
Main.RealOptionsData.Restore(new NormalGameOptionsV12(new UnityLogger().CastFast<ILogger>()).CastFast<IGameOptions>());
|
||||
#else
|
||||
Main.RealOptionsData.Restore(new NormalGameOptionsV11(new UnityLogger()));
|
||||
Main.RealOptionsData.Restore(new NormalGameOptionsV12(new UnityLogger()));
|
||||
#endif
|
||||
|
||||
protected override bool IsDirty { get; set; }
|
||||
|
||||
Reference in new issue
Block a user