From 7a798c616f336851351cc11c8e77984a47ff698f Mon Sep 17 00:00:00 2001 From: Nero Ignis Date: Mon, 19 Apr 2021 23:09:49 +0200 Subject: [PATCH] Design; --- css/app.css | 8 ++++---- js/app.js | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/css/app.css b/css/app.css index f7b56f1..76069f5 100644 --- a/css/app.css +++ b/css/app.css @@ -23,10 +23,10 @@ .level-marker { position: absolute; - bottom: -13px; - right: 10px; - font-size: 2.5em; - -webkit-text-stroke: 1px white; + top: 2px; + right: 15px; + font-size: 1.8em; + -webkit-text-stroke: 1px lightgrey; -webkit-text-fill-color: gold; font-family: Arial, serif; } \ No newline at end of file diff --git a/js/app.js b/js/app.js index 2a60b64..f9adbfc 100644 --- a/js/app.js +++ b/js/app.js @@ -34,7 +34,7 @@ let game = new Vue({ resource: 'wood', icon: 'medieval_lumber', level: 0, - maxLevel: 15, + maxLevel: 10, isOwned: false, isUpgradeable: true, amount: 2, @@ -49,7 +49,7 @@ let game = new Vue({ resource: 'planks', icon: 'medieval_lumber', level: 0, - maxLevel: 15, + maxLevel: 10, isOwned: false, isUpgradeable: true, amount: 5, @@ -68,7 +68,7 @@ let game = new Vue({ resource: 'stone', icon: 'medieval_mine', level: 0, - maxLevel: 15, + maxLevel: 10, isOwned: false, isUpgradeable: true, amount: 2, @@ -83,7 +83,7 @@ let game = new Vue({ resource: 'coal', icon: 'medieval_mine', level: 0, - maxLevel: 15, + maxLevel: 10, isOwned: false, isUpgradeable: true, amount: 2, @@ -98,7 +98,7 @@ let game = new Vue({ resource: 'iron', icon: 'medieval_blacksmith', level: 0, - maxLevel: 15, + maxLevel: 10, isOwned: false, isUpgradeable: true, amount: 2, @@ -148,10 +148,10 @@ let game = new Vue({ }, methods: { checkBuildings() { - let savedBuildings = JSON.parse(localStorage.getItem('buildings')); + let savedBuildings = JSON.parse(localStorage.getItem(this.storageNames.buildings)); if (!savedBuildings) { - localStorage.setItem('buildings', JSON.stringify(this.buildings)); + localStorage.setItem(this.storageNames.buildings, JSON.stringify(this.buildings)); } else if (savedBuildings.length !== this.buildings.length) { localStorage.setItem('buildings', JSON.stringify(this.buildings)); this.sendInfo('Buildings have been resetted due to an important update.'); @@ -168,7 +168,7 @@ let game = new Vue({ if (savedBuildings) { savedBuildings.forEach((building) => { if (building.isOwned) { - building.loader = 10; + building.loader = 0; } if (building.hasMissingResources) { @@ -315,7 +315,7 @@ let game = new Vue({ }, buyUpgrade(building) { - if (building.level === 'MAX') { + if (building.level === 'X') { this.sendWarning('Already at MAX-Level'); return false; } @@ -332,7 +332,7 @@ let game = new Vue({ if (building.level < (building.maxLevel - 1)) { building.level++; } else { - building.level = 'MAX'; + building.level = 'X'; building.isUpgradeable = false; } @@ -352,7 +352,7 @@ let game = new Vue({ reloadSingleBuilding(building) { clearInterval(building.intervalEarnID); clearInterval(building.intervalLoadingID); - building.loader = 10; + building.loader = 0; this.initiateIntervals(building); }, @@ -420,10 +420,10 @@ let game = new Vue({ }; } else { this.currentQuest = null; + this.sendInfo('There are no quests available, get some resources first.') } localStorage.setItem('currentQuest', JSON.stringify(this.currentQuest)); - console.log('New Quest:', this.currentQuest); return this.currentQuest; },