pruby

stardew-greenhouse.js

Dec 18th, 2021
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. var toTag = (s) => (s[0].toUpperCase() + s.substring(1));
  2. var cropNames = Object.keys(crops);
  3. var base_growth = (cropNames).map((n) => crops[n].growth.regrow || crops[n].growth.initial);
  4. var is_regrowing = (cropNames).map((n) => !!crops[n].growth.regrow);
  5. var keg_times = (cropNames).map((n) => crops[n].produce.kegType === 'Wine' ? 10000 / 1440 : 4000 / 1440);
  6. var extra_yield = (cropNames).map((n) => crops[n].produce.extra * crops[n].produce.extraPerc);
  7. var keg_prices = (cropNames).map((n) => crops[n].produce.price * (crops[n].produce.kegType === 'Wine' ? 3 : (crops[n].produce.kegType === 'Juice' ? 2.25 : 0)));
  8. var jar_prices = (cropNames).map((n) => (crops[n].produce.price * 2 + 50) * (crops[n].produce.jarType ? 1 : 0));
  9. var seed_costs = (cropNames).map((n) => Math.min.apply(null, Object.values(crops[n].seeds).filter((e) => e > 0)));
  10.  
  11.  
Advertisement
Add Comment
Please, Sign In to add comment