Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
16 changes: 5 additions & 11 deletions MonkeyLoader.GamePacks.ResoniteModLoader/ModLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ protected override IEnumerable<IFeaturePatch> GetFeaturePatches()
/// <inheritdoc/>
protected override bool OnEngineInit()
{
LoadProgressReporter.AddFixedPhases(4);

return base.OnEngineInit();
}

Expand All @@ -96,7 +94,7 @@ private static async Task InitializeFrooxEnginePostfixAsync(Task __result)
{
await __result;

LoadProgressReporter.AdvanceFixedPhase("Loading RML Libraries...");
LoadProgressReporter.SetSubphase("Loading RML Libraries...");

try
{
Expand All @@ -117,22 +115,20 @@ private static async Task InitializeFrooxEnginePostfixAsync(Task __result)
{
Logger.Warn(() => ex.Format($"Failed to load library from rml_libs: {file}"));
}

LoadProgressReporter.ExitSubphase();
}

LoadProgressReporter.AdvanceFixedPhase("Collecting RML Mods...");
LoadProgressReporter.SetSubphase("Collecting RML Mods...");

var rmlMods = await LoadModsAsync().ToArrayAsync();

LoadProgressReporter.AdvanceFixedPhase("Running RML Mods...");
LoadProgressReporter.SetSubphase("Running RML Mods...");
await Task.Run(() => Mod.Loader.RunMods(rmlMods));
LoadProgressReporter.AdvanceFixedPhase("Done with RML");
LoadProgressReporter.SetSubphase("Done with RML");
}
catch (Exception ex)
{
Logger.Error(() => ex.Format("Exception in execution hook!"));
LoadProgressReporter.AdvanceFixedPhase("Error running RML Mods!");
LoadProgressReporter.SetSubphase("Error running RML Mods!");
}
}

Expand Down Expand Up @@ -174,8 +170,6 @@ private static async IAsyncEnumerable<RmlMod> LoadModsAsync()
Logger.Warn(() => ex.Format($"Failed to load mod from rml_mods: {fileName}"));
}

LoadProgressReporter.ExitSubphase();

if (success)
yield return rmlMod!;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageId>MonkeyLoader.GamePacks.ResoniteModLoader</PackageId>
<Title>ResoniteModLoader</Title>
<Authors>Banane9, Nytra</Authors>
<Version>4.0.0.0</Version> <!-- We use the last digit for updates since RML uses the first three -->
<Version>4.0.0.1</Version> <!-- We use the last digit for updates since RML uses the first three -->
<Description>This MonkeyLoader Game Pack for Resonite enables loading ResoniteModLoader mods as MonkeyLoader mods.</Description>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>LGPL-3.0-or-later</PackageLicenseExpression>
Expand Down
5 changes: 1 addition & 4 deletions MonkeyLoader.GamePacks.ResoniteModLoader/ResoniteMod.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using FrooxEngine;
using MonkeyLoader;
using MonkeyLoader.Configuration;
using MonkeyLoader.Logging;
Expand Down Expand Up @@ -144,10 +145,6 @@ public override bool Run()
Logger.Error(ex.LogFormat($"Error while intitializing RML Mod {Name}:"));
return false;
}
finally
{
LoadProgressReporter.ExitSubphase();
}
}

/// <summary>
Expand Down
Loading