mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-13 22:49:51 -04:00
Handling some missing comment template errors better. Fixed equipping builder's hammer before Kithgard Gates. Fixed next level branch button linking.
This commit is contained in:
parent
83bd8d3834
commit
2e3afa989b
4 changed files with 12 additions and 4 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'
|
||||
|
|
|
@ -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