OhhLoz / Harvester

A QoL FoundryVTT module to improve the harvesting and looting experience.
GNU General Public License v3.0
2 stars 2 forks source link

[BUG][v12] Integration with Item Piles doesn't work anymore. #52

Open hyrapower opened 2 months ago

hyrapower commented 2 months ago

Module Version: v1.8.6

Before open any issue Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'name') at LootingHelpers.handlePreRollLootAction (looting-helpers.js:74:87) at Object.fn (module.js:4009:20) at #call (foundry.js:608:20) at Hooks.callAll (foundry.js:565:17) at Item5e.use (item.mjs:1009:11) at async Item5e.doItemUse (itemhandling.js:621:16)

    let rollTablesMatched = [];
    Logger.debug(`LootingHelpers | Searching RollTablesMatched`);
    rollTablesMatched = BetterRollTablesHelpers.retrieveTablesLootWithBetterRollTables(
        actorName,
        lootAction.name || item.name,
    );
    Logger.debug(`LootingHelpers | Found RollTablesMatched (${rollTablesMatched?.length})`, rollTablesMatched);
    const rollTableChosenLoot = rollTablesMatched[0];
    Logger.info(`LootingHelpers | RollTablesMatched chosen '${rollTableChosenLoot.name}'`);

Describe the bug Looting doesn't work anymore. Error with converting '3d6sp' to addCurrency

updating to V12 and having the other mods have recent updates obviously called out some compatibility issues.

To Reproduce Steps to reproduce the behavior:

  1. spawn player character
  2. spawn deer
  3. bring deer to 0 hp and put on the dead status
  4. target deer
  5. loot deer
  6. See error

Expected behavior deer is looted and gold is added to player character.

Screenshots none

Browser: Google Chrome

Foundry Version: 12 Build 327

Game System: DND5E

Additional context I really love your mod and I wish I knew how to fix the problems myself. I'll put in a commit if I can figure anything out for a PR.

I know that V11 and V12 are probably incompatible in general as well and Better Roll Tables hasn't been updated in awhile either which probably doesn't help things.

p4535992 commented 2 months ago

The module is simply not ready for v12.