From fecf2447f18c391bd4fc25b452ddee6b370c4a4f Mon Sep 17 00:00:00 2001 From: WhistleWind Date: Mon, 25 Nov 2024 14:04:27 -0800 Subject: [PATCH 1/3] Fixed index error when loading custom challenges --- InscryptionAPI/Ascension/AscensionChallengePaginator.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/InscryptionAPI/Ascension/AscensionChallengePaginator.cs b/InscryptionAPI/Ascension/AscensionChallengePaginator.cs index afbba7e0..514bfdc8 100644 --- a/InscryptionAPI/Ascension/AscensionChallengePaginator.cs +++ b/InscryptionAPI/Ascension/AscensionChallengePaginator.cs @@ -79,7 +79,7 @@ public void AddPage(List challengeInfos) int numBossesAdded = 0; // 14 = regular + boss * 2 - //Debug.Log($"NumIcons for Page: {numIcons}: {regularChallengeInfos.Count} {bossChallengeInfos.Count} | {bossStartingIndex}"); + //Debug.Log($"NumIcons for Page: {numIcons}: {regularChallengeInfos.Count} {numBosses} | {bossStartingIndex}"); for (int i = 0; i < 14; i++) { @@ -88,7 +88,7 @@ public void AddPage(List challengeInfos) int columnIndex = i % 7; //Debug.Log($"{i} ({columnIndex}) | {bossStartingIndex + numBosses} / {bossStartingIndex}"); - if (columnIndex >= bossStartingIndex && columnIndex < bossStartingIndex + numBosses) + if (numBosses > 0 && columnIndex >= bossStartingIndex && columnIndex < bossStartingIndex + numBosses) { //Debug.Log($"In boss column {i}"); if (numBossesAdded < numBosses) @@ -125,11 +125,11 @@ public void AddPage(List challengeInfos) int infoCount = challengeInfos.Count; for (int i = 0; i < newPage.Count; i++) { - AscensionChallengeInfo info = challengeInfos[infoIdx]; AscensionIconInteractable interactable = newPage[i].GetComponent(); - //Debug.Log($"Checking icon [{i}] info at {infoIdx} : {info.title}"); + //Debug.Log($"Checking icon [{i}] info at {infoIdx} : ({infoCount}) ({newPage.Count})"); if (i < infoCount) { + AscensionChallengeInfo info = challengeInfos[infoIdx]; // if we're assigning boss info to an icon that isn't a boss icon if (info.GetFullChallenge().Boss && (interactable.coll2D as BoxCollider2D).size.y < 1f) { @@ -146,6 +146,7 @@ public void AddPage(List challengeInfos) } else { + //Debug.Log("Missing challenge"); interactable.challengeInfo = missingChallengeInfo; newPage[i].AddComponent(); } From ac90c860d2cb52aa6cd1f38e235c96efc00e12d4 Mon Sep 17 00:00:00 2001 From: WhistleWind Date: Mon, 25 Nov 2024 14:04:38 -0800 Subject: [PATCH 2/3] Fixed ConsumableItemData.SetPrefabModelType not being publicised --- InscryptionAPI/Items/ConsumableItemDataExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InscryptionAPI/Items/ConsumableItemDataExtensions.cs b/InscryptionAPI/Items/ConsumableItemDataExtensions.cs index 276bbdfc..3fcae1f9 100644 --- a/InscryptionAPI/Items/ConsumableItemDataExtensions.cs +++ b/InscryptionAPI/Items/ConsumableItemDataExtensions.cs @@ -187,7 +187,7 @@ public static string GetCardWithinBottle(this ConsumableItemData data) } /// The same ConsumableItemData so a chain can continue. - internal static ConsumableItemData SetPrefabModelType(this ConsumableItemData data, ConsumableItemManager.ModelType modelType) + public static ConsumableItemData SetPrefabModelType(this ConsumableItemData data, ConsumableItemManager.ModelType modelType) { data.SetExtendedProperty("PrefabModelType", (int)modelType); return data; From 011cc63340ea1a0c0a1cc7c0ed37cd8c5a384467 Mon Sep 17 00:00:00 2001 From: WhistleWind Date: Tue, 26 Nov 2024 16:34:26 -0800 Subject: [PATCH 3/3] 2.22.3 --- CHANGELOG.md | 7 +++++++ InscryptionAPI/InscryptionAPI.csproj | 2 +- InscryptionAPI/InscryptionAPIPlugin.cs | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41616525..08fe6113 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@
View Changelog +# 2.22.3 +- Fixed pelt names when a user goes to the trader with modded cards, Examples shown below. + + +- Fixed index error when loading custom challenges +- Publicised ConsumableItemData.SetPrefabModelType + # 2.22.2 - Added GetEnergyConfig method to community patch's EnergyDrone class - retrieves the current Act's EnergyConfigInfo - CommunityPatches: Added community config to move pelt price tags to the right of the card diff --git a/InscryptionAPI/InscryptionAPI.csproj b/InscryptionAPI/InscryptionAPI.csproj index 8d4a0a4f..97fe1263 100644 --- a/InscryptionAPI/InscryptionAPI.csproj +++ b/InscryptionAPI/InscryptionAPI.csproj @@ -10,7 +10,7 @@ full false true - 2.22.2 + 2.22.3 diff --git a/InscryptionAPI/InscryptionAPIPlugin.cs b/InscryptionAPI/InscryptionAPIPlugin.cs index 822013cd..8ba20cbe 100644 --- a/InscryptionAPI/InscryptionAPIPlugin.cs +++ b/InscryptionAPI/InscryptionAPIPlugin.cs @@ -30,7 +30,7 @@ public class InscryptionAPIPlugin : BaseUnityPlugin { public const string ModGUID = "cyantist.inscryption.api"; public const string ModName = "InscryptionAPI"; - public const string ModVer = "2.22.2"; + public const string ModVer = "2.22.3"; public static string Directory = "";