#include <player/base.h>#include <living/description.h>#include <player/viewcmd.h>#include <player.h>#include <thing/properties.h>#include <language.h>#include <defines.h>#include <moving.h>#include <wizlevels.h>#include <events.h>
gehe zum Quellcode dieser Datei
Makrodefinitionen | |
| #define | NEED_PROTOTYPES |
Funktionen | |
| public void | create () |
| static mixed | _to_remove (object ob) |
| static varargs int | remove (int silent) |
| public string | NotifyDestruct (object caller) |
| protected int | PreventMove (object dest, object oldenv, int method) |
| protected void | NotifyMove (object dest, object oldenv, int method) |
| public void | flush_connections () |
| static string | _query_msgin () |
| static string | _query_msgout () |
Variablen | |
| inherit std living | moving |
| private nosave string * | connections |
| static string _query_msgin | ( | ) | [static] |
| static string _query_msgout | ( | ) | [static] |
| static mixed _to_remove | ( | object | ob | ) | [static] |
Definiert in Zeile 47 der Datei moving.c.
Benutzt P_AUTOLOADOBJ und P_NODROP.
00048 { 00049 return ob->QueryProp(P_AUTOLOADOBJ) || ob->QueryProp(P_NODROP); 00050 }
| public void create | ( | ) |
Definiert in Zeile 31 der Datei moving.c.
Benutzt connections, create(), F_MODE, P_MMSGIN, P_MMSGOUT, P_MSGIN, P_MSGOUT, SAVE, Set() und SetProp().
00032 { 00033 SetProp( P_MSGIN, "kommt an" ); 00034 SetProp( P_MSGOUT, "geht" ); 00035 SetProp( P_MMSGIN, "tritt aus einer Schwefelwolke" ); 00036 SetProp( P_MMSGOUT, "verschwindet mit Knall und Schwefelduft" ); 00037 Set( P_MSGIN, SAVE, F_MODE ); 00038 Set( P_MSGOUT, SAVE, F_MODE ); 00039 Set( P_MMSGIN, SAVE, F_MODE ); 00040 Set( P_MMSGOUT, SAVE, F_MODE ); 00041 connections = ({}); 00042 00043 ::create(); 00044 }

