123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- module.exports = class Movement {
- north(room, mobile, input) {
- if(typeof room.north == 'function') {
- return room.north(room, mobile, input);
- }
- libs.Output.toMobile(mobile.id, "You can't go that way.");
- return true;
- }
- n(room, mobile, input) {
- return this.north(room, mobile, input);
- }
- south(room, mobile, input) {
- if(typeof room.south == 'function') {
- return room.south(room, mobile, input);
- }
- libs.Output.toMobile(mobile.id, "You can't go that way.");
- return true;
- }
- s(room, mobile, input) {
- return this.south(room, mobile, input);
- }
- east(room, mobile, input) {
- if(typeof room.east == 'function') {
- return room.east(room, mobile, input);
- }
- libs.Output.toMobile(mobile.id, "You can't go that way.");
- return true;
- }
- e(room, mobile, input) {
- return this.east(room, mobile, input);
- }
- west(room, mobile, input) {
- if(typeof room.west == 'function') {
- return room.west(room, mobile, input);
- }
- libs.Output.toMobile(mobile.id, "You can't go that way.");
- return true;
- }
- w(room, mobile, input) {
- return this.west(room, mobile, input);
- }
- northwest(room, mobile, input) {
- if(typeof room.northwest == 'function') {
- return room.northwest(room, mobile, input);
- }
- libs.Output.toMobile(mobile.id, "You can't go that way.");
- return true;
- }
- nw(room, mobile, input) {
- return this.northwest(room, mobile, input);
- }
- northeast(room, mobile, input) {
- if(typeof room.northeast == 'function') {
- return room.northeast(room, mobile, input);
- }
- libs.Output.toMobile(mobile.id, "You can't go that way.");
- return true;
- }
- ne(room, mobile, input) {
- return this.northeast(room, mobile, input);
- }
- southwest(room, mobile, input) {
- if(typeof room.southwest == 'function') {
- return room.southwest(room, mobile, input);
- }
- libs.Output.toMobile(mobile.id, "You can't go that way.");
- return true;
- }
- sw(room, mobile, input) {
- return this.southwest(room, mobile, input);
- }
- southeast(room, mobile, input) {
- if(typeof room.southeast == 'function') {
- return room.southeast(room, mobile, input);
- }
- libs.Output.toMobile(mobile.id, "You can't go that way.");
- return true;
- }
- se(room, mobile, input) {
- return this.southeast(room, mobile, input);
- }
- up(room, mobile, input) {
- if(typeof room.up == 'function') {
- return room.up(room, mobile, input);
- }
- libs.Output.toMobile(mobile.id, "You can't go that way.");
- return true;
- }
- u(room, mobile, input) {
- return this.up(room, mobile, input);
- }
- down(room, mobile, input) {
- if(typeof room.down == 'function') {
- return room.down(room, mobile, input);
- }
- libs.Output.toMobile(mobile.id, "You can't go that way.");
- return true;
- }
- d(room, mobile, input) {
- return this.down(room, mobile, input);
- }
- enter(room, mobile, input) {
- if(typeof room.enter == 'function') {
- return room.enter(room, mobile, input);
- }
- libs.Output.toMobile(mobile.id, "You can't go that way.");
- return true;
- }
- leave(room, mobile, input) {
- if(typeof room.leave == 'function') {
- return room.leave(room, mobile, input);
- }
- libs.Output.toMobile(mobile.id, "You can't go that way.");
- return true;
- }
- mud_getErrorMessage() {
- return "You stumble slightly as your legs vanish for a split-second and then reappear.";
- }
- };
|