orffen / basicfantasyrpg

The Basic Fantasy RPG system for FoundryVTT!
Other
13 stars 12 forks source link

Fix coin weight calculation #64

Closed orffen closed 3 weeks ago

orffen commented 1 year ago
    // Iterate through money, add to carried weight
    if (context.data.money) {
      let gp = Number(context.data.money.gp.value);
      gp += context.data.money.pp.value * 5;
      gp += context.data.money.ep.value / 5;
      gp += context.data.money.sp.value / 10;
      gp += context.data.money.cp.value / 100;
      carriedWeight._addWeight('*', gp);  // '*' will calculate GP weight
    }

Change to:

    // Iterate through money, add to carried weight
    if (context.data.money) {
      let gp = Number(context.data.money.gp.value);
      gp += context.data.money.pp.value;
      gp += context.data.money.ep.value;
      gp += context.data.money.sp.value;
      gp += context.data.money.cp.value;
      carriedWeight._addWeight('*', gp);  // '*' will calculate GP weight
    }
DC23 commented 3 weeks ago

I can do this tomorrow as part of the PR I'll submit. It's an easy mistake to make. Coins weigh the same no matter their worth! Also, has _addWeight been adjusted for the new 4th edition reduced coin weights? I guess I'll just check the code.

DC23 commented 3 weeks ago

@orffen: GitHub didn't detect that my commit comment of "resolves #64" on b1df490 meant that commit fixed this issue. I tried to link this issue to the PR again by tagging it in the PR comment, but GitHub didn't make the connection then either. You'll have to just manually close this issue after merging the PR.

I thought that in this AI age, GitHub would realise that 'resolves' means the same as 'fixes', but no, apparently not.