Merge branch 'master' into production
This commit is contained in:
commit
3ffcb92ed0
5 changed files with 50 additions and 48 deletions
app
lib
models
templates/play
views/game-menu
|
@ -205,51 +205,52 @@ module.exports = LevelOptions =
|
||||||
requiredGear: {feet: 'leather-boots', 'right-hand': 'crude-builders-hammer'}
|
requiredGear: {feet: 'leather-boots', 'right-hand': 'crude-builders-hammer'}
|
||||||
restrictedGear: {feet: 'simple-boots', 'right-hand': 'simple-sword'}
|
restrictedGear: {feet: 'simple-boots', 'right-hand': 'simple-sword'}
|
||||||
'endangered-burl':
|
'endangered-burl':
|
||||||
requiredGear: {feet: 'leather-boots', 'right-hand': 'simple-sword', eyes: 'crude-glasses'}
|
hidesRealTimePlayback: true
|
||||||
hidesCodeToolbar: true
|
hidesCodeToolbar: true
|
||||||
|
requiredGear: {feet: 'leather-boots', 'right-hand': 'simple-sword', 'programming-book': 'programmaticon-ii', eyes: 'crude-glasses'}
|
||||||
restrictedGear: {feet: 'simple-boots', 'right-hand': 'crude-builders-hammer'}
|
restrictedGear: {feet: 'simple-boots', 'right-hand': 'crude-builders-hammer'}
|
||||||
'village-guard':
|
'village-guard':
|
||||||
requiredGear: {feet: 'leather-boots', 'right-hand': 'simple-sword', eyes: 'crude-glasses'}
|
|
||||||
hidesCodeToolbar: true
|
hidesCodeToolbar: true
|
||||||
|
requiredGear: {feet: 'leather-boots', 'right-hand': 'simple-sword', 'programming-book': 'programmaticon-ii', eyes: 'crude-glasses'}
|
||||||
restrictedGear: {feet: 'simple-boots', 'right-hand': 'crude-builders-hammer'}
|
restrictedGear: {feet: 'simple-boots', 'right-hand': 'crude-builders-hammer'}
|
||||||
'thornbush-farm':
|
'thornbush-farm':
|
||||||
requiredGear: {feet: 'leather-boots', 'right-hand': 'crude-builders-hammer', eyes: 'crude-glasses'}
|
|
||||||
hidesCodeToolbar: true
|
hidesCodeToolbar: true
|
||||||
|
requiredGear: {feet: 'leather-boots', 'right-hand': 'crude-builders-hammer', 'programming-book': 'programmaticon-ii', eyes: 'crude-glasses'}
|
||||||
restrictedGear: {feet: 'simple-boots', 'right-hand': 'simple-sword'}
|
restrictedGear: {feet: 'simple-boots', 'right-hand': 'simple-sword'}
|
||||||
'back-to-back':
|
'back-to-back':
|
||||||
hidesCodeToolbar: true
|
hidesCodeToolbar: true
|
||||||
requiredGear: {feet: 'leather-boots', torso: 'leather-tunic', waist: 'leather-belt', 'programming-book': 'programmaticon-i', eyes: 'crude-glasses', 'right-hand': 'simple-sword', 'left-hand': 'wooden-shield'}
|
requiredGear: {feet: 'leather-boots', torso: 'leather-tunic', waist: 'leather-belt', 'programming-book': 'programmaticon-ii', eyes: 'crude-glasses', 'right-hand': 'simple-sword', 'left-hand': 'wooden-shield'}
|
||||||
restrictedGear: {feet: 'simple-boots', 'right-hand': 'crude-builders-hammer'}
|
restrictedGear: {feet: 'simple-boots', 'right-hand': 'crude-builders-hammer'}
|
||||||
'ogre-encampment':
|
'ogre-encampment':
|
||||||
requiredGear: {torso: 'leather-tunic', waist: 'leather-belt', 'programming-book': 'programmaticon-i', eyes: 'crude-glasses', 'right-hand': 'simple-sword', 'left-hand': 'wooden-shield'}
|
requiredGear: {torso: 'leather-tunic', waist: 'leather-belt', 'programming-book': 'programmaticon-ii', eyes: 'crude-glasses', 'right-hand': 'simple-sword', 'left-hand': 'wooden-shield'}
|
||||||
restrictedGear: {feet: 'simple-boots', 'right-hand': 'crude-builders-hammer'}
|
restrictedGear: {feet: 'simple-boots', 'right-hand': 'crude-builders-hammer'}
|
||||||
'woodland-cleaver':
|
'woodland-cleaver':
|
||||||
requiredGear: {torso: 'leather-tunic', waist: 'leather-belt', 'programming-book': 'programmaticon-i', eyes: 'crude-glasses', 'right-hand': 'long-sword', 'left-hand': 'wooden-shield', wrists: 'sundial-wristwatch', feet: 'leather-boots'}
|
requiredGear: {torso: 'leather-tunic', waist: 'leather-belt', 'programming-book': 'programmaticon-ii', eyes: 'crude-glasses', 'right-hand': 'long-sword', 'left-hand': 'wooden-shield', wrists: 'sundial-wristwatch', feet: 'leather-boots'}
|
||||||
restrictedGear: {feet: 'simple-boots', 'right-hand': 'simple-sword'}
|
restrictedGear: {feet: 'simple-boots', 'right-hand': 'simple-sword'}
|
||||||
'shield-rush':
|
'shield-rush':
|
||||||
requiredGear: {torso: 'leather-tunic', waist: 'leather-belt', 'programming-book': 'programmaticon-i', eyes: 'crude-glasses', 'right-hand': 'long-sword', 'left-hand': 'bronze-shield', wrists: 'sundial-wristwatch'}
|
requiredGear: {torso: 'leather-tunic', waist: 'leather-belt', 'programming-book': 'programmaticon-ii', eyes: 'crude-glasses', 'right-hand': 'long-sword', 'left-hand': 'bronze-shield', wrists: 'sundial-wristwatch'}
|
||||||
restrictedGear: {'left-hand': 'wooden-shield'}
|
restrictedGear: {'left-hand': 'wooden-shield'}
|
||||||
'peasant-protection':
|
'peasant-protection':
|
||||||
requiredGear: {torso: 'leather-tunic', waist: 'leather-belt', 'programming-book': 'programmaticon-i', eyes: 'wooden-glasses', 'right-hand': 'long-sword', 'left-hand': 'bronze-shield', wrists: 'sundial-wristwatch'}
|
requiredGear: {torso: 'leather-tunic', waist: 'leather-belt', 'programming-book': 'programmaticon-ii', eyes: 'wooden-glasses', 'right-hand': 'long-sword', 'left-hand': 'bronze-shield', wrists: 'sundial-wristwatch'}
|
||||||
restrictedGear: {eyes: 'crude-glasses'}
|
restrictedGear: {eyes: 'crude-glasses'}
|
||||||
'munchkin-swarm':
|
'munchkin-swarm':
|
||||||
requiredGear: {torso: 'leather-tunic', waist: 'leather-belt', 'programming-book': 'programmaticon-i', eyes: 'wooden-glasses', 'right-hand': 'long-sword', 'left-hand': 'bronze-shield', wrists: 'sundial-wristwatch'}
|
requiredGear: {torso: 'leather-tunic', waist: 'leather-belt', 'programming-book': 'programmaticon-ii', eyes: 'wooden-glasses', 'right-hand': 'long-sword', 'left-hand': 'bronze-shield', wrists: 'sundial-wristwatch'}
|
||||||
restrictedGear: {}
|
restrictedGear: {}
|
||||||
'coinucopia':
|
'coinucopia':
|
||||||
requiredGear: {'programming-book': 'programmaticon-i', feet: 'leather-boots', flag: 'basic-flags'}
|
requiredGear: {'programming-book': 'programmaticon-i', feet: 'leather-boots', 'programming-book': 'programmaticon-ii', flag: 'basic-flags'}
|
||||||
restrictedGear: {}
|
restrictedGear: {}
|
||||||
'copper-meadows':
|
'copper-meadows':
|
||||||
requiredGear: {'programming-book': 'programmaticon-i', feet: 'leather-boots', flag: 'basic-flags', eyes: 'wooden-glasses'}
|
requiredGear: {'programming-book': 'programmaticon-i', feet: 'leather-boots', 'programming-book': 'programmaticon-ii', flag: 'basic-flags', eyes: 'wooden-glasses'}
|
||||||
restrictedGear: {}
|
restrictedGear: {}
|
||||||
'drop-the-flag':
|
'drop-the-flag':
|
||||||
requiredGear: {'programming-book': 'programmaticon-i', feet: 'leather-boots', flag: 'basic-flags', eyes: 'wooden-glasses', 'right-hand': 'crude-builders-hammer'}
|
requiredGear: {'programming-book': 'programmaticon-i', feet: 'leather-boots', 'programming-book': 'programmaticon-ii', flag: 'basic-flags', eyes: 'wooden-glasses', 'right-hand': 'crude-builders-hammer'}
|
||||||
restrictedGear: {'right-hand': 'long-sword'}
|
restrictedGear: {'right-hand': 'long-sword'}
|
||||||
'deadly-pursuit':
|
'deadly-pursuit':
|
||||||
requiredGear: {'programming-book': 'programmaticon-i', feet: 'leather-boots', flag: 'basic-flags', eyes: 'wooden-glasses', 'right-hand': 'crude-builders-hammer'}
|
requiredGear: {'programming-book': 'programmaticon-i', feet: 'leather-boots', 'programming-book': 'programmaticon-ii', flag: 'basic-flags', eyes: 'wooden-glasses', 'right-hand': 'crude-builders-hammer'}
|
||||||
restrictedGear: {'right-hand': 'long-sword'}
|
restrictedGear: {'right-hand': 'long-sword'}
|
||||||
'rich-forager':
|
'rich-forager':
|
||||||
requiredGear: {'programming-book': 'programmaticon-i', feet: 'leather-boots', flag: 'basic-flags', eyes: 'wooden-glasses', torso: 'leather-tunic', 'right-hand': 'long-sword', 'left-hand': 'bronze-shield'}
|
requiredGear: {'programming-book': 'programmaticon-i', feet: 'leather-boots', 'programming-book': 'programmaticon-ii', flag: 'basic-flags', eyes: 'wooden-glasses', torso: 'leather-tunic', 'right-hand': 'long-sword', 'left-hand': 'bronze-shield'}
|
||||||
restrictedGear: {'right-hand': 'crude-builders-hammer'}
|
restrictedGear: {'right-hand': 'crude-builders-hammer'}
|
||||||
'multiplayer-treasure-grove':
|
'multiplayer-treasure-grove':
|
||||||
requiredGear: {'programming-book': 'programmaticon-i', feet: 'leather-boots', flag: 'basic-flags', eyes: 'wooden-glasses', torso: 'leather-tunic'}
|
requiredGear: {'programming-book': 'programmaticon-i', feet: 'leather-boots', 'programming-book': 'programmaticon-ii', flag: 'basic-flags', eyes: 'wooden-glasses', torso: 'leather-tunic'}
|
||||||
restrictedGear: {}
|
restrictedGear: {}
|
||||||
|
|
|
@ -43,7 +43,7 @@ module.exports = class Mark extends CocoClass
|
||||||
@layer.updateLayerOrder()
|
@layer.updateLayerOrder()
|
||||||
# @updatePosition()
|
# @updatePosition()
|
||||||
@update()
|
@update()
|
||||||
|
|
||||||
toggle: (to) ->
|
toggle: (to) ->
|
||||||
to = !!to
|
to = !!to
|
||||||
return @ if to is @on
|
return @ if to is @on
|
||||||
|
@ -154,7 +154,7 @@ module.exports = class Mark extends CocoClass
|
||||||
shape.graphics.drawRect bounds...
|
shape.graphics.drawRect bounds...
|
||||||
shape.graphics.endFill()
|
shape.graphics.endFill()
|
||||||
@layer.addCustomGraphic(key, shape, bounds)
|
@layer.addCustomGraphic(key, shape, bounds)
|
||||||
alpha = @lank.thang?.alpha ? 1
|
alpha = @lank.thang?.alpha ? 1
|
||||||
width = (@lank.thang?.width ? 0) + 0.5
|
width = (@lank.thang?.width ? 0) + 0.5
|
||||||
height = (@lank.thang?.height ? 0) + 0.5
|
height = (@lank.thang?.height ? 0) + 0.5
|
||||||
longest = Math.max width, height
|
longest = Math.max width, height
|
||||||
|
@ -250,7 +250,7 @@ module.exports = class Mark extends CocoClass
|
||||||
@sprite = markLank.sprite
|
@sprite = markLank.sprite
|
||||||
@markLank = markLank
|
@markLank = markLank
|
||||||
@listenTo @markLank, 'new-sprite', (@sprite) ->
|
@listenTo @markLank, 'new-sprite', (@sprite) ->
|
||||||
|
|
||||||
loadThangType: ->
|
loadThangType: ->
|
||||||
name = @thangType
|
name = @thangType
|
||||||
@thangType = new ThangType()
|
@thangType = new ThangType()
|
||||||
|
@ -275,6 +275,7 @@ module.exports = class Mark extends CocoClass
|
||||||
if @name is 'highlight' and @highlightDelay and not @highlightTween
|
if @name is 'highlight' and @highlightDelay and not @highlightTween
|
||||||
@sprite.visible = false
|
@sprite.visible = false
|
||||||
@highlightTween = createjs.Tween.get(@sprite).to({}, @highlightDelay).call =>
|
@highlightTween = createjs.Tween.get(@sprite).to({}, @highlightDelay).call =>
|
||||||
|
return if @destroyed
|
||||||
@sprite.visible = true
|
@sprite.visible = true
|
||||||
@highlightDelay = @highlightTween = null
|
@highlightDelay = @highlightTween = null
|
||||||
@updateAlpha @alpha if @name in ['shadow', 'bounds']
|
@updateAlpha @alpha if @name in ['shadow', 'bounds']
|
||||||
|
|
|
@ -104,7 +104,8 @@ module.exports = class User extends CocoModel
|
||||||
when 2 then 'choice-explicit'
|
when 2 then 'choice-explicit'
|
||||||
when 3 then 'choice-implicit'
|
when 3 then 'choice-implicit'
|
||||||
@branchingGroup = 'choice-explicit' if me.isAdmin()
|
@branchingGroup = 'choice-explicit' if me.isAdmin()
|
||||||
application.tracker.identify branchingGroup: @branchingGroup unless me.isAdmin()
|
@branchingGroup = 'no-practice' # paused A/B test
|
||||||
|
#application.tracker.identify branchingGroup: @branchingGroup unless me.isAdmin() # paused A/B test
|
||||||
@branchingGroup
|
@branchingGroup
|
||||||
|
|
||||||
getCastButtonTextGroup: ->
|
getCastButtonTextGroup: ->
|
||||||
|
|
|
@ -7,34 +7,33 @@
|
||||||
|
|
||||||
- var seenNext = nextLevel;
|
- var seenNext = nextLevel;
|
||||||
each level in campaign.levels
|
each level in campaign.levels
|
||||||
if level.hidden
|
if !level.hidden
|
||||||
continue;
|
- var next = level.id == nextLevel || (!seenNext && levelStatusMap[level.id] != "complete" && !level.locked && !level.disabled && (!level.practice || me.getBranchingGroup() == 'all-practice'));
|
||||||
- var next = level.id == nextLevel || (!seenNext && levelStatusMap[level.id] != "complete" && !level.locked && !level.disabled && (!level.practice || me.getBranchingGroup() == 'all-practice'));
|
- seenNext = seenNext || next;
|
||||||
- seenNext = seenNext || next;
|
div(style="left: #{level.x}%; bottom: #{level.y}%; background-color: #{level.color}", class="level" + (next ? " next" : "") + (level.disabled ? " disabled" : "") + (level.locked ? " locked" : "") + " " + levelStatusMap[level.id] || "", data-level-id=level.id, title=level.name)
|
||||||
div(style="left: #{level.x}%; bottom: #{level.y}%; background-color: #{level.color}", class="level" + (next ? " next" : "") + (level.disabled ? " disabled" : "") + (level.locked ? " locked" : "") + " " + levelStatusMap[level.id] || "", data-level-id=level.id, title=level.name)
|
a(href=level.type == 'hero' ? '#' : level.disabled ? "/play" : "/play/#{level.levelPath || 'level'}/#{level.id}", disabled=level.disabled, data-level-id=level.id, data-level-path=level.levelPath || 'level', data-level-name=level.name)
|
||||||
a(href=level.type == 'hero' ? '#' : level.disabled ? "/play" : "/play/#{level.levelPath || 'level'}/#{level.id}", disabled=level.disabled, data-level-id=level.id, data-level-path=level.levelPath || 'level', data-level-name=level.name)
|
div(style="left: #{level.x}%; bottom: #{level.y}%", class="level-shadow" + (next ? " next" : "") + " " + levelStatusMap[level.id] || "")
|
||||||
div(style="left: #{level.x}%; bottom: #{level.y}%", class="level-shadow" + (next ? " next" : "") + " " + levelStatusMap[level.id] || "")
|
.level-info-container(data-level-id=level.id, data-level-path=level.levelPath || 'level', data-level-name=level.name)
|
||||||
.level-info-container(data-level-id=level.id, data-level-path=level.levelPath || 'level', data-level-name=level.name)
|
div(class="level-info " + (levelStatusMap[level.id] || ""))
|
||||||
div(class="level-info " + (levelStatusMap[level.id] || ""))
|
h3= level.name + (level.disabled ? " (Coming soon!)" : (level.locked ? " (Locked)" : ""))
|
||||||
h3= level.name + (level.disabled ? " (Coming soon!)" : (level.locked ? " (Locked)" : ""))
|
.level-description= level.description
|
||||||
.level-description= level.description
|
if level.disabled
|
||||||
if level.disabled
|
p
|
||||||
p
|
span.spr(data-i18n="play.awaiting_levels_adventurer_prefix") We release five levels per week.
|
||||||
span.spr(data-i18n="play.awaiting_levels_adventurer_prefix") We release five levels per week.
|
a.spr(href="/contribute/adventurer")
|
||||||
a.spr(href="/contribute/adventurer")
|
strong(data-i18n="play.awaiting_levels_adventurer") Sign up as an Adventurer
|
||||||
strong(data-i18n="play.awaiting_levels_adventurer") Sign up as an Adventurer
|
span.spl(data-i18n="play.awaiting_levels_adventurer_suffix") to be the first to play new levels.
|
||||||
span.spl(data-i18n="play.awaiting_levels_adventurer_suffix") to be the first to play new levels.
|
|
||||||
|
- var playCount = levelPlayCountMap[level.id]
|
||||||
- var playCount = levelPlayCountMap[level.id]
|
if playCount && playCount.sessions > 20
|
||||||
if playCount && playCount.sessions > 20
|
div
|
||||||
div
|
span.spr #{playCount.sessions}
|
||||||
span.spr #{playCount.sessions}
|
span(data-i18n="play.players") players
|
||||||
span(data-i18n="play.players") players
|
span.spr , #{Math.round(playCount.playtime / 3600)}
|
||||||
span.spr , #{Math.round(playCount.playtime / 3600)}
|
span(data-i18n="play.hours_played") hours played
|
||||||
span(data-i18n="play.hours_played") hours played
|
.campaign-label(style="color: #{campaign.color}")= campaign.name
|
||||||
.campaign-label(style="color: #{campaign.color}")= campaign.name
|
if isIPadApp && !level.disabled && !level.locked
|
||||||
if isIPadApp && !level.disabled && !level.locked
|
button.btn.btn-success.btn-lg.start-level(data-i18n="common.play") Play
|
||||||
button.btn.btn-success.btn-lg.start-level(data-i18n="common.play") Play
|
|
||||||
if mapType === 'dungeon' && forestIsAvailable
|
if mapType === 'dungeon' && forestIsAvailable
|
||||||
a#forest-link.glyphicon.glyphicon-share-alt.campaign-switch(href="/play/forest", data-i18n="[title]play.campaign_forest")
|
a#forest-link.glyphicon.glyphicon-share-alt.campaign-switch(href="/play/forest", data-i18n="[title]play.campaign_forest")
|
||||||
if mapType === 'forest'
|
if mapType === 'forest'
|
||||||
|
|
|
@ -84,7 +84,7 @@ module.exports = class InventoryModal extends ModalView
|
||||||
|
|
||||||
# sort into one of the four groups
|
# sort into one of the four groups
|
||||||
locked = not (item.get('original') in me.items())
|
locked = not (item.get('original') in me.items())
|
||||||
#locked = false if me.get('slug') is 'nick'
|
locked = false if me.get('slug') is 'nick'
|
||||||
|
|
||||||
if not item.getFrontFacingStats().props.length and not _.size(item.getFrontFacingStats().stats) and not locked # Temp: while there are placeholder items
|
if not item.getFrontFacingStats().props.length and not _.size(item.getFrontFacingStats().stats) and not locked # Temp: while there are placeholder items
|
||||||
null # Don't put into a collection
|
null # Don't put into a collection
|
||||||
|
|
Reference in a new issue