Support for Currency systems
xyberviri opened this issue ยท 6 comments
Hello, i love this mod.
I was wonder if you would be willing to add a couple of Currency systems into this mod? I think it would really bring more options for people to add more requirements.
- https://github.com/kamildanak/EnderPay
- https://github.com/The-Fireplace-Minecraft-Mods/Grand-Economy
- https://github.com/ForgeEssentials/ForgeEssentials
Grand Economy is based off ender pay so the api is exactly the same:
- https://github.com/kamildanak/EnderPay/blob/master/src/main/java/com/kamildanak/minecraft/enderpay/api/EnderPayApi.java
- https://github.com/The-Fireplace-Minecraft-Mods/Grand-Economy/blob/master/src/main/java/the_fireplace/grandeconomy/api/GrandEconomyApi.java
Forge Essentials just needs the registry and wallet api:
- https://github.com/ForgeEssentials/ForgeEssentials/blob/1.12.2/develop/src/main/java/com/forgeessentials/api/economy/Wallet.java
- https://github.com/ForgeEssentials/ForgeEssentials/blob/1.12.2/develop/src/main/java/com/forgeessentials/api/APIRegistry.java
Theres a really simple system over in freetrading for using these:
https://github.com/Foghrye4/Freetrading/blob/master/src/main/java/freetrading/trading_system/TradingSystem.java#L310-L339
implemented here:
https://github.com/Foghrye4/Freetrading/blob/master/src/main/java/freetrading/mod_interaction/
id work on this my self but im not really that good working with the gui yet, and its literally like stupid easy when you look at how Foghrye4 did it with freetrading.
Freetrading is also under MIT license
not sure how this impacts d1dd15e as those all use EntityPlayerMP
to figure out how much a player has/deduct from them, which down the line uses uuid's on the back end. Also if costs are only deducted at the time the player unlocks/starts the research then this should be a non issue because you should always have access to EntityPlayerMP no matter what their username is. Thats also assuming that there is no way for a person to automate the unlocking of new research categories.
id recommend Grand Economy, according to issue The-Fireplace-Minecraft-Mods/Grand-Economy#2 Grand Economy is supposed to support Forge Essentials, EnderPay & Sponge-based currency conversions.
(its worth just mentioning that you can indirectly support those economies using grand economy as the backend).