| public void flush_connections | ( | ) |
Definiert in Zeile 170 der Datei moving.c.
00170 { 00171 catch(call_other( "/p/daemon/pathd", "add_paths", connections );publish); 00172 connections = ({}); 00173 }
| public string NotifyDestruct | ( | object | caller | ) |
Definiert in Zeile 92 der Datei moving.c.
00092 { 00093 00094 if (previous_object() != master() 00095 || object_name(this_object()) == __FILE__[..<3]) 00096 return 0; 00097 00098 // Das Zerstoeren von Spielern wird ggf. geloggt. 00099 if ( objectp(caller) && caller != this_object() 00100 && getuid(caller) != ROOTID ) { 00101 log_file( "PLAYERDEST", 00102 sprintf( "%s: %O VERNICHTET von PO %O, TI %O, TP %O\n", 00103 dtime(time()), this_object(), caller, 00104 this_interactive(), this_player() ) ); 00105 } 00106 // erstmal nix weiter tun, destruct gestatten. 00107 return 0; 00108 }
| protected void NotifyMove | ( | object | dest, | |
| object | oldenv, | |||
| int | method | |||
| ) |
Definiert in Zeile 141 der Datei moving.c.
00141 { 00142 00143 // erstmal ggf. Rauminhalt an Spieler ausgeben. 00144 if ( interactive(ME) && !(method & M_NO_SHOW) ) { 00145 if (!CannotSee(1)) 00146 tell_object( ME, "" + env_descr(1) ); 00147 else if ( QueryProp(P_BRIEF) < 2 ) 00148 tell_object( ME, "Finsternis.\n" ); 00149 } 00150 00151 //dann geerbten Kram machen 00152 ::NotifyMove(dest,oldenv,method); 00153 00154 // Schlussnendlich noch fuer den PathD bewegung protokollieren. 00155 // (dest nicht geprueft, da ein Spieler nicht ausserhalb jedes Env bewegt 00156 // werden kann) 00157 if ( interactive() && environment() && query_verb() && objectp(oldenv)) { 00158 connections += ({ BLUE_NAME(oldenv) + "#" 00159 + BLUE_NAME(dest) 00160 + "#" + query_verb() + " " + _unparsed_args(2) 00161 + "#" + method + "#" 00162 + dest->QueryProp(P_PARA) }); 00163 00164 if ( sizeof(connections) > 50 00165 && find_call_out("flush_connections") == -1 ) 00166 call_out( "flush_connections", 0, connections ); 00167 } 00168 }
| protected int PreventMove | ( | object | dest, | |
| object | oldenv, | |||
| int | method | |||
| ) |
Definiert in Zeile 110 der Datei moving.c.
00110 { 00111 string hcroom; 00112 mixed res; 00113 00114 // gestorbene HC-Spieler duerfen nicht mehr aus dem Nirvana, nicht umgehbar 00115 // durch M_NOCHECK 00116 if ( interactive(ME) && (query_hc_play()>1) ) { 00117 if (objectp(dest)) 00118 hcroom=object_name(dest); 00119 if (strlen(hcroom)<7 || hcroom[0..5]!="/room/") { 00120 return ME_CANT_BE_INSERTED; 00121 } 00122 } 00123 00124 // alle anderen Pruefungen sind mit M_NOCHECK egal. 00125 if ( (method & M_NOCHECK) ) 00126 return(::PreventMove(dest,oldenv,method)); 00127 00128 // Spieler duerfen in Raeume mit gesetztem P_NO_PLAYERS nicht hinein 00129 if ( dest->QueryProp(P_NO_PLAYERS) && interactive(ME) && 00130 !(method & M_NOCHECK) && 00131 !IS_LEARNER(ME) && (!stringp(res = QueryProp(P_TESTPLAYER)) 00132 || !IS_LEARNER( lower_case(res) )) ){ 00133 tell_object( ME, "Da darfst Du als Spieler nicht hin.\n" ); 00134 return ME_NOT_ALLOWED; 00135 } 00136 00137 return ::PreventMove(dest,oldenv,method); 00138 }
| static varargs int remove | ( | int | silent | ) | [static] |
Definiert in Zeile 54 der Datei moving.c.
Benutzt ME und notify_player_leave().
00055 { 00056 mixed dest_obj; 00057 00058 if ( interactive(ME) ) 00059 catch( "/secure/merlin"->notify_player_leave(getuid(ME));publish ); 00060 00061 dest_obj = filter( deep_inventory(ME) - ({0}), "_to_remove" ); 00062 filter_objects( dest_obj, "remove" ); 00063 filter( dest_obj - ({0}), #'destruct ); 00064 00065 if ( !QueryProp(P_INVIS) && !silent ) 00066 catch( say( name(WER, 1) + " verlaesst diese Welt.\n", ME );publish ); 00067 00068 if ( ME && !silent ) 00069 tell_object( ME, "Bis bald!\n" ); 00070 00071 // Im Falle des Resets ist previous_object() == ME, aber 00072 // previous_object(0) == 0. Ausserdem ist der Caller-Stack leer. Also 00073 // schauen, ob es ein PO gibt, was nicht gleich dem Objekt selber ist, TI 00074 // pruefen und 00075 if ( this_interactive() != ME 00076 && objectp(previous_object()) && previous_object() != ME 00077 && object_name(previous_object())[0..7] != "/secure/" 00078 && member(object_name(ME), ':') > -1 ) 00079 log_file( "PLAYERDEST", 00080 sprintf( "%s: %O vernichtet von PO %O, TI %O, TP %O\n", 00081 dtime(time()), ME, previous_object(), 00082 this_interactive(), this_player() ) ); 00083 // Logout-event ausloesen 00084 EVENTD->TriggerEvent(EVT_LIB_LOGOUT, ([ 00085 E_OBJECT: ME, 00086 E_PLNAME: getuid(ME), 00087 E_ENVIRONMENT: environment() ]) ); 00088 00089 return (int)::remove(); 00090 }

| private nosave string* connections |
1.6.3