Closed p4535992 closed 8 months ago
I would recommend using the abbreviation
property on the currencies, which are usually {#}GP
, which when {#}
is replaced with the number it becomes 5GP
. You can see this here:
I would also recommend putting the validation in the public-facing API method, rather than the method in the PileUtilities, to conform to the typical layout, as you can see here:
https://github.com/fantasycalendar/FoundryVTT-ItemPiles/blob/master/src/API/api.js#L1780-L1799
Apply advises and put a method for help to check if the abbreviation exists on item piles. If it makes sense to you as well or I remove it ... basically I need a method to be able to say the string "GP" is recorded as abbrevation "GP" (without the {#} ) in at least one of the currencies, or maybe there is already a alternative method for accomplish this.
Probably isn't needed to validate that, but we'll keep it. Thanks for the contribution!
I decided to kill lazy money in favor of item piles.
During the development of integration with other modules I noticed that they almost all are based on the concept of value+denominatiom, in order not to rewrite the same code several times I thought to try to insert the utility method directly on Item Piles, also because I don't know if there are necessary controls on currency denominations present on game.itempiles.API.CURRENCIES or game.itempiles.API.SECONDARY_CURRENCIES.