Crossfire Server, Trunk
|
Go to the source code of this file.
Functions | |
method_ret | ob_apply (object *op, object *applier, int aflags) |
char * | ob_describe (const object *op, const object *observer, int use_media_tags, char *buf, size_t size) |
method_ret | ob_move_on (object *op, object *victim, object *originator) |
method_ret | ob_process (object *op) |
method_ret | ob_trigger (object *op, object *cause, int state) |
Those functions deal with the object/type system.
Definition in file ob_methods.cpp.
method_ret ob_apply | ( | object * | op, |
object * | applier, | ||
int | aflags | ||
) |
Apply an object by running an event hook or an object method. Consider using apply_manual() instead of this function if the applier should check for apply restrictions.
op | The object to apply |
applier | The object that executes the apply action |
aflags | Special (always apply/unapply) flags |
0 | A player or monster can't apply objects of that type |
1 | has been applied, or there was an error applying the object |
2 | objects of that type can't be applied if not in inventory |
Definition at line 44 of file ob_methods.cpp.
References ob_methods::apply, EVENT_APPLY, events_execute_object_event(), ob_methods::fallback, METHOD_OK, METHOD_UNHANDLED, give::op, SCRIPT_FIX_ALL, and type_methods.
Referenced by apply_by_living_below(), apply_manual(), create_player_cmd(), dimension_door(), enter_exit(), and thrown_item_effect().
char* ob_describe | ( | const object * | op, |
const object * | observer, | ||
int | use_media_tags, | ||
char * | buf, | ||
size_t | size | ||
) |
Returns the description of an object, as seen by the given observer.
op | The object to describe |
observer | The object to which the description is made |
use_media_tags | whether to add media tags or not on the description |
buf | Buffer that will contain the description |
size | Size of buf |
Definition at line 91 of file ob_methods.cpp.
References buf, ob_methods::describe, ob_methods::fallback, give::op, and type_methods.
Referenced by book_type_apply(), cast_identify(), enter_exit(), examine(), identify_altar_type_move_on(), and identify_object_with_skill().
method_ret ob_move_on | ( | object * | op, |
object * | victim, | ||
object * | originator | ||
) |
Makes an object move on top of another one.
op | The object over which to move |
victim | The object moving over op |
originator | The object that is the cause of the move |
METHOD_UNHANDLED | if the process method does not exist for that object |
Definition at line 111 of file ob_methods.cpp.
References ob_methods::fallback, METHOD_UNHANDLED, ob_methods::move_on, give::op, type_methods, and sword_of_souls::victim.
Referenced by move_hole(), object_check_move_on(), and object_remove().
method_ret ob_process | ( | object * | op | ) |
Processes an object, giving it the opportunity to move or react. Note: The return value of ob_process doesn't seem to be used anymore.
op | The object to process |
METHOD_UNHANDLED | if the process method does not exist for that objec, |
Definition at line 67 of file ob_methods.cpp.
References ob_methods::fallback, METHOD_UNHANDLED, give::op, ob_methods::process, and type_methods.
Referenced by animate_bomb(), do_throw(), fire_arch_from_position(), fire_bolt(), fire_bow(), and process_object().
method_ret ob_trigger | ( | object * | op, |
object * | cause, | ||
int | state | ||
) |
An object is triggered by another one.
op | The object being triggered |
cause | The object that is the cause of the trigger |
state | trigger state, 0 for released, other for pushed |
METHOD_UNHANDLED | if the process method does not exist for that object |
Definition at line 133 of file ob_methods.cpp.
References ob_methods::fallback, METHOD_UNHANDLED, give::op, dragon::state, ob_methods::trigger, and type_methods.
Referenced by trigger_connected().