Skip to content

Commit 212ff8a

Browse files
committed
Add XML Docs to the Community Patch Sequencers Module
1 parent b8cf619 commit 212ff8a

6 files changed

Lines changed: 38 additions & 2 deletions

File tree

‎InscryptionCommunityPatch/Sequencers/BuyPeltsSmallTags.cs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
namespace InscryptionCommunityPatch.Sequencers;
66

7+
/// <summary>
8+
/// Patches in Smaller Price tags and a moved Price tag when either the <see cref="PatchPlugin.configDisplaySmallerPriceTags"/> and <see cref="PatchPlugin.configDisplayPriceTagsOnTheRight"/> are true respectively.
9+
/// </summary>
710
[HarmonyPatch]
811
internal class BuyPeltsSmallTags
912
{

‎InscryptionCommunityPatch/Sequencers/CardCostChoiceNodePatch.cs‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55

66
namespace InscryptionCommunityPatch.Sequencers;
77

8+
/// <summary>
9+
/// Patches in Our Cost Card Backs into the <see cref="CardSingleChoicesSequencer.GetCardbackTexture"/> function for Energy and Mox costs.
10+
/// </summary>
811
[HarmonyPatch]
912
internal static class ChoiceNodePatch
1013
{
@@ -21,5 +24,11 @@ private static void CardSingleChoicesSequencer_GetCardbackTexture(ref Texture __
2124
break;
2225
}
2326
}
24-
public static string MoxTextureName(int index) => "moxCost" + (index switch { 1 => "Green", 2 => "Orange", 3 => "Blue", _ => "" }) + ".png";
27+
28+
/// <summary>
29+
/// Handles getting the correct Mox Texture Name for usage in the <see cref="CardSingleChoicesSequencer_GetCardbackTexture"/> patch.
30+
/// </summary>
31+
/// <param name="index">1 -> <c>Green</c>, 2 -> <c>Orange</c>, 3 -> <c>Blue</c>, otherwise -> <c>Empty</c></param>
32+
/// <returns>A string texture name in the form of <c>moxCost{Color}.png</c></returns>
33+
private static string MoxTextureName(int index) => "moxCost" + (index switch { 1 => "Green", 2 => "Orange", 3 => "Blue", _ => "" }) + ".png";
2534
}

‎InscryptionCommunityPatch/Sequencers/CardStatBoostSequencerPatch.cs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
namespace InscryptionCommunityPatch.Sequencers;
99

10+
/// <summary>
11+
/// This patches in a conditional check as to whether or not the card has Boostable Stats or not.
12+
/// </summary>
1013
[HarmonyPatch]
1114
internal class CardStatBoostSequencerPatch
1215
{

‎InscryptionCommunityPatch/Sequencers/LeshyResetRedEyes.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
namespace InscryptionCommunityPatch.Sequencers;
66

7+
/// <summary>
8+
/// This patch applies when <see cref="InscryptionCommunityPatch.PatchPlugin.configResetEyesToNormalAfter8BearsFights"/> is set to true.
9+
/// When set to true after the boss has been beat, it resets their eyes back to normal rather than remaining red.
10+
/// </summary>
711
[HarmonyPatch]
812
internal class LeshyResetRedEyes
913
{

‎InscryptionCommunityPatch/Sequencers/PackRatNodeBackgroundFix.cs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
namespace InscryptionCommunityPatch.Sequencers;
66

7-
// 'fixes' the pack rat card not being rare
7+
/// <summary>
8+
/// Corrects the Pack Rat Card to be a Rare Card.
9+
/// </summary>
810
[HarmonyPatch]
911
internal class PackRatNodeBackgroundFix
1012
{

‎InscryptionCommunityPatch/Sequencers/TradeableTalkingCardFix.cs‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,19 @@
66

77
namespace InscryptionCommunityPatch.Sequencers;
88

9+
/// <summary>
10+
/// This patch fixes Tradable Talking Card related Issues.
11+
/// </summary>
912
[HarmonyPatch]
1013
public class TradeableTalkingCardFix
1114
{
15+
/// <summary>
16+
/// Patches the <see cref="TradeCardsForPelts.OnTradableSelected"/> to allow for better handling regarding the Trade of Talking Cards.
17+
/// </summary>
18+
/// <param name="__instance">The Class Instance associated with the function e.g. <see cref="TradeCardsForPelts"/>.</param>
19+
/// <param name="slot">The slot the card was found in.</param>
20+
/// <param name="card">The card being traded for.</param>
21+
/// <returns>This only returns our patched variant if the card is a talking card, otherwise it uses vanilla handling.</returns>
1222
[HarmonyPrefix, HarmonyPatch(typeof(TradeCardsForPelts), nameof(TradeCardsForPelts.OnTradableSelected))]
1323
private static bool OnTalkingCardSelected(TradeCardsForPelts __instance, HighlightedInteractable slot, PlayableCard card)
1424
{
@@ -42,6 +52,11 @@ private static bool OnTalkingCardSelected(TradeCardsForPelts __instance, Highlig
4252
return false;
4353
}
4454

55+
/// <summary>
56+
/// Handles the View associated with a trade specific to Talking Cards.
57+
/// </summary>
58+
/// <param name="card">The card in which is being given to the player.</param>
59+
/// <returns>The card added to hand, then a switch back to the trading pool.</returns>
4560
public static IEnumerator TradeForTalkingCard(PlayableCard card)
4661
{
4762
yield return Singleton<PlayerHand>.Instance.AddCardToHand(CardSpawner.SpawnPlayableCard(card.Info), new Vector3(0f, 0.5f, -3f), 0f);

0 commit comments

Comments
 (0)