Skip to content

Commit bc136db

Browse files
committed
Adjust: Remove useless code
1 parent d784c51 commit bc136db

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

WorldBoxMod.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -267,13 +267,6 @@ void extractAssemblies()
267267
}
268268
catch (BadImageFormatException)
269269
{
270-
switch (Path.GetFileName(file_full_path))
271-
{
272-
case "System.IO.Compression.FileSystem.dll":
273-
// Just because BepInEx not installed
274-
continue;
275-
}
276-
277270
LogService.LogError($"" +
278271
$"BadImageFormatException: " +
279272
$"The file {file_full_path} is not a valid assembly.");

utils/ModInfoUtils.cs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ bool NCMSHere()
240240
SKIP_WORKSHOP:
241241
foreach (var mod in mods)
242242
{
243-
WorldBoxMod.AllRecognizedMods.Add(mod, ModState.FAILED);
243+
WorldBoxMod.AllRecognizedMods[mod] = ModState.FAILED;
244244
}
245245

246246
return removeDisabledMods(mods);
@@ -649,22 +649,6 @@ public static bool isModNeedRecompile(ModDeclare pModDeclare, List<string> pDe
649649
return false;
650650
}
651651

652-
public static void updateModCompileTimestamp(string pModUID, bool pSave = true)
653-
{
654-
if (!mod_compilation_caches.TryGetValue(pModUID, out ModCompilationCache cache))
655-
{
656-
cache = new ModCompilationCache(pModUID);
657-
cache.disabled = false;
658-
cache.timestamp = 0;
659-
mod_compilation_caches[pModUID] = cache;
660-
return;
661-
}
662-
663-
cache.timestamp = DateTime.UtcNow.Ticks;
664-
if (pSave)
665-
SaveModRecords();
666-
}
667-
668652
public static void clearModCompileTimestamp(string pModUUID, bool pSave = true)
669653
{
670654
if (!mod_compilation_caches.TryGetValue(pModUUID, out ModCompilationCache cache))

0 commit comments

Comments
 (0)