diff options
author | Maya <11448698+RoyalBlue1@users.noreply.github.com> | 2024-01-09 00:30:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-09 00:30:06 +0100 |
commit | 8847f70ac698a8865842cecd8f0354cdcaac29e1 (patch) | |
tree | d3f014818172581fbdf81b45504034ad17a4eec5 /Northstar.Client/mod/scripts | |
parent | 76582b6890294d2a53163a4be1b806c454aba90e (diff) | |
download | NorthstarMods-8847f70ac698a8865842cecd8f0354cdcaac29e1.tar.gz NorthstarMods-8847f70ac698a8865842cecd8f0354cdcaac29e1.zip |
Fix mod reloading for MAD (#780)
Use the proper function instead of NSReloadMods on join
Diffstat (limited to 'Northstar.Client/mod/scripts')
-rw-r--r-- | Northstar.Client/mod/scripts/vscripts/ui/menu_ns_connect_password.nut | 2 | ||||
-rw-r--r-- | Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut | 13 |
2 files changed, 3 insertions, 12 deletions
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_connect_password.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_connect_password.nut index 1e10aa45..b89e665b 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_connect_password.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_connect_password.nut @@ -56,6 +56,6 @@ void function ConnectWithPassword( var button ) if ( GetTopNonDialogMenu() == file.menu ) { TriggerConnectToServerCallbacks() - thread ThreadedAuthAndConnectToServer( Hud_GetUTF8Text( Hud_GetChild( file.menu, "EnterPasswordBox" ) ) ) + thread ThreadedAuthAndConnectToServer( Hud_GetUTF8Text( Hud_GetChild( file.menu, "EnterPasswordBox" ) ), true ) } }
\ No newline at end of file diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut index 1bc8e405..4f17dedf 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut @@ -1050,13 +1050,6 @@ void function OnServerSelected_Threaded( var button ) } } - // Make Northstar aware new mods have been added - if ( downloadedMods > 0 ) - { - print( "Some new mods have been downloaded or enabled, reloading mods." ) - NSReloadMods(); - } - if ( server.requiresPassword ) { OnCloseServerBrowserMenu() @@ -1065,12 +1058,12 @@ void function OnServerSelected_Threaded( var button ) else { TriggerConnectToServerCallbacks() - thread ThreadedAuthAndConnectToServer() + thread ThreadedAuthAndConnectToServer( "", downloadedMods != 0 ) } } -void function ThreadedAuthAndConnectToServer( string password = "" ) +void function ThreadedAuthAndConnectToServer( string password = "", bool modsChanged = false ) { if ( NSIsAuthenticatingWithServer() ) return @@ -1098,8 +1091,6 @@ void function ThreadedAuthAndConnectToServer( string password = "" ) if ( NSWasAuthSuccessful() ) { - bool modsChanged = false - // disable all RequiredOnClient mods that are not required by the server and are currently enabled foreach ( string modName in NSGetModNames() ) { |