blob: 1268911d45109c7772f6925e973e4584626bdebf [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001#include <defines.h>
2#include <moving.h>
3#include <properties.h>
4#include <language.h>
5
6#define SPIELER "nefis"
7#define DEBUG(x) if (find_player("zesstra"))\
8 tell_object(find_player("zesstra"),\
9 "Nefis P_SIZE: "+x+"\n")
10#define LOG(x) log_file("zesstra/P_SIZE.log", x)
11
12private nosave object pl;
13
14void create()
15{
16 if (!clonep() ) return;
17 pl = find_player(SPIELER) || find_netdead(SPIELER);
18 if (!objectp(pl)) {
19 DEBUG("Playerobjekt nicht gefunden.");
20 destruct(ME);
21 return;
22 }
23 shadow( pl, 1);
24 DEBUG(sprintf("%O shadowed by: %O\n", pl, shadow(pl, 0)));
25}
26
27int _set_size(int sz) {
28 LOG(sprintf("[%s] Aenderung von P_SIZE in %O auf %O,\nCallerstack: %O\n\n",
29 strftime("%c",time()), pl, sz, caller_stack()));
30 return pl->Set(P_SIZE, sz, F_VALUE);
31}
32
33public varargs mixed Set( string name, mixed Value, int Type, int extern ) {
34 if (name == P_SIZE) {
35 LOG(sprintf("[%s] Aenderung von P_SIZE in %O auf %O (Typ: %O) [Set()!]"
36 ",\nCallerstack: %O\n\n",
37 strftime("%c",time()), pl, Value, Type, caller_stack()));
38 }
39 return pl->Set(name, Value, Type, extern);
40}
41
42int stop() {
43 unshadow();
44 destruct(ME);
45 return 1;
46}
47
48void reset() {
49 if (!objectp(pl))
50 stop();
51}
52
53int remove() {
54 stop();
55 return 1;
56}
57