mining-outpost.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. rooms.push({
  2. id: "mining-outpost",
  3. name: "Docked at Station",
  4. description: "A sweaty, crouded metal space station filled with unwashed asteroid miners and sleezy metal merchants.",
  5. play: "mining-outpost",
  6. actions: [
  7. ],
  8. doors: [
  9. {
  10. id: "nearby-outpost",
  11. button: "Launch",
  12. action: "Launching",
  13. requires: () => true,
  14. start: () => {
  15. receiveMessage({name:"[Station Tower]", id:-1, style: "station"}, userData.name + " has launch approval.");
  16. play('launch-from-station');
  17. },
  18. run: () => { userData.position = "nearby-outpost"; },
  19. duration: 2000
  20. },
  21. {
  22. id: "mining-outpost-shop",
  23. button: "Shop",
  24. action: "Travelling",
  25. requires: () => true,
  26. run: () => {
  27. userData.position = "mining-outpost-shop";
  28. },
  29. duration: 300
  30. },
  31. ],
  32. viewable: [
  33. {elementId: 'actions', data: {}},
  34. {elementId: 'doors', data: {}},
  35. {elementId: 'get-from-inventory', data: { action: "refine", button: "Refine Materials", validator: (item) => {
  36. return !!refineMap.find(refine => refine.input == item.type);
  37. }}},
  38. {elementId: 'room-description', data: {}},
  39. ],
  40. });