h or space keyboard shortcut to return to your Home star.",
+ priority: 10,
+ onConceptUsed: function (self) {
+ this.markProgress(self, 30)
+ }
+ },
+ {
+ id: LearningHelper.concept.CAMERA_ZOOM,
+ title: "Camera zoom",
+ text: "Zoom in and out with the MOUSE WHEEL or + and - keys.",
+ priority: 10,
+ onConceptUsed: function (self) {
+ this.markProgress(self, 20)
+ }
+ },
+ {
+ id: LearningHelper.concept.CARRIERS,
+ title: "Carriers",
+ text: "Carriers are used to transport Ships through hyperspace to reach other Stars. They can only be built at Stars and must hold a minimum of 1 Ship.\nCarriers are displayed as small ship icons with a circular coloured halo, much like stars. The number of ships that a carrier has will be displayed when zoomed in.\nClick on the carrier to view it in detail.",
+ priority: 20,
+ pre: [LearningHelper.concept.CAMERA_ZOOM],
+ onMenuRequested: function (self, menuState) {
+ if (menuState.state === MENU_STATES.CARRIER_DETAIL) {
+ this.markLearned(self)
+ }
+ }
+ },
+ {
+ id: LearningHelper.concept.CAPITAL_STAR,
+ title: "Capital Star",
+ text: "The Capital Star is your home world. You can recognize as it has 9 points.\nSelect your Capital Star and view its details.",
+ priority: 20,
+ pre: [LearningHelper.concept.CAMERA_ZOOM],
+ onMenuRequested: function (self, menuState) {
+ if (menuState.state === MENU_STATES.STAR_DETAIL) {
+ const starId = menuState.args
+ const star = GameHelper.getStarById(this.$store.state.game, starId)
+ if (star.homeStar) {
+ this.markLearned(self)
+ }
+ }
+ }
+ },
+ {
+ id: LearningHelper.concept.BULK_UPGRADE,
+ title: "Bulk Upgrade",
+ text: "Improve your infrastructure by spending your budget on the cheapest expansions first.\nAccess Bulk Upgrade from the menu / sidebar or using the b keyboard shortcut.",
+ priority: 100,
+ pre: [],
+ isAvailable: function (self) {
+ return this.isGameInProgress
+ },
+ onConceptUsed: function (self) {
+ this.markLearned(self)
+ }
+ },
+ {
+ id: LearningHelper.concept.COMBAT_CALCULATOR,
+ title: "Combat Calculator",
+ text: "Use this handy tool to predict the outcome of combat based on the weapon levels and numbers of the Attacker and Defender.\nAccess the Combat Calculator from the menu / sidebar, using the c keyboard shortcut or from the Carrier detail window.",
+ priority: 100,
+ pre: [LearningHelper.concept.CARRIERS],
+ isAvailable: function (self) {
+ return this.isGameInProgress
+ },
+ onConceptUsed: function (self) {
+ this.markLearned(self)
+ }
+ },
+]
diff --git a/client/src/services/learningHelper.js b/client/src/services/learningHelper.js
new file mode 100644
index 000000000..ec747042e
--- /dev/null
+++ b/client/src/services/learningHelper.js
@@ -0,0 +1,20 @@
+import eventBus from '../eventBus'
+
+const CONCEPT_IDS = {
+ BULK_UPGRADE: 'bulk-upgrade',
+ CAMERA_PAN: 'camera-pan',
+ CAMERA_ZOOM: 'camera-zoom',
+ CAPITAL_STAR: 'capital-star',
+ CARRIERS: 'carriers',
+ COMBAT_CALCULATOR: 'combat-calculator',
+}
+
+class LearningHelper {
+ concept = CONCEPT_IDS
+
+ conceptUsed(conceptId) {
+ eventBus.$emit('onConceptUsed', conceptId)
+ }
+}
+
+export default new LearningHelper()
diff --git a/client/src/store.js b/client/src/store.js
index 9fa671708..2f73fdbdb 100644
--- a/client/src/store.js
+++ b/client/src/store.js
@@ -24,7 +24,8 @@ export default new Vuex.Store({
starSpecialists: null,
carrierSpecialists: null,
settings: null,
- confirmationDialog: {}
+ confirmationDialog: {},
+ learnedConcepts: null
},
mutations: {
// Menu
@@ -143,6 +144,15 @@ export default new Vuex.Store({
state.confirmationDialog = settings
},
+ setLearnedConcept (state, conceptId) {
+ if (!state.learnedConcepts)
+ state.learnedConcepts = {}
+ state.learnedConcepts[conceptId] = true
+ },
+ clearLearnedConcepts (state) {
+ state.learnedConcepts = null
+ },
+
setUnreadMessages (state, count) {
state.unreadMessages = count
},
diff --git a/client/src/views/game/Game.vue b/client/src/views/game/Game.vue
index d4a460cdc..9d9da0f64 100644
--- a/client/src/views/game/Game.vue
+++ b/client/src/views/game/Game.vue
@@ -16,6 +16,7 @@
+ {{ concept.title }} ({{ concept.progress + }}%) +
+