Skip to content

Commit

Permalink
Fixed some issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Haxxer committed Sep 9, 2022
1 parent 633611d commit a715fbd
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 16 deletions.
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Item Piles Changelog

## Version 2.0.1

- Fixed default settings for PF1e system was broken
- Fixed issue with previewing items on item piles
- Fixed issue when dropping items with only one quantity ending up at the very top left of the scene
- Fixed unsupported systems throwing errors when trying to configure them

## Version 2.0.0

- Added fully-featured merchant functionality
Expand Down
4 changes: 3 additions & 1 deletion src/API/private-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,8 @@ export default class PrivateAPI {
let x;
let y;

debugger;

if (dropData.target) {

droppableDocuments.push(dropData.target);
Expand Down Expand Up @@ -1084,7 +1086,7 @@ export default class PrivateAPI {
}
}

let newPile = !!droppableDocuments.length;
let newPile = !droppableDocuments.length;

if (hotkeyState.altDown) {

Expand Down
5 changes: 1 addition & 4 deletions src/systems.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ export const SYSTEMS = {
ITEM_PRICE_ATTRIBUTE: "",
ITEM_FILTERS: [],
ITEM_SIMILARITIES: [],
CURRENCIES: {
"itemBased": false,
"list": []
}
CURRENCIES: []
},

get HAS_SYSTEM_SUPPORT() {
Expand Down
22 changes: 11 additions & 11 deletions src/systems/pf1.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
export default {

"VERSION": "1.0.0",

"VERSION": "1.0.1",
// 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": "npc",

// The item quantity attribute is the path to the attribute on items that denote how many of that item that exists
"ITEM_QUANTITY_ATTRIBUTE": "data.quantity",

// 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": "attack,buff,class,feat,race,spell"
}
],

// 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.data"
// In the case of items, it is recommended you export the item with `.toObject()` and strip out any module data
Expand All @@ -29,18 +29,18 @@ export default {
img: "systems/pf1/icons/items/inventory/coins-silver.jpg",
abbreviation: "{#}PP",
data: {
path: "data.currency.gold",
path: "data.currency.pp",
},
primary: true,
primary: false,
exchangeRate: 10
},
{
type: "attribute",
name: "DS4.CharacterCurrencyGold",
name: "PF1.CurrencyGoldP",
img: "systems/pf1/icons/items/inventory/coin-gold.jpg",
abbreviation: "{#}G",
data: {
path: "data.currency.gold",
path: "data.currency.gp",
},
primary: true,
exchangeRate: 1
Expand Down

0 comments on commit a715fbd

Please sign in to comment.