mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-10 06:08:50 +00:00
fix to special gear not showing up properly
This commit is contained in:
parent
7e82e2f5e0
commit
c2ace688b9
2 changed files with 4 additions and 8 deletions
8
dist/habitrpg-shared.js
vendored
8
dist/habitrpg-shared.js
vendored
|
|
@ -10689,12 +10689,8 @@ var process=require("__browserify_process");(function() {
|
|||
}
|
||||
return true;
|
||||
});
|
||||
_.defaults(changes, _.transform(_.where(content.gear.flat, {
|
||||
klass: 'special'
|
||||
}), function(m, v) {
|
||||
if ((typeof v.canOwn === "function" ? v.canOwn(user) : void 0) && !user.items.gear.owned[v.key]) {
|
||||
return m.push(v);
|
||||
}
|
||||
changes = changes.concat(_.filter(content.gear.flat, function(v) {
|
||||
return v.klass === 'special' && !user.items.gear.owned[v.key] && (typeof v.canOwn === "function" ? v.canOwn(user) : void 0);
|
||||
}));
|
||||
changes.push(content.potion);
|
||||
return _.sortBy(changes, function(item) {
|
||||
|
|
|
|||
|
|
@ -117,8 +117,8 @@ api.updateStore = (user) ->
|
|||
changes.push(found) if found
|
||||
true
|
||||
# Add special items (contrib gear, backer gear, etc)
|
||||
_.defaults changes, _.transform _.where(content.gear.flat, {klass:'special'}), (m,v) ->
|
||||
m.push v if v.canOwn?(user) && !user.items.gear.owned[v.key]
|
||||
changes = changes.concat _.filter content.gear.flat, (v) ->
|
||||
v.klass is 'special' and !user.items.gear.owned[v.key] and v.canOwn?(user)
|
||||
changes.push content.potion
|
||||
# Return sorted store (array)
|
||||
_.sortBy changes, (item) ->
|
||||
|
|
|
|||
Loading…
Reference in a new issue