diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-05 16:03:50 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-05 16:03:50 +0000 |
commit | 51e16034230f4dd759900c7922b8db43941e0a70 (patch) | |
tree | 6492337f6855e2403db0376b8d1021196df80879 /Northstar.Client | |
parent | b48fd143624f2b887699acd98d9a4c55b792ab0e (diff) | |
download | NorthstarMods-51e16034230f4dd759900c7922b8db43941e0a70.tar.gz NorthstarMods-51e16034230f4dd759900c7922b8db43941e0a70.zip |
big commit for playtesting
Diffstat (limited to 'Northstar.Client')
5 files changed, 45 insertions, 17 deletions
diff --git a/Northstar.Client/mod/cfg/autoexec_ns_client.cfg b/Northstar.Client/mod/cfg/autoexec_ns_client.cfg new file mode 100644 index 00000000..69e011e9 --- /dev/null +++ b/Northstar.Client/mod/cfg/autoexec_ns_client.cfg @@ -0,0 +1,2 @@ +bind "`" "toggleconsole" +ns_masterserver_hostname "192.248.160.3"
\ No newline at end of file diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut index c6ef5f3a..fb05adbc 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut @@ -26,6 +26,7 @@ void function InitMainMenu() var menu = GetMenu( "MainMenu" ) file.menu = menu + ClientCommand( "exec autoexec_ns_client" ) AddMenuEventHandler( menu, eUIEvent.MENU_OPEN, OnMainMenu_Open ) AddMenuEventHandler( menu, eUIEvent.MENU_NAVIGATE_BACK, OnMainMenu_NavigateBack ) @@ -54,21 +55,6 @@ void function InitMainMenu() if ( DevStartPoints() ) AddMenuFooterOption( menu, BUTTON_Y, "#Y_BUTTON_DEV_MENU", "#DEV_MENU", OpenSinglePlayerDevMenu ) #endif // DEV - - // do +map stuff - if ( Dev_CommandLineHasParm( "+map" ) ) - thread DelayedMapCommand() -} - -void function DelayedMapCommand() -{ - // if we do this too early, game won't run the map command, so we have to wait a bit - // 5.0 was determined exclusively by trial and error but seems to work pretty well - // might be possible to just do this in native instead, but idk effort - wait 5.0 - SetConVarBool( "ns_auth_allow_insecure", true ) // good for testing - ClientCommand( "map " + Dev_CommandLineParmValue( "+map" ) ) - Dev_CommandLineRemoveParm( "+map" ) } #if CONSOLE_PROG @@ -94,6 +80,28 @@ void function OnMainMenu_Open() thread UpdateTrialLabel() + // do +map stuff + if ( Dev_CommandLineHasParm( "+map" ) ) + { + SetConVarBool( "ns_auth_allow_insecure", true ) // good for testing + ClientCommand( "map " + Dev_CommandLineParmValue( "+map" ) ) + Dev_CommandLineRemoveParm( "+map" ) + } + + // do agree to ns remote auth dialog + if ( !GetConVarBool( "ns_has_agreed_to_send_token" ) ) + { + // todo: this should be in localisation + DialogData dialogData + dialogData.header = "Thanks for installing Northstar!" + dialogData.image = $"rui/menu/fd_menu/upgrade_northstar_chassis" + dialogData.message = "For Northstar to work, it needs to authenticate using the Northstar master server. This will require sending your origin token to the master server, it will not be stored or used for any other purposes.\n" + + "Press Yes if you agree to this. This choice can be changed in the mods menu at any time." + AddDialogButton( dialogData, "#YES", void function() { SetConVarInt( "ns_has_agreed_to_send_token", 1 ) } ) + AddDialogButton( dialogData, "#NO", void function() { SetConVarInt( "ns_has_agreed_to_send_token", 2 ) } ) + OpenDialog( dialogData ) + } + #if PC_PROG ActivatePanel( GetPanel( "MainMenuPanel" ) ) return diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut index ce117546..e6b0d90a 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut @@ -148,7 +148,12 @@ void function ReloadMods() NSReloadMods() ClientCommand( "reload_localization" ) ClientCommand( "loadPlaylists" ) - ClientCommand( "sv_cheats 1; weapon_reparse; sv_cheats 0" ) // weapon_reparse only works if a server is running and sv_cheats is 1, gotta figure this out eventually + + bool svCheatsOriginal = GetConVarBool( "sv_cheats" ) + SetConVarBool( "sv_cheats", true ) + ClientCommand( "weapon_reparse" ) // weapon_reparse only works if a server is running and sv_cheats is 1, gotta figure this out eventually + SetConVarBool( "sv_cheats", svCheatsOriginal ) + // note: the logic for this seems really odd, unsure why it doesn't seem to update, since the same code seems to get run irregardless of whether we've read weapon data before ClientCommand( "uiscript_reset" ) }
\ No newline at end of file diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut index 2c07ef71..22e46478 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_private_match.nut @@ -103,7 +103,17 @@ const table<asset> mapImages = sp_tday = $"rui/menu/level_select/level_image7", sp_s2s = $"rui/menu/level_select/level_image8", sp_skyway_v1 = $"rui/menu/level_select/level_image9", - + + // mp converted variants + mp_training = $"rui/menu/level_select/level_image1", + mp_crashsite = $"rui/menu/level_select/level_image2", + mp_sewers1 = $"rui/menu/level_select/level_image3", + mp_boomtown_start = $"rui/menu/level_select/level_image4", + mp_hub_timeshift = $"rui/menu/level_select/level_image5", + mp_beacon = $"rui/menu/level_select/level_image6", + mp_tday = $"rui/menu/level_select/level_image7", + mp_s2s = $"rui/menu/level_select/level_image8", + mp_skyway_v1 = $"rui/menu/level_select/level_image9", } void function MenuPrivateMatch_Init() diff --git a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut index 7528495f..ca7a1f7b 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut @@ -6,6 +6,9 @@ global function UpdatePromoData global function UICodeCallback_GetOnPartyServer global function UICodeCallback_MainMenuPromosUpdated +// defining this here because it's the only place it's used rn, custom const for a hook in launcher +global const WEBBROWSER_FLAG_FORCEEXTERNAL = 1 << 1 // 2 + struct { var menu |