Details

Last Updated
last year
First Uploaded
last year
Downloads
1.4M
Likes
4
Size
75KB
Dependency string
Pykess-CardChoiceSpawnUniqueCardPatch-0.1.10
Dependants

CardChoiceSpawnUniqueCardPatch


This is a utility mod which patches the erroneous CardChoice.SpawnUniqueCard method in the base game code.

Previously, the game would not properly check if the allowMultiple or blacklistedcategories fields of a card should have prevented it from being offered. Moreover, if it had done this, it would have been possible to crash the game since the method was called recursively with no garunteed exit.

This mod also adds the ability for custom cards (made with Unbound) to use CardCategories, even across mods. Simply use:

using using CardChoiceSpawnUniqueCardPatch.CustomCategories;

...

cardInfo.categories = new CardCategory[] { CustomCardCategories.instance.CardCategory("MySpecialCategory") };

then, if another card in another mod wants to be exclusive or incompatible with the example card above, it should simply use:

using using CardChoiceSpawnUniqueCardPatch.CustomCategories;

...

cardInfo.blacklistedCategories = new CardCategory[] { CustomCardCategories.instance.CardCategory("MySpecialCategory") };

Patch Notes

  • 1.6: performance improvements
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.