mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 18:15:52 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
cb1eca5baa
5 changed files with 16 additions and 9 deletions
|
@ -363,7 +363,7 @@ module.exports = class InventoryView extends CocoView
|
|||
inWorldMap = $('#world-map-view').length
|
||||
for slot, item of necessaryGear
|
||||
continue if item is 'leather-tunic' and inWorldMap # Don't tell them they need it until they need it in the level
|
||||
continue if equipment[slot] and not (item is 'builders-hammer' and @equipment[slot] is gear.longsword)
|
||||
continue if equipment[slot] and not (item is 'builders-hammer' and equipment[slot] is gear.longsword)
|
||||
availableSlotSelector = "#available-equipment li[data-item-id='#{gear[item]}']"
|
||||
@highlightElement availableSlotSelector, delay: 500, sides: ['right'], rotation: Math.PI / 2
|
||||
@$el.find(availableSlotSelector).addClass 'should-equip'
|
||||
|
|
|
@ -620,23 +620,22 @@ dungeon = [
|
|||
x: 32
|
||||
y: 15.5
|
||||
nextLevels:
|
||||
more_practice: 'gem-grabber'
|
||||
more_practice: 'forgetful-gemsmith'
|
||||
continue: 'shadow-guard'
|
||||
skip_ahead: 'true-names'
|
||||
}
|
||||
{
|
||||
name: 'Gem Grabber'
|
||||
name: 'Forgetful Gemsmith'
|
||||
type: 'hero'
|
||||
difficulty: 1
|
||||
id: 'gem-grabber'
|
||||
original: '54174347844506ae0195a0b8'
|
||||
id: 'forgetful-gemsmith'
|
||||
original: '544a98f62d002f0000fe331a'
|
||||
description: 'Grab even more gems as you practice moving.'
|
||||
x: 35.49
|
||||
y: 24.61
|
||||
nextLevels:
|
||||
continue: 'shadow-guard'
|
||||
practice: true
|
||||
disabled: true
|
||||
}
|
||||
{
|
||||
name: 'Shadow Guard'
|
||||
|
|
|
@ -300,4 +300,5 @@ module.exports = class HeroVictoryModal extends ModalView
|
|||
e.preventDefault()
|
||||
application.tracker?.trackEvent 'Branch Selected', level: @level.get('slug'), label: @level.get('slug'), branch: $(e.target).data('branch-key'), branchingGroup: me.getBranchingGroup()
|
||||
# Preserve the supermodel as we navigate back to world map.
|
||||
Backbone.Mediator.publish 'router:navigate', route: $(e.target).attr('href'), viewClass: require('views/play/WorldMapView'), viewArgs: [{supermodel: @supermodel}, @getNextLevelMap()]
|
||||
route = $(e.target).attr('href') or "/play/#{@getNextLevelMap()}"
|
||||
Backbone.Mediator.publish 'router:navigate', route: route, viewClass: require('views/play/WorldMapView'), viewArgs: [{supermodel: @supermodel}, @getNextLevelMap()]
|
||||
|
|
|
@ -108,7 +108,11 @@ module.exports = class DocFormatter
|
|||
context = _.merge context, spokenLanguageContext
|
||||
break
|
||||
fallingBack = true
|
||||
obj[prop] = _.template val, context if context
|
||||
if context
|
||||
try
|
||||
obj[prop] = _.template val, context
|
||||
catch e
|
||||
console.error "Couldn't create docs template of", val, "\nwith context", context, "\nError:", e
|
||||
|
||||
formatPopover: ->
|
||||
content = popoverTemplate doc: @doc, language: @options.language, value: @formatValue(), marked: marked, argumentExamples: (arg.example or arg.default or arg.name for arg in @doc.args ? []), writable: @options.writable, selectedMethod: @options.selectedMethod, cooldowns: @inferCooldowns(), item: @options.item
|
||||
|
|
|
@ -74,7 +74,10 @@ module.exports = class Spell
|
|||
context = _.merge context, spokenLanguageContext
|
||||
break
|
||||
fallingBack = true
|
||||
@originalSource = _.template @originalSource, context
|
||||
try
|
||||
@originalSource = _.template @originalSource, context
|
||||
catch e
|
||||
console.error "Couldn't create example code template of", @originalSource, "\nwith context", context, "\nError:", e
|
||||
|
||||
addThang: (thang) ->
|
||||
if @thangs[thang.id]
|
||||
|
|
Loading…
Reference in a new issue