syl3r86 / inventory-plus

A Foundry VTT module to enhance the dnd5e inventory. Allows to customize your Inventory in various ways.
8 stars 12 forks source link

BUG - Max weight seem not work anymore #32

Open p4535992 opened 2 years ago

p4535992 commented 2 years ago

Environment Details

Foundry VTT Version: 0.8.9 Operating System: [Linux] How Are You Using Foundry: [Linux,Native Application (Electron), Chrome] Which Game System: Dungeons and Dragons 5th Edition, version 1.4.2 Modules Enabled?: yes OS, Hosting, Browser (if applicable): Linux/Node/Chrome Module Version : 0.3.5

Description of the issue

The "Max Weight" property seem not work anymore with tidy sheet, so the feature "any item from being droped into the category if the combined itemweigth would be increased past this number" not work.

Another possible related exception i get when try to hook up the 'getdata' with this code

    libWrapper.register(VARIANT_ENCUMBRANCE_MODULE_NAME, 
      'game.dnd5e.applications.ActorSheet5eCharacter.prototype.getData', 
      async function (wrapped, ...args) {
        // const sheetData = wrapped(...args);
        // let app = this;
        const actorEntity: Actor = this.actor;  
        return wrapped(...args);
      },
    "MIXED");

is this :

img

Shuggaloaf commented 2 years ago

I am seeing the same issue. Same setup as OP except on Dnd5e ver 1.5.6

It seems that if I try to drag an item into a container that would make it overweight it does work as intended, giving an error message and not allowing the drop.

But if I already have an item in a container, and then add to the quantity of that item, then I get the same behavior as OP.

So, for example, I have a bag that can hold 10 lbs. It contains qty: 2 of item X which weighs 2 lbs. If I change the quantity to 30, which would be 60 lbs, it allows this change and the bag then shows a weight of 60/10.

@p4535992 Are you having similar behavior or are you able to actually drag items into a container that would make it overweight?