Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/binaries/data/mods/public/gui/structree/draw.js b/binaries/data/mods/public/gui/structree/draw.js
- index c0ab56e..1c93ad4 100644
- --- a/binaries/data/mods/public/gui/structree/draw.js
- +++ b/binaries/data/mods/public/gui/structree/draw.js
- @@ -70,9 +70,9 @@ function draw()
- {
- for (let prod of stru.production.technology[prod_pha])
- {
- - prod = (depath(prod).slice(0,5) == "phase") ? g_ParsedData.phases[prod] : g_ParsedData.techs[prod];
- - if (prod.cost && stru.techCostMultiplier)
- - for (let res in prod.cost)
- + prod = clone(depath(prod).slice(0,5) == "phase" ? g_ParsedData.phases[prod] : g_ParsedData.techs[prod]);
- + for (let res in stru.techCostMultiplier)
- + if (prod.cost[res])
- prod.cost[res] *= stru.techCostMultiplier[res];
- if (!drawProdIcon(i, s, r, p, prod))
- break;
- diff --git a/binaries/data/mods/public/gui/structree/load.js b/binaries/data/mods/public/gui/structree/load.js
- index becdcc2..d0d0c46 100644
- --- a/binaries/data/mods/public/gui/structree/load.js
- +++ b/binaries/data/mods/public/gui/structree/load.js
- @@ -131,6 +131,10 @@ function loadStructure(templateName)
- structure.armour = struct.armour;
- structure.auras = struct.auras;
- + // For technology cost multiplier, we need to use the tower
- + struct = loadStructure(structure.wallSet.templates.tower);
- + structure.techCostMultiplier = struct.techCostMultiplier;
- +
- let health;
- for (let wSegm in structure.wallSet.templates)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement