From 18b9901aea5f74ac1b316ddb7ca402c10f73b15e Mon Sep 17 00:00:00 2001 From: Blair McMillan Date: Tue, 5 Sep 2023 16:08:28 +1000 Subject: [PATCH] add pirateborg system support --- src/systems.js | 4 ++++ src/systems/pirateborg.js | 41 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 src/systems/pirateborg.js diff --git a/src/systems.js b/src/systems.js index ec1fb4cd..9ac90e74 100644 --- a/src/systems.js +++ b/src/systems.js @@ -33,6 +33,7 @@ import naheulbeuk from "./systems/naheulbeuk.js"; import icrpgme from "./systems/icrpgme.js"; import bladeRunner from "./systems/blade-runner.js"; import alienrpg from "./systems/alienrpg.js"; +import pirateborg from "./systems/pirateborg.js"; // ↑ IMPORT SYSTEMS HERE ↑ /** @@ -140,6 +141,9 @@ export const SYSTEMS = { }, "naheulbeuk": { "latest": naheulbeuk + }, + "pirateborg": { + "latest": pirateborg } // ↑ ADD SYSTEMS HERE ↑ }, diff --git a/src/systems/pirateborg.js b/src/systems/pirateborg.js new file mode 100644 index 00000000..11f3ec0a --- /dev/null +++ b/src/systems/pirateborg.js @@ -0,0 +1,41 @@ +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": "container", + + // 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.quantity", + + // The item price attribute is the path to the attribute on each item that determine how much it costs + "ITEM_PRICE_ATTRIBUTE": "system.price", + + // Item 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": "feature,class,subclass,background" + } + ], + + // 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: "PB.Silver", + img: "systems/pirateborg/icons/misc/thing-of-importance.png", + abbreviation: "{#}SP", + data: { + path: "system.silver", + }, + primary: true, + exchangeRate: 1 + } + ] +}