Release v1.0.1

This commit is contained in:
zontreck 2025-01-18 15:19:04 -07:00
parent 70664e91c4
commit e561ced568
3 changed files with 35 additions and 18 deletions

View file

@ -89,12 +89,23 @@ namespace AriasServerUtils
api.ChatCommands.Create("asu")
.RequiresPrivilege(Privilege.chat)
.BeginSubCommand("update")
.RequiresPlayer()
.RequiresPrivilege(Privilege.controlserver)
.WithArgs(
parsers.Int("maxHomes"),
parsers.Bool("adminsBypass"))
.HandleWith(Events.HandleUpdateASU)
.BeginSubCommand("maxhomes")
.RequiresPrivilege(Privilege.controlserver)
.WithArgs(
parsers.Int("maxHomes")
)
.WithDescription("Updates the maximum number of homes")
.HandleWith(Events.HandleUpdateASUMaxHomes)
.EndSubCommand()
.BeginSubCommand("adminhomes")
.RequiresPrivilege(Privilege.controlserver)
.WithArgs(
parsers.Bool("adminsBypass")
)
.WithDescription("Updates the flag deciding whether admins can bypass max number of homes")
.HandleWith(Events.HandleUpdateASUBypass)
.EndSubCommand()
.WithDescription("Updates the ASU mod configuration")
.EndSubCommand()
.BeginSubCommand("help")

View file

@ -185,25 +185,31 @@ namespace AriasServerUtils
return TextCommandResult.Success();
}
internal static TextCommandResult HandleUpdateASU(TextCommandCallingArgs args)
internal static TextCommandResult HandleUpdateASUBypass(TextCommandCallingArgs args)
{
if (args[0] is int maxHomes)
if (args[1] is bool bypass)
{
ServerUtilities.config.MaxHomes = maxHomes;
if (args[1] is bool bypass)
{
ServerUtilities.config.AdminsBypassMaxHomes = bypass;
}
ServerUtilities.config.AdminsBypassMaxHomes = bypass;
ServerUtilities.MarkDirty();
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig"));
}
return TextCommandResult.Success();
}
internal static TextCommandResult HandleUpdateASUMaxHomes(TextCommandCallingArgs args)
{
if (args[0] is int maxHomes)
{
ServerUtilities.config.MaxHomes = maxHomes;
ServerUtilities.MarkDirty();
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig"));
}
return TextCommandResult.Success();
}
}
}

View file

@ -3,8 +3,8 @@
"modid": "ariasserverutils",
"name": "Aria's Server Utilities",
"authors": ["zontreck"],
"description": "A collection of server utilities\n\nBuild Date: 01-18-2025 @ 02:46 PM",
"version": "1.0.0-dev.10",
"description": "A collection of server utilities\n\nBuild Date: 01-18-2025 @ 03:18 PM",
"version": "1.0.1",
"dependencies": {
"game": ""
}