Exclude requested mods that are also in the world
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Immutable;
|
||||
using System.Reflection.Emit;
|
||||
using HarmonyLib;
|
||||
using Plugin.ClientModLoader.Utils;
|
||||
using Sandbox.Definitions;
|
||||
using Sandbox.Engine.Networking;
|
||||
using Sandbox.Game.World;
|
||||
@@ -31,7 +32,7 @@ internal static class ModInjector
|
||||
var resolvedMods = mods.ToImmutableDictionary(b => b.PublishedFileId);
|
||||
|
||||
// list of selected mods which are resolved
|
||||
var requestedMods = mods.IntersectBy(Mods, b => b.PublishedFileId)
|
||||
var requestedMods = mods.IntersectBy(Mods, b => b.PublishedFileId).ExceptBy(worldMods, b => b.PublishedFileId)
|
||||
.ToDictionary(b => b.PublishedFileId);
|
||||
|
||||
// add dependencies of requested mods
|
||||
|
Reference in New Issue
Block a user