Merge branch 'master' into production

This commit is contained in:
Matt Lott 2014-12-16 21:47:25 -08:00
commit 3c96569e87
4 changed files with 27 additions and 24 deletions

View file

@ -306,7 +306,7 @@ module.exports = LevelOptions =
requiredGear: {} requiredGear: {}
restrictedGear: {} restrictedGear: {}
'the-mighty-sand-yak': 'the-mighty-sand-yak':
requiredGear: {} #requiredGear: {neck: 'rough-sense-stone'} # Too many players probably won't have this, and we don't have a way to require players to buy it yet.
restrictedGear: {} restrictedGear: {}
'oasis': 'oasis':
requiredGear: {} requiredGear: {}
@ -321,7 +321,7 @@ module.exports = LevelOptions =
requiredGear: {} requiredGear: {}
restrictedGear: {} restrictedGear: {}
'medical-attention': 'medical-attention':
requiredGear: {} # sense stone #requiredGear: {neck: 'polished-sense-stone'} # We don't have a way to require players to buy it yet.
restrictedGear: {} restrictedGear: {}
'minesweeper': 'minesweeper':
requiredGear: {} requiredGear: {}

View file

@ -379,11 +379,12 @@ module.exports = class InventoryModal extends ModalView
console.log 'Unequipping restricted item', restrictedGear[slot], 'for', slot, 'before level', @options.levelID console.log 'Unequipping restricted item', restrictedGear[slot], 'for', slot, 'before level', @options.levelID
@unequipItemFromSlot @$el.find(".item-slot[data-slot='#{slot}']") @unequipItemFromSlot @$el.find(".item-slot[data-slot='#{slot}']")
delete equipment[slot] delete equipment[slot]
if (heroClass is 'Warrior' or for slot, item of requiredGear
if (slot in ['right-hand', 'left-hand', 'head', 'torso']) and not (heroClass is 'Warrior' or
(heroClass is 'Ranger' and @options.levelID in ['swift-dagger', 'shrapnel']) or (heroClass is 'Ranger' and @options.levelID in ['swift-dagger', 'shrapnel']) or
(heroClass is 'Wizard' and @options.levelID in ['touch-of-death', 'bonemender'])) (heroClass is 'Wizard' and @options.levelID in ['touch-of-death', 'bonemender']))
# After they switch to a ranger or wizard, we stop being so finicky about gear. # After they switch to a ranger or wizard, we stop being so finicky about class-specific gear.
for slot, item of requiredGear continue
continue if item is 'tarnished-bronze-breastplate' and inWorldMap and @options.levelID is 'the-raised-sword' # Don't tell them they need it until they need it in the level continue if item is 'tarnished-bronze-breastplate' and inWorldMap and @options.levelID is 'the-raised-sword' # Don't tell them they need it until they need it in the level
equipped = equipment[slot] equipped = equipment[slot]
continue if equipped and not ( continue if equipped and not (
@ -626,3 +627,5 @@ gear =
'enchanted-stick': '544d87188494308424f564f1' 'enchanted-stick': '544d87188494308424f564f1'
'unholy-tome-i': '546374bc3839c6e02811d308' 'unholy-tome-i': '546374bc3839c6e02811d308'
'book-of-life-i': '546375653839c6e02811d30b' 'book-of-life-i': '546375653839c6e02811d30b'
'rough-sense-stone': '54693140a2b1f53ce79443bc'
'polished-sense-stone': '53e215a253457600003e3eaf'

View file

@ -10,7 +10,7 @@ class AnalyticsLogEventHandler extends Handler
] ]
hasAccess: (req) -> hasAccess: (req) ->
req.method in ['PUT', 'POST'] or req.user?.isAdmin() req.method in ['POST'] or req.user?.isAdmin()
makeNewInstance: (req) -> makeNewInstance: (req) ->
instance = super(req) instance = super(req)

View file

@ -106,7 +106,7 @@ module.exports = class Handler
# generic handlers # generic handlers
get: (req, res) -> get: (req, res) ->
@sendForbiddenError(res) if not @hasAccess(req) return @sendForbiddenError(res) if not @hasAccess(req)
specialParameters = ['term', 'project', 'conditions'] specialParameters = ['term', 'project', 'conditions']