mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-20 18:10:44 -04:00
Some improvements for exhortation of tunic donning in The Raised Sword.
This commit is contained in:
parent
37ac9f1a69
commit
a0ad5efba2
4 changed files with 8 additions and 4 deletions
app
lib
schemas/subscriptions
views
|
@ -47,3 +47,4 @@ functionParameters =
|
|||
chooseAction: []
|
||||
plan: []
|
||||
initializeCentroids: []
|
||||
update: []
|
||||
|
|
|
@ -28,3 +28,5 @@ module.exports =
|
|||
'world:attacked-when-out-of-range': c.object {required: ['thang']},
|
||||
replacedNoteChain: {type: 'array'}
|
||||
thang: {type: 'object'}
|
||||
|
||||
'world:custom-script-trigger': {type: 'object'}
|
||||
|
|
|
@ -345,8 +345,9 @@ module.exports = class InventoryView extends CocoView
|
|||
hadRequired = @remainingRequiredEquipment?.length
|
||||
@remainingRequiredEquipment = []
|
||||
@$el.find('.should-equip').removeClass('should-equip')
|
||||
inWorldMap = $('#world-map-view').length
|
||||
for slot, item of necessaryGear
|
||||
continue if item is 'leather-tunic' and $('#world-map-view') # Don't tell them they need it until they need it in the level
|
||||
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)
|
||||
availableSlotSelector = "#available-equipment li[data-item-id='#{gear[item]}']"
|
||||
@highlightElement availableSlotSelector, delay: 500, sides: ['right'], rotation: Math.PI / 2
|
||||
|
@ -355,7 +356,7 @@ module.exports = class InventoryView extends CocoView
|
|||
@remainingRequiredEquipment.push slot: slot, item: gear[item]
|
||||
if hadRequired and not @remainingRequiredEquipment.length
|
||||
@endHighlight()
|
||||
@highlightElement '#play-level-button', duration: 5000
|
||||
@highlightElement (if inWorldMap then '#play-level-button' else '.overlaid-close-button'), duration: 5000
|
||||
$('#play-level-button').prop('disabled', @remainingRequiredEquipment.length > 0)
|
||||
|
||||
# Restrict available items to those that would be available by this item.
|
||||
|
|
|
@ -430,7 +430,7 @@ module.exports = class PlayLevelView extends RootView
|
|||
viewArgs: [{supermodel: @supermodel, autoUnveil: true}, @levelID]
|
||||
}
|
||||
|
||||
onWindowResize: (e) -> @endHighlight?()
|
||||
onWindowResize: (e) => @endHighlight()
|
||||
|
||||
onDisableControls: (e) ->
|
||||
return if e.controls and not ('level' in e.controls)
|
||||
|
@ -500,7 +500,7 @@ module.exports = class PlayLevelView extends RootView
|
|||
|
||||
onHighlightDOM: (e) -> @highlightElement e.selector, delay: e.delay, sides: e.sides, offset: e.offset, rotation: e.rotation
|
||||
|
||||
onEndHighlight: -> @endHighlight?()
|
||||
onEndHighlight: -> @endHighlight()
|
||||
|
||||
onFocusDom: (e) -> $(e.selector).focus()
|
||||
|
||||
|
|
Loading…
Reference in a new issue