Skip to content

Commit

Permalink
Merge pull request #4 from EL20202/master
Browse files Browse the repository at this point in the history
added check for custom toggle items
  • Loading branch information
dmitmel authored Aug 31, 2021
2 parents 8b4226b + 2cbb318 commit 149959d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions base-ps.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ sc.PlayerModel.inject({
getItemAmount: function(a) {
var b = window.itemAPI.customItemToId[a];
b && (a = b);
if (!(a < 0)) return this.items[a] || 0
if (!(a < 0)) return this.items[a] || 0
},
getItemAmountWithEquip: function(a) {
var b = window.itemAPI.customItemToId[a];
Expand Down Expand Up @@ -113,5 +113,13 @@ sc.PlayerModel.inject({
var f = window.itemAPI.customItemToId[a];
f && (a = f);
this.parent(a, c, d, e);
}
},

hasAnySetItem(set) {
for (const item of set.items) {
if (this.hasItem(item))
return true;
}
return false;
},
});

0 comments on commit 149959d

Please sign in to comment.