Skip to content

Conversation

@willuwontu
Copy link
Contributor

Get Or Add CardInfo

Currently only supports custom stats for Block, Gun, GunAmmo, CharacterStatModifiers, and Player, as they're the only ones with a built in method to reset stats.
By Calling awake, we setup any information done in `SetupCard` to restrict access to a card, such as setting card categories or setting allow multiple to false.
This reverts commit f00f3df, reversing
changes made to eae72b6.
@willis81808
Copy link
Collaborator

Please submit a summary of the motivations for this PR

@willuwontu
Copy link
Contributor Author

Currently if you try to register a prefab that lacks the necessary components, it will throw an error. Similarly, it will also throw errors when picked if the gun.objectsToSpawn, gun.projectiles, or block.objectsToSpawn fields are null.

This change allows users to use CustomCard.BuildUnityCard on prefabs that only have the CustomCard Component, or no components at all.

@willuwontu willuwontu changed the title Card choice patch CustomCard Update Mar 1, 2023
@willuwontu willuwontu changed the title CustomCard Update CustomCard Prefab Support Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants