diff --git a/AriasServerUtils/ASUModSystem.cs b/AriasServerUtils/ASUModSystem.cs index a2eb075..6da73de 100644 --- a/AriasServerUtils/ASUModSystem.cs +++ b/AriasServerUtils/ASUModSystem.cs @@ -133,6 +133,14 @@ namespace AriasServerUtils .WithDescription("This flag controls whether admins can or can not bypass the cooldown system") .HandleWith(Events.HandleUpdateASUBypassCD) .EndSubCommand() + .BeginSubCommand("adminsBypassRTPMaxDist") + .RequiresPrivilege(Privilege.controlserver) + .WithArgs( + parsers.Bool("bypass") + ) + .WithDescription("This flag would allow admins to go further than the max server RTP distance when manually specifying a distance to RTP") + .HandleWith(Events.HandleUpdateASUBypassRTPMaxDist) + .EndSubCommand() .BeginSubCommand("maxback") .RequiresPrivilege(Privilege.controlserver) .WithArgs( diff --git a/AriasServerUtils/EventHandler.cs b/AriasServerUtils/EventHandler.cs index 05da76e..4bc6020 100644 --- a/AriasServerUtils/EventHandler.cs +++ b/AriasServerUtils/EventHandler.cs @@ -567,5 +567,17 @@ namespace AriasServerUtils } else return TextCommandResult.Success(); } + + internal static TextCommandResult HandleUpdateASUBypassRTPMaxDist(TextCommandCallingArgs args) + { + if (args[0] is bool bypass) + { + // Update the flag + ServerUtilities.config.AdminsBypassRTPMaxDistance = bypass; + ServerUtilities.MarkDirty(); + return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig")); + } + else return TextCommandResult.Success(); + } } } \ No newline at end of file diff --git a/AriasServerUtils/Globals.cs b/AriasServerUtils/Globals.cs index cd10039..a98b5cc 100644 --- a/AriasServerUtils/Globals.cs +++ b/AriasServerUtils/Globals.cs @@ -22,7 +22,7 @@ namespace AriasServerUtils { CooldownType.RTP, "30s" }, { CooldownType.Back, "5s" } }; - private static readonly int CURRENT_VERSION = 4; + private static readonly int CURRENT_VERSION = 5; public int Version { get; set; } = 0; @@ -30,9 +30,10 @@ namespace AriasServerUtils public bool AdminsBypassMaxHomes { get; set; } = true; public bool onlyAdminsCreateWarps { get; set; } = true; public bool AdminsBypassCooldowns { get; set; } = true; + public bool AdminsBypassRTPMaxDistance { get; set; } = false; public int MaxBackCache { get; set; } = 10; public int PlayerSleepingPercentage { get; set; } = 50; - public int MaxRTPBlockDistance { get; set; } = 5000; + public int MaxRTPBlockDistance { get; set; } = 50000; public Dictionary Cooldowns { get; set; } = new Dictionary(); public Dictionary GetDefaultCooldowns() diff --git a/AriasServerUtils/modinfo.json b/AriasServerUtils/modinfo.json index aa3c197..f4b8f54 100644 --- a/AriasServerUtils/modinfo.json +++ b/AriasServerUtils/modinfo.json @@ -3,8 +3,8 @@ "modid": "ariasserverutils", "name": "Aria's Server Utilities", "authors": ["zontreck"], - "description": "A collection of server utilities\n\nBuild Date: 03-07-2025 @ 11:49 AM MST", - "version": "1.0.6-dev.2", + "description": "A collection of server utilities\n\nBuild Date: 03-07-2025 @ 11:53 AM MST", + "version": "1.0.6-dev.3", "dependencies": { "game": "" }