feat(premium): add mystery-item handling
This commit is contained in:
@@ -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}"
|
||||
|
||||
+1
-1
@@ -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) ->
|
||||
|
||||
Reference in New Issue
Block a user