mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-05-03 01:14:46 -04:00
Fixed #2140.
This commit is contained in:
parent
26ac0c8947
commit
936ebf67a7
2 changed files with 9 additions and 1 deletions
app
|
@ -1,7 +1,7 @@
|
||||||
{me} = require 'core/auth'
|
{me} = require 'core/auth'
|
||||||
SuperModel = require 'models/SuperModel'
|
SuperModel = require 'models/SuperModel'
|
||||||
|
|
||||||
debugAnalytics = false
|
debugAnalytics = true
|
||||||
|
|
||||||
module.exports = class Tracker
|
module.exports = class Tracker
|
||||||
constructor: ->
|
constructor: ->
|
||||||
|
|
|
@ -109,6 +109,14 @@ module.exports = class InventoryModal extends ModalView
|
||||||
requiredToPurchase = true
|
requiredToPurchase = true
|
||||||
break
|
break
|
||||||
|
|
||||||
|
if requiredToPurchase and locked and not item.get('gems')
|
||||||
|
# Either one of two things has happened:
|
||||||
|
# 1. There's a bug and the player doesn't have a required item they should have.
|
||||||
|
# 2. The player is trying to play a level they haven't unlocked.
|
||||||
|
# We'll just pretend they own it so that they don't get stuck.
|
||||||
|
application.tracker?.trackEvent 'Required Item Locked', level: @options.level.get('slug'), label: @options.level.get('slug'), item: item.get('name'), playerLevel: me.level(), levelUnlocked: me.ownsLevel @options.level.get('original')
|
||||||
|
locked = false
|
||||||
|
|
||||||
placeholder = not item.getFrontFacingStats().props.length and not _.size(item.getFrontFacingStats().stats)
|
placeholder = not item.getFrontFacingStats().props.length and not _.size(item.getFrontFacingStats().stats)
|
||||||
|
|
||||||
if placeholder and locked # The item is not complete, so don't put it into a collection.
|
if placeholder and locked # The item is not complete, so don't put it into a collection.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue