Thin Film Cells and Quantum Dot Cells don't work like their tooltip suggests
Issue #165
new
Expected Behaviour (based on tooltips):
- If you only have Thin Film Cells (TFC) researched, you'll get 15% in winter.
- If you only have Quantum Dot Cells (QDC) researched, you'll get 15% in all seasons.
- If you have them both researched, you'll get 30% in winter, and 15% for every other season.
Looking at buildings.js 369-372:
var seasonRatio = game.getEffect("solarFarmSeasonRatio");
if ((game.calendar.season == 3 && seasonRatio == 1) || (game.calendar.season != 1 && seasonRatio == 2)){
effects["energyProduction"] *= (1 + 0.15 * seasonRatio);
}
Actual Behaviour:
- If you only have TFC researched, you get 15% in winter.
- If you only have QDC researched, you get 15% in winter.
- If you have them both researched, you'll get 0% in summer, and 30% for every other season.
I believe the easiest way to fix this would be to rewrite the code in the following manner:
var qdot = game.workshop.get("qdot").researched * 0.15;
var thinFlim = 0;
if (game.calendar.season == 3) {
thinFlim = game.workshop.get("thinFilm").researched * 0.15;
}
effects["energyProduction"] *= (1 + qdot + thinFilm);