Zesstra@Morgengrauen | 66656a8 | 2016-07-20 23:22:47 +0200 | [diff] [blame] | 1 | // MorgenGrauen MUDlib |
| 2 | #pragma strong_types,save_types,rtt_checks |
| 3 | #pragma no_clone,no_inherit,no_shadow |
| 4 | #pragma pedantic, range_check |
| 5 | |
| 6 | #include <files.h> |
| 7 | |
| 8 | // Variablen fuer das Savefile von Jof, was dieses Objekt schreibt. |
| 9 | string name = "jof"; |
| 10 | string password = ""; |
| 11 | int level = 100; |
| 12 | string shell = "/std/shells/magier"; |
| 13 | |
| 14 | public varargs int remove(int s) |
| 15 | { |
| 16 | destruct(this_object()); |
| 17 | return 1; |
| 18 | } |
| 19 | |
| 20 | protected void create() |
| 21 | { |
| 22 | # ifndef __TESTMUD__ |
| 23 | remove(); |
| 24 | return; |
| 25 | # endif |
| 26 | seteuid(getuid(this_object())); |
| 27 | if(file_size("/players/jof") == FSIZE_NOFILE) |
| 28 | { |
| 29 | mkdir("/players/jof"); |
| 30 | } |
| 31 | if(file_size("/players/jof/workroom") == FSIZE_NOFILE) |
| 32 | { |
| 33 | copy_file("/std/def_workroom.c","/players/jof/workroom.c"); |
| 34 | } |
| 35 | if(file_size("/secure/save/j/jof.o") == FSIZE_NOFILE) |
| 36 | { |
| 37 | save_object("/secure/save/j/jof"); |
| 38 | } |
| 39 | remove(); |
| 40 | } |