KageJittai / lets-trade-5e

A Foundry VTT module which allows you to send and receive items from other players.
MIT License
11 stars 14 forks source link

Added compatibility for Sw5e system #14

Closed burndaflame closed 3 years ago

KageJittai commented 3 years ago

Hey, I appreciate the request but would like to find a more generic way of handling the custom currencies.

Ideally using a compatibility configuration, we can define currencies to render and process in the trade window, removing the need to make branches based on specific systems. This would expand support for other systems in the future.

burndaflame commented 3 years ago

Based on your suggestion I started work on that option.

Still trying to figure out on how to pass the results gathered in on renderActorSheet5eCharacter/renderInjectionHook to onItemTradeClick.

Generating the HTML in the Template and such already works great on my fork.

KageJittai commented 3 years ago

You'll want to export a function from the compaitablility.js which returns an object that's correctly configured for the current system. So the branching all happens in compatibility.js and not in any of the rest of the code.