Skip to content

Commit

Permalink
New version.
Browse files Browse the repository at this point in the history
  • Loading branch information
NiHoel committed May 31, 2020
1 parent 4a5c275 commit c7bcc28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions AnnoCalculator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let versionCalculator = "v3.2";
let versionCalculator = "v3.3";
let EPSILON = 0.01;
let ALL_ISLANDS = "All Islands";

Expand Down Expand Up @@ -440,7 +440,7 @@ class Consumer extends NamedElement {


getWorkforceDemand(assetsMap) {
for (let m of this.maintenances) {
for (let m of this.maintenances || []) {
let a = assetsMap.get(m.Product);
if (a instanceof Workforce)
return new WorkforceDemand($.extend({ factory: this, workforce: a }, m), assetsMap);
Expand Down Expand Up @@ -541,7 +541,6 @@ class Factory extends Consumer {
this.moduleDemand.updateAmount(0);
return buildings;
});
this.buildings.subscribe(val => this.workforceDemand.updateAmount(Math.max(val, this.existingBuildings())));
}


Expand Down Expand Up @@ -828,7 +827,7 @@ class PopulationLevel extends NamedElement {
this.noOptionalNeeds = ko.observable(false);
this.needs = [];
config.needs.forEach(n => {
if (n.tpmin > 0)
if (n.tpmin > 0 && assetsMap.get(n.guid))
this.needs.push(new PopulationNeed(n, assetsMap));
});
this.amount.subscribe(val => {
Expand Down Expand Up @@ -1532,8 +1531,8 @@ Siehe folgenden Link für weitere Informationen: `
german: "Eine neue Version des Warenrechners ist verfügbar. Klicke auf den Downloadbutton."
},
newFeature: {
english: "Repository for the server moved.",
german: "Repository des Servers hat sich geändert."
english: "Bright harvest Update.",
german: "Reiche-Ernte-Update."
},
helpContent: {
german:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* A calculator for the computer game [Anno 1800](https://www.ubisoft.com/de-de/game/anno-1800/) to compute the required production depending on the population
* [YouTube-Tutorial](https://www.youtube.com/watch?v=fxzYSh-92Ng)
* To use the calculator go to the following website: https://nihoel.github.io/Anno1800Calculator/
* To use it offline, download, unzip and open index.html with a browser: https://github.com/NiHoel/Anno1800Calculator/archive/v3.2.zip
* To use it offline, download, unzip and open index.html with a browser: https://github.com/NiHoel/Anno1800Calculator/archive/v3.3.zip
* An application that reads population, productivities and factory count from the game and enters it into the calculator can be found here: https://github.com/NiHoel/Anno1800UXEnhancer
* License: MIT
* Author: Nico Höllerich

0 comments on commit c7bcc28

Please sign in to comment.