store-solar.js 469 B

12345678910111213141516
  1. states.push({
  2. id: "store-solar",
  3. button: "Store the Solar Array",
  4. action: "Folding Array",
  5. duration: 1200,
  6. show: () => isFlagEnabled('solar-array-purchased') && isFlagEnabled('solar-enabled'),
  7. requires: () => {
  8. if (!isFlagEnabled('solar-enabled')) { errorMessage = "Solar panels already stored"; }
  9. return isFlagEnabled('solar-enabled');
  10. },
  11. run: () => {
  12. userData.energyRegenRate = 10;
  13. userData.energyRegenAmount = 1;
  14. clearFlag('solar-enabled');
  15. },
  16. });