diff --git a/TLM/TLM/Resources/incompatible_mods.txt b/TLM/TLM/Resources/incompatible_mods.txt index 9ae2bce9e..1e6d72a01 100644 --- a/TLM/TLM/Resources/incompatible_mods.txt +++ b/TLM/TLM/Resources/incompatible_mods.txt @@ -48,7 +48,6 @@ 1348361731;Traffic Manager: President Edition ALPHA/DEBUG 1546870472;Traffic Manager: President Edition (Industries Compatible) 1556669944;CSM -1558438291;Cities Multiplayer Mod (CSM) [Beta] 1581695572;Traffic Manager: President Edition 1604291910;498363759 Traffic Manager + Improved AI 1628112268;RightTurnNoStop @@ -56,7 +55,6 @@ 1806963141;TM:PE LABS 1841616225;CSM 1957033250;Traffic Manager: President Edition (Industries Compatible) -2021598295;1558438291 [Beta] CSM - Cities_ Skylines Multiplayer 2027716634;CitiesSkylinesMultiplayer_2002.2.0 2030131871;CSM 2080356971;CSM @@ -87,4 +85,4 @@ 2781822295;交通管理器 汉化版TMPE_V11_STABLE 2782552305;CSM 667342976;Loading Screen Mod -833779378;Loading Screen Mod Test \ No newline at end of file +833779378;Loading Screen Mod Test diff --git a/TLM/TLM/Util/ModsCompatibilityChecker.cs b/TLM/TLM/Util/ModsCompatibilityChecker.cs index fbcc690f1..19798e4d3 100644 --- a/TLM/TLM/Util/ModsCompatibilityChecker.cs +++ b/TLM/TLM/Util/ModsCompatibilityChecker.cs @@ -25,6 +25,8 @@ public class ModsCompatibilityChecker { // parsed contents of incompatible_mods.txt private readonly Dictionary knownIncompatibleMods; private readonly HashSet gameBreaking; + private readonly HashSet compatibilityWhitelistIds; + private readonly HashSet compatibilityWhitelistNames; public ModsCompatibilityChecker() { knownIncompatibleMods = LoadListOfIncompatibleMods(); @@ -32,9 +34,15 @@ public ModsCompatibilityChecker() { "Cities: Skylines Multiplayer", "CSM", "Cities Skylines Multiplayer (CSM)", - "Cities: Skylines Multiplayer (CSM) [Beta]", "Harmony (redesigned)", }); + compatibilityWhitelistIds = new HashSet(new[] { + 1558438291uL, + }); + compatibilityWhitelistNames = new HashSet(new[] { + "CSM.TmpeSync", + "Cities: Skylines Multiplayer (CSM) [Beta]", + }); } /// @@ -100,13 +108,16 @@ private Dictionary ScanForIncompatibleMods() { string strWorkshopId = isLocal ? "(local)" : workshopID.ToString(); string strIncompatible = " "; - if (knownIncompatibleMods.ContainsKey(workshopID)) { + bool isWhitelisted = compatibilityWhitelistIds.Contains(workshopID) || + compatibilityWhitelistNames.Contains(strModName); + + if (!isWhitelisted && knownIncompatibleMods.ContainsKey(workshopID)) { strIncompatible = "!"; if (checkKnown && (!filterToEnabled || mod.isEnabled)) { Debug.Log("[TM:PE] Incompatible mod detected: " + strModName); results.Add(mod, strModName); } - } else if (gameBreaking.Contains(strModName)) { + } else if (!isWhitelisted && gameBreaking.Contains(strModName)) { strIncompatible = "!"; Debug.Log("[TM:PE] Incompatible, potentially game breaking mod detected: " + strModName); results.Add(mod, strModName);