activate-ramjet.js 544 B

12345678910111213141516
  1. states.push({
  2. id: "activate-ramjet",
  3. button: "Activate Ramjet",
  4. action: "Engaging",
  5. duration: 2200,
  6. show: () => isFlagEnabled('ramjet-purchased') && !isFlagEnabled('ramjet-enabled'),
  7. requires: () => {
  8. if (isFlagEnabled('ramjet-enabled')) { errorMessage = "Ramjet already activated"; }
  9. if(userData.position == "asteroid-field") { errorMessage = "Too dangerous to activate here";}
  10. return !isFlagEnabled('ramjet-enabled') && userData.position != "asteroid-field";
  11. },
  12. fallback: null,
  13. run: () => {
  14. setFlag('ramjet-enabled');
  15. },
  16. });