mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 19:50:37 +00:00
feat(premium): add mystery-item handling
This commit is contained in:
parent
cdd59adab9
commit
1a40a52ab5
2 changed files with 2 additions and 2 deletions
|
|
@ -210,7 +210,7 @@ api.gear =
|
|||
flat: {}
|
||||
|
||||
_.each gearTypes, (type) ->
|
||||
_.each classes.concat(['base', 'special']), (klass) ->
|
||||
_.each classes.concat(['base', 'special', 'mystery']), (klass) ->
|
||||
# add "type" to each item, so we can reference that as "weapon" or "armor" in the html
|
||||
_.each gear[type][klass], (item, i) ->
|
||||
key = "#{type}_#{klass}_#{i}"
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ api.updateStore = (user) ->
|
|||
true
|
||||
# Add special items (contrib gear, backer gear, etc)
|
||||
changes = changes.concat _.filter content.gear.flat, (v) ->
|
||||
v.klass is 'special' and !user.items.gear.owned[v.key] and v.canOwn?(user)
|
||||
v.klass in ['special','mystery'] 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