aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Client
diff options
context:
space:
mode:
authorJack <66967891+ASpoonPlaysGames@users.noreply.github.com>2023-09-02 17:52:06 +0100
committerGitHub <noreply@github.com>2023-09-02 18:52:06 +0200
commit1d95b7d5f3a4b7176456c94b147f0382de04f18e (patch)
tree1678c273b68985fe54cde59154a37a47b89bf419 /Northstar.Client
parentc7e50b28fe31e20b064f812758d8a0f5e889ea74 (diff)
downloadNorthstarMods-1d95b7d5f3a4b7176456c94b147f0382de04f18e.tar.gz
NorthstarMods-1d95b7d5f3a4b7176456c94b147f0382de04f18e.zip
Progression system (#655)
This also can't hurt right? --------- Co-authored-by: uniboi <64006268+uniboi@users.noreply.github.com>
Diffstat (limited to 'Northstar.Client')
-rw-r--r--Northstar.Client/mod/resource/northstar_client_localisation_english.txt18
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_lobby.nut53
2 files changed, 71 insertions, 0 deletions
diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt
index b2608331d..8c7bab3a7 100644
--- a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt
+++ b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt
@@ -343,5 +343,23 @@ Press Yes if you agree to this. This choice can be changed in the mods menu at a
"MOD_SETTINGS_RESET_ALL" "Reset All"
"NO_RESULTS" "No results."
"NO_MODS" "No settings available! Install more mods at ^5588FF00northstar.thunderstore.io^0."
+
+ // Toggleable progression
+ "TOGGLE_PROGRESSION" "Toggle Progression"
+ "Y_BUTTON_TOGGLE_PROGRESSION" "%[Y_BUTTON]% Toggle Progression"
+
+ "PROGRESSION_TOGGLE_ENABLED_HEADER" "Disable Progression?"
+ "PROGRESSION_TOGGLE_ENABLED_BODY" "Titans, Weapons, Factions, Skins, etc. will all be unlocked and usable at any time.\n\nThis can be changed at any time in the multiplayer lobby."
+
+ "PROGRESSION_TOGGLE_DISABLED_HEADER" "Enable Progression?"
+ "PROGRESSION_TOGGLE_DISABLED_BODY" "Titans, Weapons, Factions, Skins, etc. will need to be unlocked by levelling up, or bought with Merits.\n\nThis can be changed at any time in the multiplayer lobby.\n\n^CC000000Warning: if you have currently equipped any items that you do not have unlocked, they will be reset!"
+
+ "PROGRESSION_ENABLED_HEADER" "Progression Enabled!"
+ "PROGRESSION_ENABLED_BODY" "^CCCC0000Progression has been enabled.^\n\nTitans, Weapons, Factions, Skins, etc. will need to be unlocked by levelling up, or bought with Merits.\n\nThis can be changed at any time in the multiplayer lobby."
+
+ "PROGRESSION_DISABLED_HEADER" "Progression Disabled!"
+ "PROGRESSION_DISABLED_BODY" "^CCCC0000Progression has been disabled.^\n\nTitans, Weapons, Factions, Skins, etc. will all be unlocked and usable at any time.\n\nThis can be changed at any time in the multiplayer lobby."
+
+ "PROGRESSION_ANNOUNCEMENT_BODY" "^CCCC0000Progression can now be enabled!^\n\nNorthstar now supports vanilla progression, meaning you can choose to unlock Weapons, Skins, Titans, etc. through levelling up and completing challenges.\n\nYou can enable progression using the button at the bottom of the lobby screen.\n\nThis can be changed at any time."
}
}
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_lobby.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_lobby.nut
index 2bef0e205..e4cc56874 100644
--- a/Northstar.Client/mod/scripts/vscripts/ui/menu_lobby.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_lobby.nut
@@ -178,6 +178,8 @@ void function InitLobbyMenu()
AddMenuFooterOption( menu, BUTTON_B, "#B_BUTTON_BACK", "#BACK" )
AddMenuFooterOption( menu, BUTTON_BACK, "#BACK_BUTTON_POSTGAME_REPORT", "#POSTGAME_REPORT", OpenPostGameMenu, IsPostGameMenuValid )
AddMenuFooterOption( menu, BUTTON_TRIGGER_RIGHT, "#R_TRIGGER_CHAT", "", null, IsVoiceChatPushToTalk )
+ // Client side progression toggle
+ AddMenuFooterOption( menu, BUTTON_Y, "#Y_BUTTON_TOGGLE_PROGRESSION", "#TOGGLE_PROGRESSION", ShowToggleProgressionDialog )
InitChatroom( menu )
@@ -226,6 +228,57 @@ void function InitLobbyMenu()
RegisterSignal( "LeaveParty" )
}
+void function ShowToggleProgressionDialog( var button )
+{
+ bool enabled = Progression_GetPreference()
+
+ DialogData dialogData
+ dialogData.menu = GetMenu( "AnnouncementDialog" )
+ dialogData.header = enabled ? "#PROGRESSION_TOGGLE_ENABLED_HEADER" : "#PROGRESSION_TOGGLE_DISABLED_HEADER"
+ dialogData.message = enabled ? "#PROGRESSION_TOGGLE_ENABLED_BODY" : "#PROGRESSION_TOGGLE_DISABLED_BODY"
+ dialogData.image = $"ui/menu/common/dialog_announcement_1"
+
+ AddDialogButton( dialogData, "#NO" )
+ AddDialogButton( dialogData, "#YES", enabled ? DisableProgression : EnableProgression )
+
+ OpenDialog( dialogData )
+}
+
+void function EnableProgression()
+{
+ Progression_SetPreference( true )
+
+ // update the cache just in case something changed
+ UpdateCachedLoadouts_Delayed()
+
+ DialogData dialogData
+ dialogData.menu = GetMenu( "AnnouncementDialog" )
+ dialogData.header = "#PROGRESSION_ENABLED_HEADER"
+ dialogData.message = "#PROGRESSION_ENABLED_BODY"
+ dialogData.image = $"ui/menu/common/dialog_announcement_1"
+
+ AddDialogButton( dialogData, "#OK" )
+
+ EmitUISound( "UI_Menu_Item_Purchased_Stinger" )
+
+ OpenDialog( dialogData )
+}
+
+void function DisableProgression()
+{
+ Progression_SetPreference( false )
+
+ DialogData dialogData
+ dialogData.menu = GetMenu( "AnnouncementDialog" )
+ dialogData.header = "#PROGRESSION_DISABLED_HEADER"
+ dialogData.message = "#PROGRESSION_DISABLED_BODY"
+ dialogData.image = $"ui/menu/common/dialog_announcement_1"
+
+ AddDialogButton( dialogData, "#OK" )
+
+ OpenDialog( dialogData )
+}
+
void function SetupComboButtonTest( var menu )
{
ComboStruct comboStruct = ComboButtons_Create( menu )