blob: 341c46b9edae706d2f010fdfda2f4a939c1bb4ed [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001// MorgenGrauen MUDlib
2//
3// $Id: netztot.c 8747 2014-04-26 13:08:47Z Zesstra $
4
5#include <wizlevels.h>
6#include <moving.h>
7
8create()
9{
10 call_out("invcheck",120);
11 "/obj/sperrer"->NixGibts();
12}
13
14weg(ob)
15{
16 if (!objectp(ob))
17 return;
18 ob->remove();
19 if (ob)
20 destruct(ob);
21}
22
23wegraeumen(ob)
24{
25 object *x;
26
27 if (!objectp(ob))
28 return;
29 for (x=deep_inventory(ob);sizeof(x);x=x[1..])
30 weg(x[0]);
31 ob->move("/room/void",M_NOCHECK|M_SILENT);
32 weg(ob);
33}
34
35invcheck()
36{
37 while(remove_call_out("invcheck")!=-1);
38 foreach(object ob: all_inventory(this_object()))
39 {
40 if (interactive(ob))
41 {
42 catch(this_player()->move("/room/void",M_GO));
43 set_object_heart_beat(ob,1);
44 }
45 else if (!query_once_interactive(ob) && object_name(ob)!="/obj/sperrer")
46 call_out("wegraeumen",1,ob);
47 }
48 call_out("invcheck",120);
49 "/obj/sperrer"->upd();
50}
51
52init()
53{
54 if (!this_player())
55 return;
56 catch(this_player()->StopHuntingMode());
57 if (interactive(this_player()))
58 catch(this_player()->move("/room/void",M_GO));
59 if (!query_once_interactive(this_player()))
60 {
61 this_player()->remove();
62 if(this_player())
63 destruct(this_player());
64 }
65 set_object_heart_beat(this_player(),0);
66}
67
68int_long()
69{
70 return "Dies ist der Netztotenraum. Es ist dunkel. Du siehst nichts.\n";
71}
72
73int_short()
74{
75 return "Nichts zu sehen.\n";
76}
77
78QueryProp(string str)
79{
80 switch (str) {
81 case "int_long": return int_long();
82 case "int_short": return int_short();
83 }
84}
85
86// Nicht jeder Magier darf den Netztotenraum entsorgen.
87string NotifyDestruct(object caller) {
88 if( (caller!=this_object() && !ARCH_SECURITY) || process_call() ) {
89 return "Du darfst den Netztotenraum nicht zerstoeren!\n";
90 }
91}
92