MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | // MorgenGrauen MUDlib |
| 2 | // |
| 3 | // moving.h -- Methoden und Rueckgabewerte fuer/von move() |
| 4 | // Dieser Header sollte IMMER benutzt werden, wenn ein Objekt |
| 5 | // move() benutzt! |
| 6 | // |
| 7 | // $Id: moving.h 8801 2014-05-04 21:30:59Z Zesstra $ |
| 8 | |
| 9 | #ifndef _MOVING_ |
| 10 | #define _MOVING_ |
| 11 | |
| 12 | // leider nicht via <> moeglich, da dieses File benutzt wird, bevor der Master |
| 13 | // den Include-Dir-Hook gesetzt hat. |
| 14 | #include "/sys/living/moving.h" |
| 15 | #include "/sys/player/moving.h" |
| 16 | |
| 17 | /* |
| 18 | * moving.h |
| 19 | * |
| 20 | * How objects are moving around and reasons why they cant do it. |
| 21 | */ |
| 22 | |
| 23 | /* Methods to move objects */ |
| 24 | #define M_GO 1 /* we walk around */ |
| 25 | #define M_TPORT 128 /* We teleport to another place */ |
| 26 | #define M_NOCHECK 2 /* just plain move it without any checks */ |
| 27 | #define M_GET 4 /* obj geht von nonliving zu living */ |
| 28 | #define M_PUT 8 /* obj geht von living zu nonliving */ |
| 29 | #define M_GIVE 16 /* obj geht von living zu living */ |
| 30 | #define M_SILENT 32 /* obj soll ohne meldung ausgezogen werden */ |
| 31 | #define M_NO_ATTACK 512 /* Kein Begruessungsschlag */ |
| 32 | #define M_NO_SHOW 256 /* Zeige nicht die Room-Descr beim ankommen */ |
| 33 | |
| 34 | /* Hier folgt noch was fuer die Unit */ |
| 35 | #define M_MOVE_ALL 32 |
| 36 | |
| 37 | /* Errors when moving things */ |
| 38 | #define MOVE_OK 1 // gar kein Fehler. ;-) |
| 39 | /* Hey, I'm a player and cant be simply carried away */ |
| 40 | #define ME_PLAYER -1 |
| 41 | /* Cant move into container because I'm too heavy */ |
| 42 | #define ME_TOO_HEAVY -2 |
| 43 | #define ME_CANT_TPORT_IN -3 /* Cant teleport there ! */ |
| 44 | #define ME_CANT_TPORT_OUT -4 /* Cant teleport from here ! */ |
| 45 | #define ME_CANT_BE_DROPPED -5 /* You cant drop the feel... this thing */ |
| 46 | #define ME_CANT_BE_TAKEN -6 /* Nope, you cannot take me */ |
| 47 | #define ME_CANT_BE_INSERTED -7 /* Container prevents me from inserting */ |
| 48 | #define ME_CANT_LEAVE_ENV -8 /* Container prevents me from leaving */ |
| 49 | /* Can't move into container, its Env would get too heavy */ |
| 50 | #define ME_TOO_HEAVY_FOR_ENV -9 |
| 51 | #define TOO_MANY_OBJECTS -10 /* too many objects in new environment */ |
| 52 | #define ME_NOT_ALLOWED -11 /* Sorry - off limits for players */ |
| 53 | // Object was destructed during move/in init() |
| 54 | #define ME_WAS_DESTRUCTED -12 |
| 55 | // object itself does not want to be moved for undefined reason |
| 56 | #define ME_DONT_WANT_TO_BE_MOVED -13 |
| 57 | |
| 58 | // check for valid move error - mainly for internal use! |
| 59 | #define ALL_MOVE_ERRORS ({ME_PLAYER,ME_TOO_HEAVY,ME_CANT_TPORT_IN,\ |
| 60 | ME_CANT_TPORT_OUT,ME_CANT_BE_DROPPED,\ |
| 61 | ME_CANT_BE_TAKEN,ME_CANT_BE_INSERTED,\ |
| 62 | ME_CANT_LEAVE_ENV,ME_TOO_HEAVY_FOR_ENV,\ |
| 63 | TOO_MANY_OBJECTS,ME_NOT_ALLOWED,\ |
| 64 | ME_WAS_DESTRUCTED,ME_DONT_WANT_TO_BE_MOVED}) |
| 65 | #define VALID_MOVE_ERROR(x) (member(ALL_MOVE_ERRORS,x) != -1) |
| 66 | |
| 67 | #define NO_TPORT 1 |
| 68 | #define NO_TPORT_IN 2 |
| 69 | #define NO_TPORT_OUT 4 |
| 70 | |
| 71 | /* Ablehnreaktionen von NPCs */ |
| 72 | #define REJECT_LIGHT_MODIFIER "reject_light_modifier" |
| 73 | #define REJECT_DROP "reject_drop" |
| 74 | #define REJECT_GIVE "reject_give" |
| 75 | #define REJECT_KEEP "reject_keep" |
| 76 | |
| 77 | /* Zugriffsmethoden fuer find_obs */ |
| 78 | |
| 79 | #define PUT_GET_NONE 0x00 |
| 80 | #define PUT_GET_TAKE 0x01 |
| 81 | #define PUT_GET_DROP 0x02 |
| 82 | |
| 83 | #endif |