aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/sh_progression.nut10
1 files changed, 8 insertions, 2 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/sh_progression.nut b/Northstar.CustomServers/mod/scripts/vscripts/sh_progression.nut
index 2dc88d0d4..5098dd328 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/sh_progression.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/sh_progression.nut
@@ -88,7 +88,8 @@ bool function ClientCommand_SetProgression( entity player, array<string> args )
/// Resets a specific Titan's Aegis rank back to `0`
/// * `player` - The player entity to perform the action on
-/// * `args` - The arguments passed from the client command. `args[0]` should be an integer corresponding to the index of the Titan to reset.
+/// * `args` - The arguments passed from the client command. `args[0]` should be a string corresponding to the chassis name of the Titan to reset.
+/// Valid chassis are: ion, tone, vanguard, northstar, ronin, legion, and scorch.
///
/// Returns `true` on success and `false` on missing args.
bool function ClientCommand_ResetTitanAegis( entity player, array<string> args )
@@ -96,7 +97,12 @@ bool function ClientCommand_ResetTitanAegis( entity player, array<string> args )
if ( !args.len() )
return false
- int suitIndex = args[0].tointeger()
+ string titanRef = args[0].tolower()
+ if( !PersistenceEnumValueIsValid( "titanClasses", titanRef ) )
+ return false
+
+ int suitIndex = PersistenceGetEnumIndexForItemName( "titanClasses", titanRef )
+
player.SetPersistentVar( "titanFDUnlockPoints[" + suitIndex + "]", 0 )
player.SetPersistentVar( "previousFDUnlockPoints[" + suitIndex + "]", 0 )
player.SetPersistentVar( "fdTitanXP[" + suitIndex + "]", 0 )