Skip to content

Commit

Permalink
filter out undroppable loot
Browse files Browse the repository at this point in the history
  • Loading branch information
twobiers committed Nov 1, 2024
1 parent 84da696 commit 5a2fb88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/loot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class LootCommand implements ApplicationCommand {
}

// TODO: Lowperformer solution. A diagram with graphviz or something would be cooler
const loot = lootDataService.lootTemplates;
const loot = lootDataService.lootTemplates.filter(l => l.weight > 0);
const totalWeight = loot.reduce((acc, curr) => acc + curr.weight, 0);
const lootWithProbabilitiy = loot
.map(l => ({
Expand Down

0 comments on commit 5a2fb88

Please sign in to comment.