diff --git a/OWML.Common/IModManifest.cs b/OWML.Common/IModManifest.cs index 0c88ee45c..5d170ebb8 100644 --- a/OWML.Common/IModManifest.cs +++ b/OWML.Common/IModManifest.cs @@ -6,6 +6,7 @@ public interface IModManifest string Author { get; } string Name { get; } string Version { get; } + string OWMLVersion { get; } string AssemblyPath { get; } string UniqueName { get; } string FolderPath { get; set; } diff --git a/OWML.Launcher/App.cs b/OWML.Launcher/App.cs index c475d4fa0..4a393330d 100644 --- a/OWML.Launcher/App.cs +++ b/OWML.Launcher/App.cs @@ -12,11 +12,13 @@ namespace OWML.Launcher { public class App { + private const string Version = "0.3.1"; + private readonly string[] _filesToCopy = { "UnityEngine.CoreModule.dll", "Assembly-CSharp.dll" }; public void Run() { - Console.WriteLine("Started OWML."); + Console.WriteLine($"Started OWML version {Version}"); var config = GetConfig(); @@ -84,8 +86,9 @@ private void ShowModList(IModFinder modFinder) Console.WriteLine("Found mods:"); foreach (var manifest in manifests) { - var stateText = manifest.Enabled ? "" : "(disabled)"; - Console.WriteLine($"* {manifest.UniqueName} ({manifest.Version}) {stateText}"); + var stateText = manifest.Enabled ? "" : " (disabled)"; + var versionText = manifest.OWMLVersion == Version ? "" : $" (Warning: made for other version of OWML: {manifest.OWMLVersion})"; + Console.WriteLine($"* {manifest.UniqueName} ({manifest.Version}){stateText}{versionText}"); } } diff --git a/OWML.ModHelper/ModBehaviour.cs b/OWML.ModHelper/ModBehaviour.cs index 8614cad94..60c32bb12 100644 --- a/OWML.ModHelper/ModBehaviour.cs +++ b/OWML.ModHelper/ModBehaviour.cs @@ -12,6 +12,5 @@ public void Init(IModHelper modHelper) ModHelper = modHelper; DontDestroyOnLoad(gameObject); } - } } diff --git a/OWML.ModHelper/ModManifest.cs b/OWML.ModHelper/ModManifest.cs index 57bae90d7..ad49c8aa5 100644 --- a/OWML.ModHelper/ModManifest.cs +++ b/OWML.ModHelper/ModManifest.cs @@ -20,6 +20,9 @@ public class ModManifest : IModManifest [JsonProperty("version")] public string Version { get; private set; } + [JsonProperty("owmlVersion")] + public string OWMLVersion { get; private set; } + [JsonProperty("enabled")] public bool Enabled { get; private set; } diff --git a/OWML.SampleMods/OWML.EnableDebugMode/manifest.json b/OWML.SampleMods/OWML.EnableDebugMode/manifest.json index 32fec53fd..dfe3b6733 100644 --- a/OWML.SampleMods/OWML.EnableDebugMode/manifest.json +++ b/OWML.SampleMods/OWML.EnableDebugMode/manifest.json @@ -4,5 +4,6 @@ "name": "EnableDebugMode", "uniqueName": "Alek.EnableDebugMode", "version": "0.2", + "owmlVersion": "0.3.1", "enabled": false } \ No newline at end of file diff --git a/OWML.SampleMods/OWML.LightBramble/manifest.json b/OWML.SampleMods/OWML.LightBramble/manifest.json index 42c1161ff..df85bb9fa 100644 --- a/OWML.SampleMods/OWML.LightBramble/manifest.json +++ b/OWML.SampleMods/OWML.LightBramble/manifest.json @@ -4,5 +4,6 @@ "name": "LightBramble", "uniqueName": "Alek.LightBramble", "version": "0.1", + "owmlVersion": "0.3.1", "enabled": false } \ No newline at end of file diff --git a/OWML.SampleMods/OWML.LoadCustomAssets/manifest.json b/OWML.SampleMods/OWML.LoadCustomAssets/manifest.json index c4ef3fbaf..9da4b0c4f 100644 --- a/OWML.SampleMods/OWML.LoadCustomAssets/manifest.json +++ b/OWML.SampleMods/OWML.LoadCustomAssets/manifest.json @@ -4,5 +4,6 @@ "name": "LoadCustomAssets", "uniqueName": "Alek.LoadCustomAssets", "version": "0.3", + "owmlVersion": "0.3.1", "enabled": false } \ No newline at end of file diff --git a/Readme.md b/Readme.md index 0b2bd2828..9a514fed5 100644 --- a/Readme.md +++ b/Readme.md @@ -64,6 +64,7 @@ Each mod is defined in a manifest.json file: |name|The name of the mod.| |uniqueName|Usually {author}.{uniqueName}.| |version|The version number.| +|owmlVersion|The version of OWML the mod was built for.| |enabled|Whether or not the mod will be loaded.| ## Compatibility