From 023a0e9ca8435f3bf7c0273973001370e89da48b Mon Sep 17 00:00:00 2001 From: Kenny Parkinson Date: Sat, 20 Aug 2016 09:17:21 -0600 Subject: [PATCH 1/4] Added 'Anya' as a female pixie. --- app/lib/world/names.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/app/lib/world/names.coffee b/app/lib/world/names.coffee index 8045f4e2b..d10dff0b1 100644 --- a/app/lib/world/names.coffee +++ b/app/lib/world/names.coffee @@ -372,6 +372,7 @@ module.exports.thangNames = thangNames = # Female 'Zana' 'Eika' + 'Anya' ] 'Assassin': [ # Male From c1e9730499399c678b5e3100c8f1f67a73e6f209 Mon Sep 17 00:00:00 2001 From: Kenny Parkinson Date: Sat, 20 Aug 2016 09:39:05 -0600 Subject: [PATCH 2/4] added klondike as name for Polar Bear Pet #53 --- app/lib/world/names.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/world/names.coffee b/app/lib/world/names.coffee index d10dff0b1..579454295 100644 --- a/app/lib/world/names.coffee +++ b/app/lib/world/names.coffee @@ -155,7 +155,7 @@ module.exports.thangNames = thangNames = 'Frog Pet': ['Hypnotoad'] 'Griffin Pet': [''] 'Pugicorn Pet': [''] - 'Polar Bear Pet': [''] + 'Polar Bear Pet': ['Klondike'] 'Wolf Pet': [''] 'Horse': [ # Animal From 2642dc896f23a7e24fa009b0a2b7039ff7d0d616 Mon Sep 17 00:00:00 2001 From: Kenny Parkinson Date: Mon, 22 Aug 2016 19:14:55 -0600 Subject: [PATCH 3/4] Removed duplicate Anya --- app/lib/world/names.coffee | 1 - 1 file changed, 1 deletion(-) diff --git a/app/lib/world/names.coffee b/app/lib/world/names.coffee index 579454295..7827e87af 100644 --- a/app/lib/world/names.coffee +++ b/app/lib/world/names.coffee @@ -372,7 +372,6 @@ module.exports.thangNames = thangNames = # Female 'Zana' 'Eika' - 'Anya' ] 'Assassin': [ # Male From c2ae4d3748a58d083b19d019d3f4494ca8c914aa Mon Sep 17 00:00:00 2001 From: Matt Lott Date: Mon, 22 Aug 2016 14:05:59 -0700 Subject: [PATCH 4/4] Add gd2 and wd2 to individual game Closes #3875 --- app/styles/play/campaign-view.sass | 6 +++++- app/templates/play/campaign-view.jade | 9 ++++----- app/views/play/CampaignView.coffee | 11 ++++++++--- app/views/play/level/modal/HeroVictoryModal.coffee | 3 +++ 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/app/styles/play/campaign-view.sass b/app/styles/play/campaign-view.sass index 255964839..5ac08ef78 100644 --- a/app/styles/play/campaign-view.sass +++ b/app/styles/play/campaign-view.sass @@ -524,7 +524,7 @@ $gameControlMargin: 30px $campaignWidth: 317px $campaignHeight: 634px $campaignHoverScale: 1.2 - width: 6 * $campaignWidth + width: 8 * $campaignWidth height: $campaignHeight * $campaignHoverScale flex-wrap: nowrap display: flex @@ -663,6 +663,10 @@ $gameControlMargin: 30px background-position: -151px 0px &.campaign-game-dev-1 background-position: -454px 0px + &.campaign-web-dev-2 + background-position: -291px 0px + &.campaign-game-dev-2 + background-position: -628px 0px .small-nav-logo, .picoctf-powered-by diff --git a/app/templates/play/campaign-view.jade b/app/templates/play/campaign-view.jade index 409ff8e62..22ee2e483 100644 --- a/app/templates/play/campaign-view.jade +++ b/app/templates/play/campaign-view.jade @@ -100,9 +100,10 @@ if view.showAds() else .portal .portals - for campaignSlug in ['dungeon', 'beta-campaigns', 'forest', 'desert', 'mountain', 'glacier', 'volcano'] - if campaignSlug === 'beta-campaigns' - - var betaSlugs = _.shuffle(['campaign-game-dev-1', 'campaign-web-dev-1']); + //- TODO: you must change CampaignView portalsWidth when adding/removing campaigns here + for campaignSlug in ['dungeon', 'beta-campaigns-1', 'forest', 'beta-campaigns-2', 'desert', 'mountain', 'glacier', 'volcano'] + if campaignSlug === 'beta-campaigns-1' || campaignSlug === 'beta-campaigns-2' + - var betaSlugs = campaignSlug === 'beta-campaigns-1' ? _.shuffle(['campaign-game-dev-1', 'campaign-web-dev-1']) : _.shuffle(['campaign-game-dev-2', 'campaign-web-dev-2']); .beta-container each campaignSlug in betaSlugs - var campaign = campaigns[campaignSlug]; @@ -129,8 +130,6 @@ if view.showAds() span= i18n(campaign.attributes, 'description') else - var campaign = campaigns[campaignSlug]; - if !campaign - - continue; - var godmode = me.get('permissions', true).indexOf('godmode') != -1; div(class="campaign #{campaignSlug}" + (campaign ? "" : " silhouette") + (campaign && campaign.locked && !godmode ? " locked" : ""), data-campaign-slug=campaignSlug) .campaign-label diff --git a/app/views/play/CampaignView.coffee b/app/views/play/CampaignView.coffee index 031005a0d..bd5b8ab4c 100644 --- a/app/views/play/CampaignView.coffee +++ b/app/views/play/CampaignView.coffee @@ -196,7 +196,9 @@ module.exports = class CampaignView extends RootView context.requiresSubscription = @requiresSubscription context.editorMode = @editorMode context.adjacentCampaigns = _.filter _.values(_.cloneDeep(@campaign?.get('adjacentCampaigns') or {})), (ac) => - return false if ac.showIfUnlocked and (ac.showIfUnlocked not in me.levels()) and not @editorMode + if ac.showIfUnlocked and not @editorMode + return false if _.isString(ac.showIfUnlocked) and ac.showIfUnlocked not in me.levels() + return false if _.isArray(ac.showIfUnlocked) and _.intersection(ac.showIfUnlocked, me.levels()).length < 0 ac.name = utils.i18n ac, 'name' styles = [] styles.push "color: #{ac.color}" if ac.color @@ -226,7 +228,10 @@ module.exports = class CampaignView extends RootView campaign.locked = true for campaign in @campaigns.models for acID, ac of campaign.get('adjacentCampaigns') ? {} - _.find(@campaigns.models, id: acID)?.locked = false if ac.showIfUnlocked in me.levels() + if _.isString(ac.showIfUnlocked) + _.find(@campaigns.models, id: acID)?.locked = false if ac.showIfUnlocked in me.levels() + else if _.isArray(ac.showIfUnlocked) + _.find(@campaigns.models, id: acID)?.locked = false if _.intersection(ac.showIfUnlocked, me.levels()).length context @@ -437,7 +442,7 @@ module.exports = class CampaignView extends RootView return if 0.2 < fraction < 0.8 direction = if fraction < 0.5 then 1 else -1 magnitude = 0.2 * bodyWidth * (if direction is -1 then fraction - 0.8 else 0.2 - fraction) / 0.2 - portalsWidth = 1902 # TODO: if we add campaigns or change margins, this will get out of date... + portalsWidth = 2536 # TODO: if we add campaigns or change margins, this will get out of date... scrollTo = $portals.offset().left + direction * magnitude scrollTo = Math.max bodyWidth - portalsWidth, scrollTo scrollTo = Math.min 0, scrollTo diff --git a/app/views/play/level/modal/HeroVictoryModal.coffee b/app/views/play/level/modal/HeroVictoryModal.coffee index af5517513..a96dff041 100644 --- a/app/views/play/level/modal/HeroVictoryModal.coffee +++ b/app/views/play/level/modal/HeroVictoryModal.coffee @@ -421,6 +421,9 @@ module.exports = class HeroVictoryModal extends ModalView 'tabula-rasa': '', 'wanted-poster': '', 'siege-of-stonehold': '', + 'go-fetch': '', + 'palimpsest': '', + 'quizlet': '', 'clash-of-clones': 'mountain', 'summits-gate': 'glacier' }[@level.get('slug')] ? @level.get 'campaign'