diff --git a/WurstMod/Runtime/Entrypoint.cs b/WurstMod/Runtime/Entrypoint.cs
index 95bb382..f2a11d1 100644
--- a/WurstMod/Runtime/Entrypoint.cs
+++ b/WurstMod/Runtime/Entrypoint.cs
@@ -35,7 +35,7 @@ public Entrypoint()
// Config values
loadDebugLevels = Config.Bind("Debug", "LoadDebugLevels", false, "True if you want the included default levels to be loaded");
- useLegacyLoadingMethod = Config.Bind("Debug", "UseLegacyLoadingMethod", true, $"True if you want to support loading legacy v1 or standalone levels from the {Constants.LegacyLevelsDirectory} folder");
+ useLegacyLoadingMethod = Config.Bind("Debug", "UseLegacyLoadingMethod", false, $"True if you want to support loading legacy v1 or standalone levels from the {Constants.LegacyLevelsDirectory} folder");
// Legacy support
if (useLegacyLoadingMethod.Value)
@@ -50,13 +50,22 @@ private void StagesOnSetup(SetupStage stage)
private void LevelLoader(Stage stage, Mod mod, IHandle handle)
{
// If the config has disabled loading the default included levels, return
- if (!loadDebugLevels.Value && mod.Info.Guid == "wurstmod")
+ if (!loadDebugLevels.Value && mod.Info.Guid == "wurstmodders.wurstmod")
+ return;
+
+ // If this is the legacy stuff and we have that disabled, return
+ if (!useLegacyLoadingMethod.Value && mod.Info.Guid == "wurstmodders.wurstmod.legacy")
return;
// Try to make a level info from it
var level = LevelInfo.FromFrameworkMod(mod, handle);
- if (!level.HasValue) Debug.LogError($"Level in {mod}, {handle} is not valid!");
+ if (!level.HasValue)
+ {
+ // Skip an error here because this will throw some errors on folders we know are invalid.
+ if (mod.Info.Guid != "wurstmodders.wurstmod.legacy")
+ Debug.LogError($"Level in {mod}, {handle} is not valid!");
+ }
else
{
CustomLevelFinder.ArchiveLevels.Add(level.Value);
diff --git a/WurstMod/Shared/LevelInfo.cs b/WurstMod/Shared/LevelInfo.cs
index 6ae1a54..af640fe 100644
--- a/WurstMod/Shared/LevelInfo.cs
+++ b/WurstMod/Shared/LevelInfo.cs
@@ -102,7 +102,8 @@ public AssetBundle AssetBundle
}
// If somehow neither of the above two options match it's an invalid thing.
- mod.Logger.LogError($"Level at {path} does not contain a valid manifest!");
+ if (mod.Info.Guid != "wurstmodders.wurstmod.legacy")
+ mod.Logger.LogError($"Level at {path} does not contain a valid manifest!");
return null;
}
diff --git a/WurstMod/WurstMod.csproj b/WurstMod/WurstMod.csproj
index 984a35b..812517a 100644
--- a/WurstMod/WurstMod.csproj
+++ b/WurstMod/WurstMod.csproj
@@ -161,6 +161,9 @@
+
+ PreserveNewest
+
Always
diff --git a/WurstMod/legacyManifest.json b/WurstMod/legacyManifest.json
new file mode 100644
index 0000000..d0f8b0b
--- /dev/null
+++ b/WurstMod/legacyManifest.json
@@ -0,0 +1,18 @@
+{
+ "name": "WurstMod Legacy",
+ "authors": [
+ "Nathan Gill"
+ ],
+ "guid": "wurstmodders.wurstmod.legacy",
+ "version": "1.0.0",
+ "require": "0.3.1",
+ "dependencies": {
+ "wurstmodders.wurstmod": "2.0.3"
+ },
+ "assets": {
+ "setup": {
+ "**.dll": "deli:assembly",
+ "**/": "wurstmodders.wurstmod:level"
+ }
+ }
+}