Object
| An object containing the type and UUID of the object being dragged |
+
+### item-piles-onDropDocument
+
+Called when any document stops being dragged and is dropped - at least by native Foundry code.
+
+| Param | Type | Description |
+|-------|---------------------|--------------------------------------------------------------------|
+| data | Object
| An object containing the type and UUID of the object being dropped |
+
---
## Specific
@@ -148,10 +166,10 @@ Called after all items and attributes have been transferred from the source to t
Called before an item piles related interface has begun rendering.
-| Param | Type | Description |
-|------------------|------------------------------------------|-------------------------------------------------------------------------------------------------|
-| source | Actor/TokenDocument
| The item pile actor |
-| inspectingTarget | Actor/TokenDocument,Boolean
| The actor/token that started to render the interface |
+| Param | Type | Description |
+|------------------|------------------------------------------|------------------------------------------------------|
+| source | Actor/TokenDocument
| The item pile actor |
+| inspectingTarget | Actor/TokenDocument,Boolean
| The actor/token that started to render the interface |
If the hook returns `false`, the action is interrupted.
@@ -187,12 +205,12 @@ and merchants.
Called before an item piles related interface is closed.
-| Param | Type | Description |
-|---------------|------------------------------------------|-------------------------------------------------------------------|
-| app | SvelteApplication
| The application to be closed |
-| source | Actor/TokenDocument
| The item pile actor |
-| recipient | Actor/TokenDocument,Boolean
| The actor that was involved in opening the interface |
-| options | object
| An object containing options regarding how to close the interface |
+| Param | Type | Description |
+|-----------|------------------------------------------|-------------------------------------------------------------------|
+| app | SvelteApplication
| The application to be closed |
+| source | Actor/TokenDocument
| The item pile actor |
+| recipient | Actor/TokenDocument,Boolean
| The actor that was involved in opening the interface |
+| options | object
| An object containing options regarding how to close the interface |
If the hook returns `false`, the action is interrupted.
@@ -200,12 +218,12 @@ If the hook returns `false`, the action is interrupted.
Called after an item piles related interface is closed.
-| Param | Type | Description |
-|---------------|------------------------------------------|-------------------------------------------------------------------|
-| app | SvelteApplication
| The application that was closed |
-| source | Actor/TokenDocument
| The item pile actor |
-| recipient | Actor/TokenDocument,Boolean
| The actor that was involved in opening the interface |
-| options | object
| An object containing options regarding how to close the interface |
+| Param | Type | Description |
+|-----------|------------------------------------------|-------------------------------------------------------------------|
+| app | SvelteApplication
| The application that was closed |
+| source | Actor/TokenDocument
| The item pile actor |
+| recipient | Actor/TokenDocument,Boolean
| The actor that was involved in opening the interface |
+| options | object
| An object containing options regarding how to close the interface |
## Item Piles
@@ -507,10 +525,10 @@ Called after the content of an item pile has been split.
Called before resolving a click on an item pile token
-| Param | Type | Description |
-|------------------|---------------------------------|----------------------------------------------------------------|
+| Param | Type | Description |
+|------------------|----------------------------|----------------------------------------------------------------|
| target | TokenDocument
| The item pile token that was clicked |
-| interactingActor | Actor
| The actor of the user that interacted with the item pile token |
+| interactingActor | Actor
| The actor of the user that interacted with the item pile token |
If the hook returns `false`, the action is interrupted.
@@ -652,13 +670,13 @@ If the hook returns `false`, the action is interrupted.
Called after items have been transferred from the source to the target.
-| Param | Type | Description |
-|-----------------|----------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
-| source | Actor/TokenDocument
| The source that transferred items |
-| target | Actor/TokenDocument
| The target that received the items |
-| itemDeltas | array
| An array of objects each containing the item id and the quantity that was changed on the target |
-| userId | string
| The ID of the user that initiated this action |
-| interactionId | string/boolean
| The ID of this interaction, to identify ongoing transfers |
+| Param | Type | Description |
+|---------------|----------------------------------|-------------------------------------------------------------------------------------------------|
+| source | Actor/TokenDocument
| The source that transferred items |
+| target | Actor/TokenDocument
| The target that received the items |
+| itemDeltas | array
| An array of objects each containing the item id and the quantity that was changed on the target |
+| userId | string
| The ID of the user that initiated this action |
+| interactionId | string/boolean
| The ID of this interaction, to identify ongoing transfers |
---
@@ -682,13 +700,13 @@ If the hook returns `false`, the action is interrupted.
Called after all items has been transferred from the source to the target.
-| Param | Type | Description |
-|-----------------|----------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
-| source | Actor/TokenDocument
| The source that transferred all of its items |
-| target | Actor/TokenDocument
| The target that received all of the items |
-| itemDeltas | array
| An array of objects each containing the item id and the quantity that was changed on the target |
-| userId | string
| The ID of the user that initiated this action |
-| interactionId | string/boolean
| The ID of this interaction, to identify ongoing transfers |
+| Param | Type | Description |
+|---------------|----------------------------------|-------------------------------------------------------------------------------------------------|
+| source | Actor/TokenDocument
| The source that transferred all of its items |
+| target | Actor/TokenDocument
| The target that received all of the items |
+| itemDeltas | array
| An array of objects each containing the item id and the quantity that was changed on the target |
+| userId | string
| The ID of the user that initiated this action |
+| interactionId | string/boolean
| The ID of this interaction, to identify ongoing transfers |
---
@@ -742,12 +760,12 @@ Called before a trade between a merchant and an actor has been finalized.
Called before the user has sent the request to give an item to another user's actor.
-| Param | Type | Description |
-|--------------|---------------------|--------------------------------------------------------------|
-| source | Actor
| The source actor that will give the item |
-| target | Actor
| The target actor that will receive the item |
-| item | Object
| The item data to be given |
-| sourceUserId | string
| The ID of the user that initiated this action |
+| Param | Type | Description |
+|--------------|---------------------|--------------------------------------------------|
+| source | Actor
| The source actor that will give the item |
+| target | Actor
| The target actor that will receive the item |
+| item | Object
| The item data to be given |
+| sourceUserId | string
| The ID of the user that initiated this action |
| targetUserId | string
| The ID of the user that will receive the request |
If the hook returns `false`, the action is interrupted.
@@ -758,8 +776,8 @@ If the hook returns `false`, the action is interrupted.
Called after a user gave an item to another user's actor.
-| Param | Type | Description |
-|---------------|-----------------------------|-------------------------------------------------|
+| Param | Type | Description |
+|--------------|---------------------|-------------------------------------------------|
| source | Actor
| The source actor that gave the item |
| target | Actor
| The target actor that received the item |
| item | Object
| The item data that was given |
@@ -947,12 +965,12 @@ Called after currencies were added to the target. Not called in the case of a tr
Called before currencies were removed from the target. Not called in the case of a transfer.
-| Param | Type | Description |
-|---------------|----------------------------------|-----------------------------------------------------------------------------------------------------------------|
-| target | Actor/TokenDocument
| The target that will have its currencies removed |
+| Param | Type | Description |
+|---------------|----------------------------------|------------------------------------------------------------------------------------------------------------------------------|
+| target | Actor/TokenDocument
| The target that will have its currencies removed |
| actorUpdates | object
| An object, where the keys are the attribute that is going to be updated, the value being the quantity is going to be changed |
-| itemsToUpdate | array
| An array of objects each containing the item id and the quantity that was updated |
-| interactionId | string/boolean
| The ID of this interaction, to identify ongoing transfers |
+| itemsToUpdate | array
| An array of objects each containing the item id and the quantity that was updated |
+| interactionId | string/boolean
| The ID of this interaction, to identify ongoing transfers |
If the hook returns `false`, the action is interrupted.
diff --git a/languages/en.json b/languages/en.json
index 1dc3b183..1cb4c2de 100644
--- a/languages/en.json
+++ b/languages/en.json
@@ -44,7 +44,7 @@
"GiveItemDeclined": "{user_name} declined your item offer.",
"NoPlayersActive": "No players are active to do this action",
"NoGMsConnectedAction": "WARNING - Could not execute \"{action}\" because no GMs are active.",
- "VaultFull": "This vault is full!",
+ "VaultFull": "This item can't fit into this vault!",
"VaultItemNotExpander": "That item is not a vault expander"
},
"Inspect": {
@@ -405,6 +405,11 @@
"CustomCategoryExplanation": "When not blank, this item will be listed under a different type than what it is.",
"Hidden": "Item Is Hidden",
"HiddenExplanation": "When enabled, this item does not show up in the merchant's item lists.",
+ "CanStack": "Can Stack",
+ "CanStackExplanation": "This configures whether this item will stack with other items that are similar to it.",
+ "CanStackDefault": "Default to item pile's setting",
+ "CanStackYes": "Yes, can always stack",
+ "CanStackNo": "No, cannot stack",
"DisplayQuantity": "Item Quantity Visibility",
"DisplayQuantityExplanation": "This configures how the quantity this item in the store is shown, if at all.",
"DisplayQuantityDefault": "Default to merchant setting",
@@ -440,11 +445,12 @@
"DropMeClickMe": "Click to add an attribute or drag & drop an item to add",
"PricePreset": "Or select a price preset:",
"SelectPreset": "Select price preset",
- "CanStack": "Can Stack",
- "CanStackExplanation": "This configures whether this item will stack with other similar items when added to a vault.",
- "CanStackDefault": "Default to vault's setting",
- "CanStackYes": "Yes, can always stack",
- "CanStackNo": "No, cannot stack",
+ "GridSize": "Grid Size",
+ "GridSizeExplanation": "This configures how many grid spaces this item takes up.",
+ "VaultImage": "Vault Image",
+ "VaultImageExplanation": "This overrides the item's image when displayed in a vault.",
+ "GridWidth": "Width",
+ "GridHeight": "Height",
"VaultExpander": "Vault Expander",
"VaultExpanderExplanation": "When this is enabled, this item does not act as a normal item in a vault, it instead increases the number of available slots, as determined below.",
"ExpandColumnsRows": "Column & Rows Expansion",
diff --git a/src/API/api.js b/src/API/api.js
index 0c3682da..69fbb64b 100644
--- a/src/API/api.js
+++ b/src/API/api.js
@@ -12,2383 +12,2384 @@ import { SYSTEMS } from "../systems.js";
import ItemPileConfig from "../applications/item-pile-config/item-pile-config.js";
class API {
- /**
- * @class API
- */
-
- /**
- * The actor class type used for the original item pile actor in this system
- *
- * @returns {string}
- */
- static get ACTOR_CLASS_TYPE() {
- return Helpers.getSetting(SETTINGS.ACTOR_CLASS_TYPE);
- }
-
- /**
- * The currencies used in this system
- *
- * @returns {Array<{primary: boolean, name: string, data: Object, img: string, abbreviation: string, exchange: number}>}
- */
- static get CURRENCIES() {
- return foundry.utils.deepClone(Helpers.getSetting(SETTINGS.CURRENCIES).map(currency => {
- if (currency.type === "item" && currency.data.uuid) {
- const compendiumItem = CompendiumUtilities.getItemFromCache(currency.data.uuid);
- if (compendiumItem) {
- currency.data.item = compendiumItem;
- }
- }
- delete currency["quantity"];
- return currency;
- }));
- }
-
- /**
- * The secondary currencies used in this system
- *
- * @returns {Array<{name: string, data: Object, img: string, abbreviation: string}>}
- */
- static get SECONDARY_CURRENCIES() {
- return foundry.utils.deepClone(Helpers.getSetting(SETTINGS.SECONDARY_CURRENCIES).map(currency => {
- if (currency.type === "item" && currency.data.uuid) {
- const compendiumItem = CompendiumUtilities.getItemFromCache(currency.data.uuid);
- if (compendiumItem) {
- currency.data.item = compendiumItem;
- }
- }
- delete currency["quantity"];
- return currency;
- }));
- }
-
- /**
- * The smallest decimal digits shown for any fractional currency amounts. Only used when there is only one currency.
- *
- * @returns {Number}
- */
- static get CURRENCY_DECIMAL_DIGITS() {
- return Helpers.getSetting(SETTINGS.CURRENCY_DECIMAL_DIGITS);
- }
-
- /**
- * The attribute used to track the price of items in this system
- *
- * @returns {string}
- */
- static get ITEM_PRICE_ATTRIBUTE() {
- return Helpers.getSetting(SETTINGS.ITEM_PRICE_ATTRIBUTE);
- }
-
- /**
- * The attribute used to track the quantity of items you would get for the price of an item
- *
- * @returns {string}
- */
- static get QUANTITY_FOR_PRICE_ATTRIBUTE() {
- return Helpers.getSetting(SETTINGS.QUANTITY_FOR_PRICE_ATTRIBUTE);
- }
-
- /**
- * The attribute used to track the quantity of items in this system
- *
- * @returns {string}
- */
- static get ITEM_QUANTITY_ATTRIBUTE() {
- return Helpers.getSetting(SETTINGS.ITEM_QUANTITY_ATTRIBUTE);
- }
-
- /**
- * The filters for item types eligible for interaction within this system
- *
- * @returns {Array<{name: string, filters: string}>}
- */
- static get ITEM_FILTERS() {
- return Helpers.getSetting(SETTINGS.ITEM_FILTERS);
- }
-
- /**
- * The attributes for detecting item similarities
- *
- * @returns {Array