MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | inherit "/std/virtual/v_compiler.c"; |
| 2 | |
| 3 | #pragma strong_types,rtt_checks,save_types |
| 4 | |
| 5 | #include <thing/properties.h> |
| 6 | |
| 7 | #define NEED_PROTOTYPES |
| 8 | #include <v_compiler.h> |
| 9 | #undef NEED_PROTOTYPES |
| 10 | |
| 11 | protected void create() { |
| 12 | ::create(); |
| 13 | |
| 14 | // jeder Spieler kriegt eine "Kopie" von std_arena als Raum. |
| 15 | SetProp(P_STD_OBJECT, __DIR__"std_arena"); |
| 16 | SetProp(P_COMPILER_PATH, __DIR__); |
| 17 | } |
| 18 | |
| 19 | public string Validate(string file) |
| 20 | { |
| 21 | string raum, spieler; |
| 22 | //.c abschneiden |
| 23 | file=::Validate(file); |
| 24 | // wenn das gewuenscht file dem Schema "arena|spielername" folgt, ist es |
| 25 | // zulaessig. |
| 26 | if(sscanf(file,"%s|%s",raum,spieler)==2 && raum=="arena") |
| 27 | return file; |
| 28 | |
| 29 | // nicht zulaessig. |
| 30 | return 0; |
| 31 | } |
| 32 | |