Skip to content

Commit 4a45187

Browse files
committed
Fix NRE on combined use of base game and modded SAs + parity
1 parent d7ba2fb commit 4a45187

5 files changed

Lines changed: 16 additions & 4 deletions

File tree

API.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<TargetFramework>netstandard2.0</TargetFramework>
44
<AssemblyName>API</AssemblyName>
55
<Description>An API for inscryption</Description>
6-
<Version>1.13.2.0</Version>
6+
<Version>1.13.3.0</Version>
77
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
88
<LangVersion>9.0</LangVersion>
99
<DebugType>full</DebugType>

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v1.13.3-kaycee
4+
- Fix not allowing base game and modded special abilites on the same card.
5+
- Add error message for using base game.
6+
37
## v1.13.2-kaycee
48
- Fix for JSONLoader cards
59

Patches/Card_AttachAbilities_NewSpecialAbilities.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public static bool Prefix(CardInfo info, Card __instance)
2424
foreach (var type in info.SpecialAbilities
2525
.Select(specialTriggeredAbility => NewSpecialAbility.specialAbilities
2626
.Find(x => x.specialTriggeredAbility == specialTriggeredAbility))
27+
.Where(x => x is not null)
2728
.Select(newAbility => newAbility.abilityBehaviour))
2829
{
2930
Plugin.Log.LogDebug($"-> Special Card Behaviour Type is [{type}]");

Plugin.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public partial class Plugin : BaseUnityPlugin
1313
{
1414
private const string PluginGuid = "cyantist.inscryption.api";
1515
private const string PluginName = "API";
16-
private const string PluginVersion = "1.13.2.0";
16+
private const string PluginVersion = "1.13.3.0";
1717

1818
internal static ManualLogSource Log;
1919
internal static ConfigEntry<bool> configEnergy;
@@ -32,7 +32,14 @@ private void Awake()
3232
configDroneMox = Config.Bind("Mox","Mox Drone",false,"Drone displays mox (requires Energy Drone and Mox Refresh)");
3333

3434
Harmony harmony = new Harmony(PluginGuid);
35-
harmony.PatchAll();
35+
try
36+
{
37+
harmony.PatchAll();
38+
}
39+
catch
40+
{
41+
Log.LogError("Failed to apply patches for API. Are you using the base version of the game?");
42+
}
3643
}
3744

3845
private void Start()

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "API",
3-
"version_number": "1.13.2",
3+
"version_number": "1.13.3",
44
"website_url": "https://github.com/ScottWilson0903/InscryptionAPI",
55
"description": "This plugin is a BepInEx plugin made for Inscryption as an API. It can currently create custom cards and abilities and inject them into the data pool, or modify existing cards in the card pool.",
66
"dependencies": [

0 commit comments

Comments
 (0)