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

Only fetch MAD manifesto on server join #821

Merged
Merged
Changes from 1 commit
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,10 @@ void function OnServerSelected_Threaded( var button )
bool uninstalledModFound = false
foreach ( requiredModInfo in server.requiredMods )
{
// Tolerate core mods having different versions
if ( requiredModInfo.name.len() > 10 && requiredModInfo.name.slice(0, 10) == "Northstar." )
continue

if ( !modNames.contains( requiredModInfo.name ) )
{
print( format ( "\"%s\" was not found locally, triggering manifesto fetching.", requiredModInfo.name ) )
Expand All @@ -994,6 +998,10 @@ void function OnServerSelected_Threaded( var button )

foreach ( RequiredModInfo mod in server.requiredMods )
{
// Tolerate core mods having different versions
if ( mod.name.len() > 10 && mod.name.slice(0, 10) == "Northstar." )
continue

if ( !NSGetModNames().contains( mod.name ) || NSGetModVersionByModName( mod.name ) != mod.version )
{
// Auto-download mod
Expand Down Expand Up @@ -1139,6 +1147,7 @@ void function ThreadedAuthAndConnectToServer( string password = "", bool modsCha
if (mod.name == modName)
{
found = true
print("TROUVE " + mod.name)
break
}
}
Expand All @@ -1154,6 +1163,7 @@ void function ThreadedAuthAndConnectToServer( string password = "", bool modsCha
// enable all RequiredOnClient mods that are required by the server and are currently disabled
foreach ( RequiredModInfo mod in file.lastSelectedServer.requiredMods )
{
print("=> " + mod.name)
Alystrasz marked this conversation as resolved.
Show resolved Hide resolved
if ( NSIsModRequiredOnClient( mod.name ) && !NSIsModEnabled( mod.name ))
{
modsChanged = true
Expand All @@ -1162,8 +1172,9 @@ void function ThreadedAuthAndConnectToServer( string password = "", bool modsCha
}

// only actually reload if we need to since the uiscript reset on reload lags hard
if ( modsChanged )
if ( modsChanged ) {
ReloadMods()
}

NSConnectToAuthedServer()
}
Expand Down
Loading