Release 1.1.0

Fix setwarpmount cost.
Fix #6
This commit is contained in:
zontreck 2025-06-07 13:56:53 -07:00
parent c269066a26
commit 98d9097ba5
2 changed files with 36 additions and 14 deletions

View file

@ -567,7 +567,7 @@ namespace AriasServerUtils
// Check for the gears and pay here, or show error. // Check for the gears and pay here, or show error.
withMount = true; withMount = true;
} }
int cost = ServerUtilities.config.cmdCosts.costs[withMount ? CommandCosts.CostType.sethomemount : CommandCosts.CostType.setwarp]; int cost = ServerUtilities.config.cmdCosts.costs[withMount ? CommandCosts.CostType.setwarpmount : CommandCosts.CostType.setwarp];
int balance = RustyGearUtils.CountRustyGears(isp); int balance = RustyGearUtils.CountRustyGears(isp);
if (cost > 0) if (cost > 0)
@ -867,77 +867,99 @@ namespace AriasServerUtils
{ {
UpdateCost(CommandCosts.CostType.spawn, args); UpdateCost(CommandCosts.CostType.spawn, args);
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig")); int cost = 0;
if (args[0] is int nc) cost = nc;
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig", cost));
} }
internal static TextCommandResult HandleASUUpdateCommandCostRTP(TextCommandCallingArgs args) internal static TextCommandResult HandleASUUpdateCommandCostRTP(TextCommandCallingArgs args)
{ {
UpdateCost(CommandCosts.CostType.rtp, args); UpdateCost(CommandCosts.CostType.rtp, args);
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig")); int cost = 0;
if (args[0] is int nc) cost = nc;
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig", cost));
} }
internal static TextCommandResult HandleASUUpdateCommandCostBack(TextCommandCallingArgs args) internal static TextCommandResult HandleASUUpdateCommandCostBack(TextCommandCallingArgs args)
{ {
UpdateCost(CommandCosts.CostType.back, args); UpdateCost(CommandCosts.CostType.back, args);
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig")); int cost = 0;
if (args[0] is int nc) cost = nc;
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig", cost));
} }
internal static TextCommandResult HandleASUUpdateCommandCostSetHome(TextCommandCallingArgs args) internal static TextCommandResult HandleASUUpdateCommandCostSetHome(TextCommandCallingArgs args)
{ {
UpdateCost(CommandCosts.CostType.sethome, args); UpdateCost(CommandCosts.CostType.sethome, args);
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig")); int cost = 0;
if (args[0] is int nc) cost = nc;
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig", cost));
} }
internal static TextCommandResult HandleASUUpdateCommandCostHome(TextCommandCallingArgs args) internal static TextCommandResult HandleASUUpdateCommandCostHome(TextCommandCallingArgs args)
{ {
UpdateCost(CommandCosts.CostType.home, args); UpdateCost(CommandCosts.CostType.home, args);
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig")); int cost = 0;
if (args[0] is int nc) cost = nc;
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig", cost));
} }
internal static TextCommandResult HandleASUUpdateCommandCostDelHome(TextCommandCallingArgs args) internal static TextCommandResult HandleASUUpdateCommandCostDelHome(TextCommandCallingArgs args)
{ {
UpdateCost(CommandCosts.CostType.delhome, args); UpdateCost(CommandCosts.CostType.delhome, args);
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig")); int cost = 0;
if (args[0] is int nc) cost = nc;
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig", cost));
} }
internal static TextCommandResult HandleASUUpdateCommandCostSetHomeMount(TextCommandCallingArgs args) internal static TextCommandResult HandleASUUpdateCommandCostSetHomeMount(TextCommandCallingArgs args)
{ {
UpdateCost(CommandCosts.CostType.sethomemount, args); UpdateCost(CommandCosts.CostType.sethomemount, args);
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig")); int cost = 0;
if (args[0] is int nc) cost = nc;
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig", cost));
} }
internal static TextCommandResult HandleASUUpdateCommandCostWarp(TextCommandCallingArgs args) internal static TextCommandResult HandleASUUpdateCommandCostWarp(TextCommandCallingArgs args)
{ {
UpdateCost(CommandCosts.CostType.warp, args); UpdateCost(CommandCosts.CostType.warp, args);
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig")); int cost = 0;
if (args[0] is int nc) cost = nc;
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig", cost));
} }
internal static TextCommandResult HandleASUUpdateCommandCostSetWarp(TextCommandCallingArgs args) internal static TextCommandResult HandleASUUpdateCommandCostSetWarp(TextCommandCallingArgs args)
{ {
UpdateCost(CommandCosts.CostType.setwarp, args); UpdateCost(CommandCosts.CostType.setwarp, args);
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig")); int cost = 0;
if (args[0] is int nc) cost = nc;
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig", cost));
} }
internal static TextCommandResult HandleASUUpdateCommandCostDelWarp(TextCommandCallingArgs args) internal static TextCommandResult HandleASUUpdateCommandCostDelWarp(TextCommandCallingArgs args)
{ {
UpdateCost(CommandCosts.CostType.delwarp, args); UpdateCost(CommandCosts.CostType.delwarp, args);
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig")); int cost = 0;
if (args[0] is int nc) cost = nc;
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig", cost));
} }
internal static TextCommandResult HandleASUUpdateCommandCostSetWarpMount(TextCommandCallingArgs args) internal static TextCommandResult HandleASUUpdateCommandCostSetWarpMount(TextCommandCallingArgs args)
{ {
UpdateCost(CommandCosts.CostType.setwarpmount, args); UpdateCost(CommandCosts.CostType.setwarpmount, args);
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig")); int cost = 0;
if (args[0] is int nc) cost = nc;
return TextCommandResult.Success(Lang.Get($"{ServerUtilities.MOD_ID}:updatedconfig", cost));
} }
} }
} }

View file

@ -3,8 +3,8 @@
"modid": "ariasserverutils", "modid": "ariasserverutils",
"name": "Aria's Server Utilities", "name": "Aria's Server Utilities",
"authors": ["zontreck"], "authors": ["zontreck"],
"description": "A collection of server utilities\n\nBuild Date: 06-07-2025 @ 1:47 PM MST", "description": "A collection of server utilities\n\nBuild Date: 06-07-2025 @ 1:56 PM MST",
"version": "1.1.0-dev.8", "version": "1.1.0",
"dependencies": { "dependencies": {
"game": "" "game": ""
} }