diff --git a/ChangeLog.md b/ChangeLog.md index 29da82b..37187a0 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,4 +1,7 @@ +##v1.6.1 +- Fixed error if abilities array is present but empty + ## v1.6.0 - Added support for adding custom abilities implemented by other mods diff --git a/Code/Program.cs b/Code/Program.cs index 41ebd9a..373c27d 100644 --- a/Code/Program.cs +++ b/Code/Program.cs @@ -19,7 +19,7 @@ public class Plugin : BaseUnityPlugin { private const string PluginGuid = "MADH.inscryption.JSONLoader"; private const string PluginName = "JSONLoader"; - private const string PluginVersion = "1.6.0.0"; + private const string PluginVersion = "1.6.1.0"; internal static ManualLogSource Log; diff --git a/Code/Utils/CardDataUtils.cs b/Code/Utils/CardDataUtils.cs index fae07d7..ecc86c4 100644 --- a/Code/Utils/CardDataUtils.cs +++ b/Code/Utils/CardDataUtils.cs @@ -27,7 +27,7 @@ public void GenerateNew() List metaCategories = JLUtils.Assign( this.metaCategories, nameof( this.metaCategories ), Dicts.MetaCategory ); - if (this.abilities is not null && this.abilities[ 0 ] == "None" ) + if (this.abilities is not null && ( this.abilities.Count == 0 || this.abilities[ 0 ] == "None" ) ) this.abilities = null; NewCard.Add( diff --git a/JSONLoader/JSONLoader.dll b/JSONLoader/JSONLoader.dll index a0a16dc..8ae1ac7 100644 Binary files a/JSONLoader/JSONLoader.dll and b/JSONLoader/JSONLoader.dll differ diff --git a/manifest.json b/manifest.json index 9b39db1..0b56c7d 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name": "JSONCardLoader", - "version_number": "1.6.0", + "version_number": "1.6.1", "website_url": "https://github.com/MADH95/JSONCardLoaderPlugin", "description": "This is a BepInEx plugin made for Incryption to create custom cards using JSON files and the API by Cyantist. It can currently parse custom cards and pass them to APIPlugin to load them into the game.", "dependencies": [