Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Aegis Rank reset functionality command for Progression #727

Merged
merged 22 commits into from
Dec 14, 2023
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
825b99f
Add Aegis Rank reset functionality command
Zanieon Sep 29, 2023
214b3c4
Space'y
Zanieon Sep 29, 2023
604da10
Split highest Titan Aegis into own function
Zanieon Oct 1, 2023
5bda90f
Change function to recieve index of Titan
Zanieon Oct 2, 2023
4f55809
Merge branch 'R2Northstar:main' into progression_aegis_reset
Zanieon Oct 3, 2023
af6a635
Merge branch 'R2Northstar:main' into progression_aegis_reset
Zanieon Oct 7, 2023
f75b30a
Merge branch 'R2Northstar:main' into progression_aegis_reset
Zanieon Oct 9, 2023
befbcd6
Merge branch 'R2Northstar:main' into progression_aegis_reset
Zanieon Oct 10, 2023
db4e487
Merge branch 'R2Northstar:main' into progression_aegis_reset
Zanieon Oct 11, 2023
fc48729
Merge branch 'R2Northstar:main' into progression_aegis_reset
Zanieon Oct 12, 2023
50f5c72
Merge branch 'main' into progression_aegis_reset
Zanieon Oct 16, 2023
25bbb37
Merge branch 'R2Northstar:main' into progression_aegis_reset
Zanieon Oct 19, 2023
4794718
Update Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut
Zanieon Oct 22, 2023
8d6df91
Update Northstar.CustomServers/mod/scripts/vscripts/sh_progression.nut
Zanieon Oct 22, 2023
ef75a03
Case typo
Zanieon Oct 22, 2023
316d451
Case typo 2
Zanieon Oct 22, 2023
ad04937
Merge branch 'main' into progression_aegis_reset
Zanieon Oct 22, 2023
4c9fe64
Merge branch 'main' into progression_aegis_reset
Zanieon Nov 3, 2023
533fad4
Merge branch 'R2Northstar:main' into progression_aegis_reset
Zanieon Dec 7, 2023
e74c598
Merge branch 'main' into progression_aegis_reset
GeckoEidechse Dec 13, 2023
ed8a828
Update Northstar.CustomServers/mod/scripts/vscripts/sh_progression.nut
Zanieon Dec 13, 2023
fd63253
Update Northstar.CustomServers/mod/scripts/vscripts/sh_utility_all.gnut
Zanieon Dec 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion Northstar.CustomServers/mod/scripts/vscripts/sh_progression.nut
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ 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 @@ -84,6 +85,29 @@ bool function ClientCommand_SetProgression( entity player, array<string> args )

return true
}

Zanieon marked this conversation as resolved.
Show resolved Hide resolved
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 )
Zanieon marked this conversation as resolved.
Show resolved Hide resolved

return true
}
#endif

#if CLIENT
Expand Down Expand Up @@ -1102,4 +1126,4 @@ string function GetWeaponWarpaintRefByIndex( int skinIndex, string parentRef )
}
#endif // SERVER

#endif // MP
#endif // MP
Zanieon marked this conversation as resolved.
Show resolved Hide resolved