Crossfire Server, Branches 1.12
R18729
|
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, 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.c.
method_ret ob_apply | ( | object * | op, |
object * | applier, | ||
int | aflags | ||
) |
Applies an object.
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 59 of file ob_methods.c.
References ob_methods::apply, ob_methods::fallback, METHOD_UNHANDLED, obj::type, and type_methods.
Referenced by enter_exit(), manual_apply(), monster_use_scroll(), player_apply_below(), and thrown_item_effect().
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 |
buf | Buffer that will contain the description |
size | Size of buf |
Definition at line 102 of file ob_methods.c.
References ob_methods::describe, ob_methods::fallback, obj::type, and type_methods.
Referenced by book_type_apply(), cast_identify(), do_skill_ident2(), examine(), and identify_altar_type_move_on().
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 122 of file ob_methods.c.
References ob_methods::fallback, METHOD_UNHANDLED, ob_methods::move_on, obj::type, and type_methods.
Referenced by check_move_on(), move_hole(), and remove_ob().
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 79 of file ob_methods.c.
References ob_methods::fallback, METHOD_UNHANDLED, ob_methods::process, obj::type, 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 144 of file ob_methods.c.
References ob_methods::fallback, METHOD_UNHANDLED, ob_methods::trigger, obj::type, and type_methods.
Referenced by trigger_connected().