Skip to content

Commit

Permalink
Bug fixes affecting non-GM 0.8.6 players
Browse files Browse the repository at this point in the history
  • Loading branch information
lupestro committed Jun 6, 2021
1 parent 3a18f2a commit 74f00b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions torch.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ class Torch {
if (torches === null) {
var itemToCheck = game.settings.get("torch", "gmInventoryItemName");
if (item.name.toLowerCase() === itemToCheck.toLowerCase()) {
if (item.data.quantity > 0) {
let quantity = typeof item.data.quantity !== "undefined" ? item.data.quantity : item.data.data.quantity;
if (quantity > 0) {
torches = itemToCheck;
return;
}
Expand Down Expand Up @@ -162,8 +163,8 @@ class Torch {

// Don't let Dancing Lights have/use torches. :D
if (data.name === 'Dancing Light' &&
data.dimLight === 20 &&
data.brightLight === 10) {
data.dimLight === 10 &&
data.brightLight === 0) {
return;
}

Expand Down
Binary file modified torch.zip
Binary file not shown.

0 comments on commit 74f00b3

Please sign in to comment.