MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | #ifndef __ZESSTRA_MERKZETTEL_H__ |
| 2 | #define __ZESSTRA_MERKZETTEL_H__ |
| 3 | |
| 4 | #define SAVEFILE(x) ("/players/"+x+"/.merkzettel") |
| 5 | #define ARCHIVE(x) ("/players/"+x+"/merkzettel.archiv") |
| 6 | |
| 7 | #define NOTE_TEXT 0 |
| 8 | #define NOTE_PRIO 1 |
| 9 | #define NOTE_STARTTIME 2 |
| 10 | #define NOTE_DEPS 3 |
| 11 | #define NOTE_HELPER 4 |
| 12 | #define NOTE_STATUS 5 |
| 13 | #define NOTE_CLOSETIME 6 |
| 14 | |
| 15 | //Status, >0 sind aktiv, <0 inaktiv |
| 16 | #define NOTE_ACTIVE 1 |
| 17 | #define NOTE_PENDING 2 |
| 18 | #define NOTE_INACTIVE -1 |
| 19 | #define NOTE_FINISHED -2 |
| 20 | #define NOTE_STATES ({NOTE_ACTIVE,NOTE_PENDING,NOTE_INACTIVE,NOTE_FINISHED}) |
| 21 | |
| 22 | //Sortierreihenfolge |
| 23 | #define SORT_INVERSE 1 |
| 24 | |
| 25 | //wieviel wird max.abgespeichert |
| 26 | #define MAX_NOTE_LENGTH 1000 |
| 27 | //wieviel wird max. in der Liste angezeigt |
| 28 | #define MAX_NOTE_LIST_LENGTH 50 |
| 29 | |
| 30 | #define BS(x) break_string(x,78) |
| 31 | #define BSI(x,y) break_string(x,78,y) |
| 32 | #define BSL(x) break_string(x,78,"",BS_LEAVE_MY_LFS) |
| 33 | #define BSIL(x,y) break_string(x,78,y,BS_LEAVE_MY_LFS) |
| 34 | |
| 35 | #define TI this_interactive() |
| 36 | |
| 37 | #ifdef NEED_PROTOTYPES |
| 38 | //AddCmd |
| 39 | int AddNotiz(string str); |
| 40 | int ErsetzeText(string str); |
| 41 | int ErgaenzeText(string str); |
| 42 | int RemoveNotiz(string str); |
| 43 | int FinishNotiz(string str); |
| 44 | int ListNotizen(string str); |
| 45 | int LiesNotiz(string str); |
| 46 | int ChangeDep(string str); |
| 47 | int ChangeStatus(string str); |
| 48 | int ChangePrio(string str); |
| 49 | int ChangeHelper(string str); |
| 50 | int ZeigeZettel(string str); |
| 51 | int WedelZettel(string str); |
| 52 | int LiesDeps(string str); |
| 53 | int Expire(string str); |
| 54 | |
| 55 | //von den AddCmd-Funs gerufen |
| 56 | static string _LiesNotiz(int id); |
| 57 | |
| 58 | //sonst. Funktionen, z.B. fuer Debugzwecke |
| 59 | mapping QueryNotizen(); |
| 60 | string QueryOwner(); |
| 61 | varargs int remove(int silent); |
| 62 | |
| 63 | //int. Funktionen |
| 64 | static status sort_prio(int key1, int key2); |
| 65 | static nomask status check_allowed(); |
| 66 | protected int restore_me(); |
| 67 | varargs protected void save_me(int delay); |
| 68 | static string query_autoloadobj(); |
| 69 | static string set_autoloadobj(mixed arg); |
| 70 | varargs static int checkStatus(int nocache); |
| 71 | static string update_deps(string str,int id); |
| 72 | static int note_filter(int id,int filterstate); |
| 73 | static int aelter_als(int id,int zeit); |
| 74 | static int *getUnresolvedDeps(int id); |
| 75 | static int *getDeps(int id,int rec); |
| 76 | |
| 77 | #endif // NEED_PROTOTYPES |
| 78 | |
| 79 | #endif // __ZESSTRA_MERKZETTEL_H__ |