diff options
author | William Miller <william-millennium@hotmail.com> | 2023-12-14 10:39:26 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-14 14:39:26 +0100 |
commit | 6d678ac56b104a5c4aa2a2d9da05b163f2e1d6cd (patch) | |
tree | 62508ada42c01a1eb787c5388d87409cd062175c /Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut | |
parent | f4df3144adbd45d48d812d102cfaf7cef474824e (diff) | |
download | NorthstarMods-6d678ac56b104a5c4aa2a2d9da05b163f2e1d6cd.tar.gz NorthstarMods-6d678ac56b104a5c4aa2a2d9da05b163f2e1d6cd.zip |
Add Aegis Rank reset functionality command for Progression (#727)v1.21.0-rc1
Adds a console command to allow players to reset the Aegis Ranks of their Titans
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut b/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut index a97185b51..8751a2507 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut @@ -1540,6 +1540,22 @@ array<string> function GetAvailableTitanRefs( entity player ) return availableTitanRefs } +/// Gets the highest Titan FD level and stores it in the corresponding persistent var. +/// * `player` - The player entity to perform the action on +void function RecalculateHighestTitanFDLevel( entity player ) +{ + int enumCount = PersistenceGetEnumCount( "titanClasses" ) + int highestAegis = 0 + for ( int i = 0; i < enumCount; i++ ) + { + string enumName = PersistenceGetEnumItemNameForIndex( "titanClasses", i ) + int aegisLevel = FD_TitanGetLevelForXP( enumName, FD_TitanGetXP( player, enumName ) ) + if ( highestAegis < aegisLevel ) + highestAegis = aegisLevel + } + player.SetPersistentVar( "fdStats.highestTitanFDLevel", highestAegis ) +} + #if MP string function GetTitanRefForLoadoutIndex( entity player, int loadoutIndex ) { |