1234567891011121314151617 |
- states.push({
- id: "unfurl-solar",
- button: "Unfurl the Solar Array",
- action: "Extending Array",
- duration: 1200,
- show: () => isFlagEnabled('solar-array-purchased') && !isFlagEnabled('solar-enabled'),
- requires: () => {
- if (isFlagEnabled('solar-enabled')) { errorMessage = "Solar panels already unfurled"; }
- if(userData.position == "asteroid-field") { errorMessage = "Too dangerous to activate here";}
- return !isFlagEnabled('solar-enabled') && userData.position != "asteroid-field";
- },
- run: () => {
- userData.energyRegenRate = 1;
- userData.energyRegenAmount = 2;
- setFlag('solar-enabled');
- },
- });
|