dirtroad1.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. module.exports = class DirtRoad1 {
  2. constructor() {
  3. this.id = this.constructor.name;
  4. this.name = "Dirt Road";
  5. this.description = "A well-worn dirt road leads to the city of Zebedee to the west, and a large mine to the south.";
  6. this.filename = "dirtroad1.js";
  7. this.type = "room";
  8. this.items = [];
  9. this.mobiles = [];
  10. this.roomExpires = 0;
  11. this.resetDelay = 6000000;
  12. this.roomExits = ["south", "enter"];
  13. }
  14. mud_reset(time) {
  15. libs.Output.toRoom(this.id, "A wagon bumps by, heading for the city.");
  16. this.roomExpires = time + this.resetDelay;
  17. }
  18. mud_tick(time) {
  19. if(time >= this.roomExpires) {
  20. this.mud_reset(time);
  21. }
  22. }
  23. mud_getName() {
  24. return this.name;
  25. }
  26. mud_getDescription() {
  27. return this.description;
  28. }
  29. look(room, mobile, input) {
  30. }
  31. south(room, mobile, input) {
  32. world.mud_moveMobile(mobile.id, this.id, "CoalMineEntrance", "leaves south");
  33. return true;
  34. }
  35. enter(room, mobile, input) {
  36. world.mud_moveMobile(mobile.id, this.id, "ZebedeeEastGate", "enters through the gate");
  37. return true;
  38. }
  39. west(room, mobile, input) {
  40. return this.enter(room, mobile, input);
  41. }
  42. };