syl3r86 / inventory-plus

A Foundry VTT module to enhance the dnd5e inventory. Allows to customize your Inventory in various ways.
8 stars 12 forks source link

Bug-fix: NaN carry weight with "Coin Weight" enabled #28

Closed ZeroXNoxus closed 3 years ago

ZeroXNoxus commented 3 years ago

After updating to DnD5e system 1.4.x, the total weight bar at the bottom of the inventory tab shows as NaN/{Carry Capacity} (Issue #27).

This calculation error is happening because the system added the ability to switch between metric and imperial unit calculation.

CONFIG.DND5E.encumbrance.currencyPerWeight

This line now fetches an object containing the new conversion units.

The commit fixes this issue by providing a simple decision to determine the game settings measurement units.

Since this issue is related to the newest update, I've taken the liberty to itterate the module version and change the minimum core version to 0.8.8, please review if this is acceptable.

Minor clean up: