From 78a3be2966cac8df030d87b54e046c744b836c75 Mon Sep 17 00:00:00 2001 From: Haxxer Date: Sun, 18 Dec 2022 19:04:45 +0000 Subject: [PATCH] Fixes, additions --- changelog.md | 4 +- docs/README.md | 2 + .../merchant-app/ItemEntry.svelte | 2 +- src/systems.js | 2 + src/systems/symbaroum.js | 63 +++++++++++++++++++ 5 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 src/systems/symbaroum.js diff --git a/changelog.md b/changelog.md index 8c837e3d..e8a622d1 100644 --- a/changelog.md +++ b/changelog.md @@ -2,8 +2,10 @@ ## Version 2.3.11 -- Fixed merchant tokens being deleted if they were set to be deleted when becoming empty. Disappearing merchants is mechanically cool and all, but probably not ideal. +- Added support for the Symbaroum system +- Fixed Merchants' items having a quantity counter visible on items that cannot stack - Fixed minor localization issue in the item editor +- Fixed merchant tokens being deleted if they were set to be deleted when becoming empty. Disappearing merchants is mechanically cool and all, but probably not ideal. ## Version 2.3.10 diff --git a/docs/README.md b/docs/README.md index f26e784c..9a693bb8 100644 --- a/docs/README.md +++ b/docs/README.md @@ -90,6 +90,8 @@ Item Piles is designed to work in all systems, but may require some setup for it - [KNAVE](https://foundryvtt.com/packages/knave) - [Twilight: 2000 (4th Edition)](https://foundryvtt.com/packages/t2k4e-coreset) - [Kamigakari: God Hunter](https://foundryvtt.com/packages/kamigakari) +- [Words Without Number](https://foundryvtt.com/packages/wwn) +- [Symbaroum](https://foundryvtt.com/packages/symbaroum) ## Externally support systems diff --git a/src/applications/merchant-app/ItemEntry.svelte b/src/applications/merchant-app/ItemEntry.svelte index fe220d47..2d5147c7 100644 --- a/src/applications/merchant-app/ItemEntry.svelte +++ b/src/applications/merchant-app/ItemEntry.svelte @@ -48,7 +48,7 @@ {:else} {$itemName} {/if} - {#if displayQuantity} + {#if displayQuantity && item.canStack} {#if infiniteQuantity} (∞) {:else if !showEditQuantity} diff --git a/src/systems.js b/src/systems.js index 4eb3a961..8712d9de 100644 --- a/src/systems.js +++ b/src/systems.js @@ -20,6 +20,7 @@ import t2k4e from "./systems/t2k4e.js"; import yzecoriolis from "./systems/yzecoriolis.js"; import kamigakari from "./systems/kamigakari.js"; import ose from "./systems/ose.js"; +import symbaroum from "./systems/symbaroum.js"; import wwn from "./systems/wwn.js"; // ↑ IMPORT SYSTEMS HERE ↑ @@ -52,6 +53,7 @@ export const SYSTEMS = { "yzecoriolis": yzecoriolis, "kamigakari": kamigakari, "wwn": wwn, + "symbaroum": symbaroum, //"ose": ose, // ↑ ADD SYSTEMS HERE ↑ }, diff --git a/src/systems/symbaroum.js b/src/systems/symbaroum.js new file mode 100644 index 00000000..6a6a64dc --- /dev/null +++ b/src/systems/symbaroum.js @@ -0,0 +1,63 @@ +export default { + + "VERSION": "1.0.0", + + // The actor class type is the type of actor that will be used for the default item pile actor that is created on first item drop. + "ACTOR_CLASS_TYPE": "monster", + + // The item quantity attribute is the path to the attribute on items that denote how many of that item that exists + "ITEM_QUANTITY_ATTRIBUTE": "system.number", + + // The item price attribute is the path to the attribute on each item that determine how much it costs + "ITEM_PRICE_ATTRIBUTE": "system.cost", + + // Item types and the filters actively remove items from the item pile inventory UI that users cannot loot, such as spells, feats, and classes + "ITEM_FILTERS": [ + { + "path": "type", + "filters": "ability,boon,burden,mysticalPower,ritual,trait" + } + ], + + // Item similarities determines how item piles detect similarities and differences in the system + "ITEM_SIMILARITIES": ["name", "type"], + + // Currencies in item piles is a versatile system that can accept actor attributes (a number field on the actor's sheet) or items (actual items in their inventory) + // In the case of attributes, the path is relative to the "actor.system" + // In the case of items, it is recommended you export the item with `.toObject()` and strip out any module data + "CURRENCIES": [ + { + type: "attribute", + name: "Thaler", + img: "icons/commodities/currency/coins-assorted-mix-copper.webp", + abbreviation: "{#}T", + data: { + path: "system.money.thaler", + }, + primary: true, + exchangeRate: 1 + }, + { + type: "attribute", + name: "Shilling", + img: "icons/commodities/currency/coins-assorted-mix-silver.webp", + abbreviation: "{#}S", + data: { + path: "system.money.shilling", + }, + primary: false, + exchangeRate: 0.1 + }, + { + type: "attribute", + name: "Orteg", + img: "icons/commodities/currency/coins-assorted-mix-platinum.webp", + abbreviation: "{#}O", + data: { + path: "system.money.orteg", + }, + primary: false, + exchangeRate: 0.01 + } + ] +}