Index: binaries/data/mods/public/simulation/components/Foundation.js
===================================================================
--- binaries/data/mods/public/simulation/components/Foundation.js
+++ binaries/data/mods/public/simulation/components/Foundation.js
@@ -1,7 +1,9 @@
function Foundation() {}
Foundation.prototype.Schema =
- "";
+ "" +
+ "" +
+ "";
Foundation.prototype.Init = function()
{
@@ -15,7 +17,8 @@
this.builders = new Map(); // Map of builder entities to their work per second
this.totalBuilderRate = 0; // Total amount of work the builders do each second
this.buildMultiplier = 1; // Multiplier for the amount of work builders do
- this.buildTimePenalty = 0.7; // Penalty for having multiple builders
+
+ this.buildTimePenalty = +this.template.DiminishingReturns;
this.previewEntity = INVALID_ENTITY;
};
Index: binaries/data/mods/public/simulation/components/tests/test_Foundation.js
===================================================================
--- binaries/data/mods/public/simulation/components/tests/test_Foundation.js
+++ binaries/data/mods/public/simulation/components/tests/test_Foundation.js
@@ -127,7 +127,9 @@
TS_ASSERT_EQUALS(template, "construction|" + finalTemplate);
return previewEnt;
};
- cmpFoundation = ConstructComponent(foundationEnt, "Foundation", {});
+ cmpFoundation = ConstructComponent(foundationEnt, "Foundation", {
+ "DiminishingReturns": "0.7"
+ });
cmpFoundation.InitialiseConstruction(finalTemplate);
TS_ASSERT_EQUALS(cmpFoundation.finalTemplateName, finalTemplate);
Index: binaries/data/mods/public/simulation/templates/special/filter/foundation.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/special/filter/foundation.xml
+++ binaries/data/mods/public/simulation/templates/special/filter/foundation.xml
@@ -8,7 +8,9 @@
-
+
+ 0.7
+
1