-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #290 from HumabHatterZed/main
Added card extensions, null checks, fixed DrawCopyOnDeath warnings
- Loading branch information
Showing
14 changed files
with
197 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
InscryptionCommunityPatch/Card/Vanilla Ability Patches/DrawCopyOnDeathFix.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using DiskCardGame; | ||
using HarmonyLib; | ||
using InscryptionAPI.Card; | ||
using System.Collections; | ||
using UnityEngine; | ||
|
||
namespace InscryptionCommunityPatch.Card; | ||
|
||
[HarmonyPatch] | ||
internal class DrawCopyOnDeathFix | ||
{ | ||
[HarmonyPatch(typeof(DrawCopyOnDeath), nameof(DrawCopyOnDeath.CardToDraw), MethodType.Getter)] | ||
[HarmonyPostfix] | ||
private static void UseAlternatePortrait(DrawCopyOnDeath __instance, ref CardInfo __result) | ||
{ | ||
if (__instance?.Card?.Info != null) | ||
__result = __instance.Card.Info.Clone() as CardInfo; | ||
} | ||
} |
Oops, something went wrong.