Skip to content
This repository was archived by the owner on Jun 29, 2025. It is now read-only.

Commit 28602cc

Browse files
committed
Code cleanup
1 parent 551d41d commit 28602cc

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,4 +359,6 @@ MigrationBackup/
359359
/workshop/
360360

361361
# JetBrains Rider project files
362-
.idea/
362+
.idea/
363+
364+
.editorconfig

PluginLoader/Data/GitHubPlugin.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,10 @@ public override void InvalidateCache()
233233
File.Delete(commitFile);
234234
LogFile.WriteLine($"Cache for GitHub plugin {Id} was invalidated, it will need to be compiled again at next game start");
235235
}
236-
catch { }
236+
catch (Exception e)
237+
{
238+
LogFile.WriteLine("ERROR: Failed to invalidate github cache: " + e);
239+
}
237240
}
238241

239242
public override void AddDetailControls(PluginDetailMenu screen, MyGuiControlBase bottomControl, out MyGuiControlBase topControl)

PluginLoader/GUI/AddPluginMenu.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class AddPluginMenu : PluginScreen
2424
const int ListItemsVertical = 3;
2525
const float PercentSearchBox = 0.8f;
2626

27-
private List<PluginData> plugins = new List<PluginData>();
27+
private List<PluginData> plugins;
2828
private HashSet<string> enabledPlugins;
2929
private PluginStats stats;
3030
private bool mods;

PluginLoader/SteamAPI.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ public static void SubscribeToItem(ulong id)
3030

3131
public static void Update(IEnumerable<ulong> ids)
3232
{
33-
if (!ids.Any())
34-
return;
35-
3633
var modItems = new List<MyObjectBuilder_Checkpoint.ModItem>(ids.Select(x => new MyObjectBuilder_Checkpoint.ModItem(x, "Steam")));
34+
if (modItems.Count == 0)
35+
return;
3736
LogFile.WriteLine($"Updating {modItems.Count} workshop items");
3837

3938
// Source: MyWorkshop.DownloadWorldModsBlocking

0 commit comments

Comments
 (0)