Skip to content

Commit

Permalink
Revert "Add Aegis Rank reset functionality"
Browse files Browse the repository at this point in the history
This reverts commit a1ea16b.
  • Loading branch information
Zanieon committed Sep 29, 2023
1 parent a1ea16b commit 824d914
Showing 1 changed file with 4 additions and 26 deletions.
30 changes: 4 additions & 26 deletions Northstar.CustomServers/mod/scripts/vscripts/sh_progression.nut
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ global function Progression_SetPreference
global function Progression_GetPreference
global function UpdateCachedLoadouts_Delayed
#endif

#if SP // literally just stub the global functions and call it a day

void function Progression_Init() {}
Expand All @@ -16,6 +17,7 @@ void function UpdateCachedLoadouts_Delayed() {}
#endif // CLIENT || UI

#else // MP || UI basically

// SO FOR SOME GOD DAMN REASON, PUTTING THESE INTO ONE STRUCT
// AND PUTTING THE #if STUFF AROUND THE VARS CAUSES A COMPILE
// ERROR, SO I HAVE TO DO THIS AWFULNESS
Expand All @@ -36,7 +38,6 @@ void function Progression_Init()
#if SERVER
AddCallback_OnClientDisconnected( OnClientDisconnected )
AddClientCommandCallback( "ns_progression", ClientCommand_SetProgression )
AddClientCommandCallback( "ns_resettitanaegis", ClientCommand_ResetTitanAegis )
AddCallback_GameStateEnter( eGameState.Playing, OnPlaying )
#elseif CLIENT
AddCallback_OnClientScriptInit( OnClientScriptInit )
Expand Down Expand Up @@ -83,29 +84,6 @@ bool function ClientCommand_SetProgression( entity player, array<string> args )

return true
}

bool function ClientCommand_ResetTitanAegis( entity player, array<string> args )
{
int suitIndex = GetPersistentSpawnLoadoutIndex( player, "titan" )
player.SetPersistentVar( "titanFDUnlockPoints[" + suitIndex + "]", 0 )
player.SetPersistentVar( "previousFDUnlockPoints[" + suitIndex + "]", 0 )
player.SetPersistentVar( "fdTitanXP[" + suitIndex + "]", 0 )
player.SetPersistentVar( "fdPreviousTitanXP[" + suitIndex + "]", 0 )

//Refresh Highest Aegis Titan since we might get all of them back to 1 if players wants
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 )

return true
}
#endif

#if CLIENT
Expand Down Expand Up @@ -290,7 +268,7 @@ void function ValidateEquippedItems( entity player )
// camoIndex
if ( loadout.skinIndex == TITAN_SKIN_INDEX_CAMO )
{
array<ItemData> camoSkins = GetAllItemsOfType( eItemTypes.CAMO_SKIN_TITAN )
array<ItemData> camoSkins = GetAllItemsOfType( eItemTypes.CAMO_SKIN )
if ( loadout.camoIndex >= camoSkins.len() || loadout.camoIndex < 0 )
{
printt( " - INVALID TITAN CAMO/SKIN, RESETTING" )
Expand Down Expand Up @@ -1124,4 +1102,4 @@ string function GetWeaponWarpaintRefByIndex( int skinIndex, string parentRef )
}
#endif // SERVER

#endif // MP
#endif // MP

0 comments on commit 824d914

Please sign in to comment.