SHARE
TWEET

Compatibility for Trainer Units

a guest May 22nd, 2016 13 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 1fbd677..df48736 100644
  3. --- a/binaries/data/mods/public/gui/structree/draw.js
  4. +++ b/binaries/data/mods/public/gui/structree/draw.js
  5. @@ -136,7 +136,10 @@ function draw()
  6.                     prod = g_ParsedData.units[prod];
  7.                     break;
  8.                 case "techs":
  9. -                   prod = g_ParsedData.techs[prod];
  10. +                   prod = clone(g_ParsedData.techs[prod]);
  11. +                   for (let res in trainer.techCostMultiplier)
  12. +                       if (prod.cost[res])
  13. +                           prod.cost[res] *= trainer.techCostMultiplier[res];
  14.                     break;
  15.                 default:
  16.                     continue;
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