blob: 0678e70cd8f56e6222f347b5c0fee963388d08a2 [file] [log] [blame]
Zesstra953f9972017-02-18 15:37:36 +01001
2RemoveSensitiveObject()
3***********************
4
5
6FUNKTION
7========
8
9 void RemoveSensitiveObject(object ob)
10
11
12DEFINIERT IN
13============
14
15 /std/container/inventory.c
16 generalizes /std/living/inventory.c
17
18
19ARGUMENTE
20=========
21
22 ob - zu entfernendes Objekt
23
24
25BESCHREIBUNG
26============
27
28 Entfernt ob aus den Benachrichtigungslisten des Containers.
29 Wird von thing/moving.c im alten Environment gerufen, wenn
30 P_SENSITIVE gesetzt ist.
31 Ruft dazu RemoveSensitiveObjectFromList().
32
33
34BEMERKUNGEN
35===========
36
37 Setzt man P_SENSITIVE nicht als Default sondern situationsabhaengig,
38 dann muss man auch RemoveSensitiveObject im Environment
39 auch selbst rufen!
40
41
42BEISPIEL
43========
44
45 // Fackel (inheriting lightsource)
46 void create() {
47 ...
48 SetProp(P_SENSITIVE,
49 ({({SENSITIVE_INVENTORY_TRIGGER,DT_FIRE,120})}));
50 ...
51 }
52
53 // wenn die Fackel geloescht wird, verliert sie ihre aktive
54 // Eigenschaft und muss das dem environment() mitteilen
55 static int extinguish(string str) {
56 int i;
57 i=::extinguish(str);
58 if(i && QueryProp(P_LIGHT)<=0) {
59 SetProp(P_SENSITIVE,0);
60 if(environment())
61 environment()->RemoveSensitiveObject(this_object());
62 }
63 return i;
64 }
65
66 - empfindliche Objekte wie Eiszapfen koennen jetzt wieder gefahrlos
67 in das selbe environment() bewegt werden
68
69
70SIEHE AUCH
71==========
72
73 P_SENSITIVE
74 InsertSensitiveObject
75 insert_sensitive_inv_trigger, insert_sensitive_inv
76 P_SENSITIVE_ATTACK, P_SENSITIVE_INVENTORY, P_SENSITIVE_INVENTORY_TRIGGER
77 CheckSensitiveAttack
78
7925.Apr.2001, Gloinson@MG