ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/object.h
(Generate patch)

Comparing deliantra/server/include/object.h (file contents):
Revision 1.135 by root, Sun Jul 1 05:00:18 2007 UTC vs.
Revision 1.139 by root, Tue Jul 31 17:33:14 2007 UTC

184 sint32 ACC (RW, carrying); /* How much weight this object contains */ 184 sint32 ACC (RW, carrying); /* How much weight this object contains */
185 sint64 ACC (RW, perm_exp); /* Permanent exp */ 185 sint64 ACC (RW, perm_exp); /* Permanent exp */
186 uint32 ACC (RW, weapontype); /* type of weapon */ 186 uint32 ACC (RW, weapontype); /* type of weapon */
187 uint32 ACC (RW, tooltype); /* type of tool or build facility */ 187 uint32 ACC (RW, tooltype); /* type of tool or build facility */
188 body_slot slot [NUM_BODY_LOCATIONS]; 188 body_slot slot [NUM_BODY_LOCATIONS];
189 faceidx ACC (RW, face); /* Face with colors */ 189 faceidx ACC (RW, face); /* the graphical face */
190 faceidx ACC (RW, sound); /* the sound face */
190 living ACC (RO, stats); /* Str, Con, Dex, etc */ 191 living ACC (RO, stats); /* Str, Con, Dex, etc */
191 /* See the pod/objects.pod for more info about body locations */ 192 /* See the pod/objects.pod for more info about body locations */
192 193
193 /* Following mostly refers to fields only used for monsters */ 194 /* Following mostly refers to fields only used for monsters */
194 uint32 ACC (RW, hide); /* The object is hidden, not invisible */ 195 uint32 ACC (RW, hide); /* The object is hidden, not invisible */
284 MTH void destroy (bool destroy_inventory = false); 285 MTH void destroy (bool destroy_inventory = false);
285 286
286 // recursively destroy all objects in inventory, optionally dropping them to the ground instead 287 // recursively destroy all objects in inventory, optionally dropping them to the ground instead
287 MTH void destroy_inv (bool drop_to_ground = false); 288 MTH void destroy_inv (bool drop_to_ground = false);
288 MTH object *insert (object *item); // insert into inventory 289 MTH object *insert (object *item); // insert into inventory
290 MTH void play_sound (faceidx sound) const;
291
289 void do_remove (); 292 void do_remove ();
290 MTH void remove () 293 MTH void remove ()
291 { 294 {
292 if (!flag [FLAG_REMOVED]) 295 if (!flag [FLAG_REMOVED])
293 do_remove (); 296 do_remove ();
311 MTH void open_container (object *new_container); 314 MTH void open_container (object *new_container);
312 MTH void close_container () 315 MTH void close_container ()
313 { 316 {
314 open_container (0); 317 open_container (0);
315 } 318 }
319
320 MTH object *force_find (const shstr name);
321 MTH void force_add (const shstr name, int duration = 0);
316 322
317 // overwrite the attachable should_invoke function with a version that also checks ev_want_type 323 // overwrite the attachable should_invoke function with a version that also checks ev_want_type
318 bool should_invoke (event_type event) 324 bool should_invoke (event_type event)
319 { 325 {
320 return ev_want_event [event] || ev_want_type [type] || cb; 326 return ev_want_event [event] || ev_want_type [type] || cb;
420 MTH void create_treasure (treasurelist *tl, int flags = 0); 426 MTH void create_treasure (treasurelist *tl, int flags = 0);
421 427
422 // insert object at same map position as 'where' 428 // insert object at same map position as 'where'
423 // handles both inventory and map "positions" 429 // handles both inventory and map "positions"
424 MTH object *insert_at (object *where, object *originator = 0, int flags = 0); 430 MTH object *insert_at (object *where, object *originator = 0, int flags = 0);
431 MTH void drop_unpaid_items ();
425 432
426 MTH void activate (); 433 MTH void activate ();
427 MTH void deactivate (); 434 MTH void deactivate ();
428 MTH void activate_recursive (); 435 MTH void activate_recursive ();
429 MTH void deactivate_recursive (); 436 MTH void deactivate_recursive ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines