Skip to content

Commit 3066a51

Browse files
committed
Some more compatibility checks
1 parent 9279651 commit 3066a51

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

patches/DontAddContinueToBar.cs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ namespace SelectAnyNumberRounds.Patch
55
[HarmonyPatch(typeof(CardBar), nameof(CardBar.AddCard))]
66
public static class DontAddContinueToBar
77
{
8+
[HarmonyPriority(Priority.First)] // Run this patch first, as we want to prevent as many side effects as possible
89
public static bool Prefix(CardInfo card)
910
{
1011
return card.cardName != "Continue"; // Do not add the continue card to the player's hand

patches/PickNoRefresh.cs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace SelectAnyNumberRounds.Patch
99
[HarmonyPatch(typeof(CardChoice), nameof(CardChoice.Pick))]
1010
public static class PickNoRefresh
1111
{
12+
[HarmonyPriority(Priority.Last)] // Run this patch last, as this replaces the original method
1213
public static bool Prefix(ref CardChoice __instance, GameObject pickedCard, bool clear, ref PickerType ___pickerType, ref List<GameObject> ___spawnedCards)
1314
{
1415
// Override the original method with our own

patches/RespawnCardChoice.cs

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ public static IEnumerator IDoEndPickPatched(GameObject pickedCard, int theInt, i
9292
yield break;
9393
}
9494

95+
[HarmonyPriority(Priority.Last)] // Run this patch last
9596
public static bool Prefix(GameObject pickedCard, int theInt, int pickId, CardChoice __instance, float ___speed, List<GameObject> ___spawnedCards, ref IEnumerator __result)
9697
{
9798
if (!pickedCard || pickedCard.name == "__SAN__Continue(Clone)")

0 commit comments

Comments
 (0)