diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-24 00:34:47 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-24 00:34:47 +0000 |
commit | 0fa8c57650daa9351f4cc4a153f7642001c7ce05 (patch) | |
tree | 3cb0025a54c76d9738ab654d65d1d8bb1c5d98ee /Northstar.Client/mod/scripts/vscripts | |
parent | fb32cb1b780c1169a834c951bc0c928199a2b59e (diff) | |
download | NorthstarMods-0fa8c57650daa9351f4cc4a153f7642001c7ce05.tar.gz NorthstarMods-0fa8c57650daa9351f4cc4a153f7642001c7ce05.zip |
last minute changes before release probably
Diffstat (limited to 'Northstar.Client/mod/scripts/vscripts')
-rw-r--r-- | Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut | 36 | ||||
-rw-r--r-- | Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut | 3 |
2 files changed, 36 insertions, 3 deletions
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut index 2c12f796..73e45831 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut @@ -137,11 +137,43 @@ void function NorthstarMasterServerAuthDialog() dialogData.header = "#DIALOG_TITLE_INSTALLED_NORTHSTAR" dialogData.image = $"rui/menu/fd_menu/upgrade_northstar_chassis" dialogData.message = "#AUTHENTICATION_AGREEMENT_DIALOG_TEXT" - AddDialogButton( dialogData, "#YES", void function() { SetConVarInt( "ns_has_agreed_to_send_token", NS_AGREED_TO_SEND_TOKEN ) } ) - AddDialogButton( dialogData, "#NO", void function() { SetConVarInt( "ns_has_agreed_to_send_token", NS_DISAGREED_TO_SEND_TOKEN ) } ) + AddDialogButton( dialogData, "#YES", NorthstarMasterServerAuthDialogAgree ) + AddDialogButton( dialogData, "#NO", NorthstarMasterServerAuthDialogDisagree ) OpenDialog( dialogData ) } +void function NorthstarMasterServerAuthDialogAgree() +{ + int oldValue = GetConVarInt( "ns_has_agreed_to_send_token" ) + SetConVarInt( "ns_has_agreed_to_send_token", NS_AGREED_TO_SEND_TOKEN ) + + if ( oldValue != 0 && oldValue != NS_AGREED_TO_SEND_TOKEN ) + { + DialogData dialogData + dialogData.header = "#DIALOG_TITLE_INSTALLED_NORTHSTAR" + dialogData.image = $"rui/menu/fd_menu/upgrade_northstar_chassis" + dialogData.message = "#AUTHENTICATION_AGREEMENT_RESTART" + AddDialogButton( dialogData, "#OK" ) + OpenDialog( dialogData ) + } +} + +void function NorthstarMasterServerAuthDialogDisagree() +{ + int oldValue = GetConVarInt( "ns_has_agreed_to_send_token" ) + SetConVarInt( "ns_has_agreed_to_send_token", NS_DISAGREED_TO_SEND_TOKEN ) + + if ( oldValue != 0 && oldValue != NS_DISAGREED_TO_SEND_TOKEN ) + { + DialogData dialogData + dialogData.header = "#DIALOG_TITLE_INSTALLED_NORTHSTAR" + dialogData.image = $"rui/menu/fd_menu/upgrade_northstar_chassis" + dialogData.message = "#AUTHENTICATION_AGREEMENT_RESTART" + AddDialogButton( dialogData, "#OK" ) + OpenDialog( dialogData ) + } +} + void function ActivatePanel( var panel ) { Assert( panel != null ) diff --git a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut index ffd9bc80..7c81149c 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut @@ -879,7 +879,8 @@ void function SpotlightButton_Activate( var button ) } else { - if ( link.find( "https://discord.gg" ) == 0 ) + // discord links don't work in origin overlay + if ( link.find( "https://discord.gg" ) == 0 || link == "https://northstar.tf/discord" ) LaunchExternalWebBrowser( link, WEBBROWSER_FLAG_FORCEEXTERNAL ) else LaunchExternalWebBrowser( link, WEBBROWSER_FLAG_MUTEGAME ) |