mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
CNOs are bye bye on vanilla regions
This commit is contained in:
1 parent
d13d523db1
commit
6ee16dec9c
3 files changed
+19
-9
No files matched your search
@@ -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";
|
||||
|
||||
@@ -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];
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user