CNOs are bye bye on vanilla regions

This commit is contained in:
Gurge44 committed 2026-01-13 13:58:57 +01:00
1 parent d13d523db1
commit 6ee16dec9c
3 files changed
+19 -9

No files matched your search

+2 -2
View File
@@ -42,8 +42,8 @@ public class Main : BasePlugin
private const string DebugKeyHash = "c0fd562955ba56af3ae20d7ec9e64c664f0facecef4b3e366e109306adeae29d";
private const string DebugKeySalt = "59687b";
private const string PluginGuid = "com.gurge44.endlesshostroles";
public const string PluginVersion = "7.1.0";
public const string PluginDisplayVersion = "7.1.0";
public const string PluginVersion = "7.1.1";
public const string PluginDisplayVersion = "7.1.1";
public const bool TestBuild = false;
public const string NeutralColor = "#ffab1b";
+15 -5
View File
@@ -1170,14 +1170,24 @@ public static class GameSettingMenuPatch
Vector3 gameSettingsLabelPos = gameSettingsLabel.transform.localPosition;
CustomGameMode[] gms = Enum.GetValues<CustomGameMode>()[..^1];
gms = gms.Without(CustomGameMode.TheMindGame).ToArray();
if (SubmergedCompatibility.Loaded && Main.NormalOptions.MapId == 6) gms = gms.Where(SubmergedCompatibility.IsSupported).ToArray();
int totalCols = Mathf.Max(1, Mathf.CeilToInt(gms.Length / 7f));
var gms = Enum.GetValues<CustomGameMode>()[..^1].ToList();
gms.Remove(CustomGameMode.TheMindGame);
if (GameStates.CurrentServerType == GameStates.ServerType.Vanilla)
{
gms.Remove(CustomGameMode.CaptureTheFlag);
gms.Remove(CustomGameMode.NaturalDisasters);
gms.Remove(CustomGameMode.BedWars);
}
if (SubmergedCompatibility.Loaded && Main.NormalOptions.MapId == 6)
gms.RemoveAll(SubmergedCompatibility.IsNotSupported);
int totalCols = Mathf.Max(1, Mathf.CeilToInt(gms.Count / 7f));
GMButtons = [];
for (var index = 0; index < gms.Length; index++)
for (var index = 0; index < gms.Count; index++)
{
CustomGameMode gm = gms[index];
+2 -2
View File
@@ -259,9 +259,9 @@ public static class SubmergedCompatibility
return (IList)Activator.CreateInstance(genericListType);
}
public static bool IsSupported(CustomGameMode mode)
public static bool IsNotSupported(CustomGameMode mode)
{
return mode is CustomGameMode.Standard or CustomGameMode.SoloPVP or CustomGameMode.FFA or CustomGameMode.StopAndGo or CustomGameMode.HotPotato or CustomGameMode.HideAndSeek or CustomGameMode.Speedrun or CustomGameMode.CaptureTheFlag or CustomGameMode.RoomRush or CustomGameMode.KingOfTheZones or CustomGameMode.Quiz or CustomGameMode.TheMindGame or CustomGameMode.BedWars;
return mode is CustomGameMode.NaturalDisasters;
}
public enum SubmergedSystemTypes : byte