SHARE
TWEET

Suggested additional changeset

a guest May 20th, 2016 10 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/binaries/data/mods/public/gui/structree/draw.js b/binaries/data/mods/public/gui/structree/draw.js
  2. index c0ab56e..1c93ad4 100644
  3. --- a/binaries/data/mods/public/gui/structree/draw.js
  4. +++ b/binaries/data/mods/public/gui/structree/draw.js
  5. @@ -70,9 +70,9 @@ function draw()
  6.                 {
  7.                     for (let prod of stru.production.technology[prod_pha])
  8.                     {
  9. -                       prod = (depath(prod).slice(0,5) == "phase") ? g_ParsedData.phases[prod] : g_ParsedData.techs[prod];
  10. -                       if (prod.cost && stru.techCostMultiplier)
  11. -                           for (let res in prod.cost)
  12. +                       prod = clone(depath(prod).slice(0,5) == "phase" ? g_ParsedData.phases[prod] : g_ParsedData.techs[prod]);
  13. +                       for (let res in stru.techCostMultiplier)
  14. +                           if (prod.cost[res])
  15.                                 prod.cost[res] *= stru.techCostMultiplier[res];
  16.                         if (!drawProdIcon(i, s, r, p, prod))
  17.                             break;
  18. diff --git a/binaries/data/mods/public/gui/structree/load.js b/binaries/data/mods/public/gui/structree/load.js
  19. index becdcc2..d0d0c46 100644
  20. --- a/binaries/data/mods/public/gui/structree/load.js
  21. +++ b/binaries/data/mods/public/gui/structree/load.js
  22. @@ -131,6 +131,10 @@ function loadStructure(templateName)
  23.         structure.armour = struct.armour;
  24.         structure.auras = struct.auras;
  25.  
  26. +       // For technology cost multiplier, we need to use the tower
  27. +       struct = loadStructure(structure.wallSet.templates.tower);
  28. +       structure.techCostMultiplier = struct.techCostMultiplier;
  29. +
  30.         let health;
  31.  
  32.         for (let wSegm in structure.wallSet.templates)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top