westgate.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. module.exports = class ZebedeeWestGate {
  2. constructor() {
  3. this.id = this.constructor.name;
  4. this.name = "Zebedee West Gate";
  5. this.description = "A tall arched gate made out of smooth gray stone blocks guards the exit to the village.";
  6. this.filename = "zebedee/westgate.js";
  7. this.type = "room";
  8. this.items = [];
  9. this.mobiles = [];
  10. this.roomExpires = 0;
  11. this.resetDelay = 6000000;
  12. this.roomExits = ["leave", "east"];
  13. }
  14. mud_reset(time) {
  15. libs.Output.toRoom(this.id, "The street bustles with foot traffic.");
  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. east(room, mobile, input) {
  30. world.mud_moveMobile(mobile.id, this.id, "ZebedeeCormallenRoad3", "leaves east");
  31. return true;
  32. }
  33. leave(room, mobile, input) {
  34. world.mud_moveMobile(mobile.id, this.id, "DirtRoad2", "leaves through the gate");
  35. return true;
  36. }
  37. west(room, mobile, input) {
  38. return this.leave(room, mobile, input);
  39. }
  40. };