bookreturn.js 892 B

123456789101112131415161718192021222324252627282930313233343536
  1. module.exports = class LibraryBookReturn {
  2. constructor() {
  3. this.id = this.constructor.name;
  4. this.name = "Library Book Return";
  5. this.description = "An old oak desk to the north has a slot for returning books.";
  6. this.filename = "library/bookreturn.js";
  7. this.type = "room";
  8. this.items = [];
  9. this.mobiles = [];
  10. this.roomExits = [];
  11. this.roomExpires = 0;
  12. this.resetDelay = 12000000;
  13. this.roomExits = ["south", "west"];
  14. }
  15. mud_reset(time) {
  16. libs.Output.toRoom(this.id, "A page turns in the utter silence.\n");
  17. this.roomExpires = time + this.resetDelay;
  18. }
  19. mud_tick(time) {
  20. if(time >= this.roomExpires) {
  21. this.mud_reset(time);
  22. }
  23. }
  24. south(room, mobile, input) {
  25. world.mud_moveMobile(mobile.id, this.id, "LibraryEntrance");
  26. return true;
  27. }
  28. west(room, mobile, input) {
  29. world.mud_moveMobile(mobile.id, this.id, "LibraryWestStacks1");
  30. return true;
  31. }
  32. };