OnSmith method for Relics should be called on different moment
Right now, OnSmith is called, when you click the Smith button at a rest room. But u can just go back and click it again to trigger the method infinitely at one singular restroom. It should be called, when a card is actually upgraded.
onSmith is part of the base game so I won't be changing it's function. Should BaseMod add a separate hook for card upgrades, for example a onUpgrade event that mods could subscribe to?
Since the method upgrade in AbstractCard is an abstract method it can't be directly patched so instead I've patched upgradeName. Currently every card calls it when upgraded but if in the future a card doesn't call upgradeName this hook would break for that card in particular. Here's my idea on how to fix this (https://github.com/daviscook477/BaseMod/tree/feature/upgrade-hook) but it has some issues. Namely that this is called any time a card instance is upgraded and since the game likes to duplicate card instance and upgrade them when displaying potential upgrades this event would fire way too often,
Yeah, a seperate hook would be nice. Although i don't know why this onSmith hook is placed there in the first place. I don't think it is even used in StS.