| RemoveSensitiveObject() |
| FUNKTION: |
| void RemoveSensitiveObject(object ob) |
| |
| DEFINIERT IN: |
| /std/container/inventory.c |
| generalizes /std/living/inventory.c |
| |
| ARGUMENTE: |
| ob - zu entfernendes Objekt |
| |
| BESCHREIBUNG: |
| Entfernt ob aus den Benachrichtigungslisten des Containers. |
| Wird von thing/moving.c im alten Environment gerufen, wenn |
| P_SENSITIVE gesetzt ist. |
| Ruft dazu RemoveSensitiveObjectFromList(). |
| |
| BEMERKUNGEN: |
| Setzt man P_SENSITIVE nicht als Default sondern situationsabhaengig, |
| dann muss man auch RemoveSensitiveObject im Environment |
| auch selbst rufen! |
| |
| BEISPIEL: |
| // Fackel (inheriting lightsource) |
| void create() { |
| ... |
| SetProp(P_SENSITIVE, |
| ({({SENSITIVE_INVENTORY_TRIGGER,DT_FIRE,120})})); |
| ... |
| } |
| |
| // wenn die Fackel geloescht wird, verliert sie ihre aktive |
| // Eigenschaft und muss das dem environment() mitteilen |
| static int extinguish(string str) { |
| int i; |
| i=::extinguish(str); |
| if(i && QueryProp(P_LIGHT)<=0) { |
| SetProp(P_SENSITIVE,0); |
| if(environment()) |
| environment()->RemoveSensitiveObject(this_object()); |
| } |
| return i; |
| } |
| |
| - empfindliche Objekte wie Eiszapfen koennen jetzt wieder gefahrlos |
| in das selbe environment() bewegt werden |
| |
| SIEHE AUCH: |
| P_SENSITIVE |
| InsertSensitiveObject |
| insert_sensitive_inv_trigger, insert_sensitive_inv |
| P_SENSITIVE_ATTACK, P_SENSITIVE_INVENTORY, P_SENSITIVE_INVENTORY_TRIGGER |
| CheckSensitiveAttack |
| |
| 25.Apr.2001, Gloinson@MG |
| |