Skip to content

Commit

Permalink
CSB
Browse files Browse the repository at this point in the history
  • Loading branch information
Haxxer committed Dec 3, 2023
1 parent 30d8313 commit a2c1183
Show file tree
Hide file tree
Showing 4 changed files with 301 additions and 285 deletions.
13 changes: 13 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Item Piles Changelog

## Version 2.8.5

- Finally ACTUALLY fixed quantity not showing up properly on the Custom System Builder system
- Fixed missing location on the trade button in the bottom left

## Version 2.8.4

- Added support for the Shadow of the Demonlord system (thank you to brantai on github!)
- Updated French, German, Portuguese (Brazil), and Polish localization (thank you everyone for contributing on weblate!)
- Fixed minor Simple Calendar incompatibility
- Fixed faulty migration code causing errors with other modules
- Fixed migration being loud when it should have been silent (it logged to console)

## Version 2.8.3

- Fixed Custom System Builder item quantity not working properly
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ Item Piles is designed to work in all systems, but may require some setup for it
- [Alien RPG](https://foundryvtt.com/packages/alienrpg)
- [Pirate Borg](https://foundryvtt.com/packages/pirateborg)
- [Star Wars FFG](https://foundryvtt.com/packages/starwarsffg)
- [Shadow of the Demonlord](https://foundryvtt.com/packages/demonlord)

## Externally support systems

Expand Down
4 changes: 3 additions & 1 deletion src/helpers/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import CONSTANTS from "../constants/constants.js";
import SETTINGS from "../constants/settings.js";
import { getItemFlagData } from "./pile-utilities.js";
import { deletedActorCache } from "./caches.js";
import { SYSTEMS } from "../systems.js";

export function getActor(target) {
if (target instanceof Actor) return target;
Expand Down Expand Up @@ -166,9 +167,10 @@ export function getItemTypesThatCanStack() {
itemTypesWithQuantities = new Set();

if (game.system.id === "custom-system-builder") {
const quantityAttribute = game.itempiles.API.ITEM_QUANTITY_ATTRIBUTE.split(".").pop();
const itemTemplates = game.items
.filter(_i => _i?.templateSystem?.isTemplate && _i?.templateSystem?.getKeys)
.filter(_i => _i.templateSystem.getKeys().has(_i.system.body.contents));
.filter(_i => _i.templateSystem.getKeys().has(quantityAttribute));
for (const item of itemTemplates) {
itemTypesWithQuantities.add(item.name);
}
Expand Down
Loading

0 comments on commit a2c1183

Please sign in to comment.