MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | SYNOPSIS |
| 2 | #include <sys/driver_hooks.h> |
| 3 | |
| 4 | set_driver_hook(H_MOVE_OBJECT0, value) |
| 5 | set_driver_hook(H_MOVE_OBJECT1, value) |
| 6 | |
| 7 | <value> being: |
| 8 | |
| 9 | void <closure>(object item, object dest) |
| 10 | |
| 11 | DESCRIPTION |
| 12 | Mandatory hooks to implement the efun void move_object(). |
| 13 | Hook setting must be an unbound lambda closure. |
| 14 | |
| 15 | Upon call, the hook has to perform the move itself (by using |
| 16 | set_environment()) and all depending actions (like the calls to |
| 17 | init() to add actions). |
| 18 | |
| 19 | The difference lies in the binding of the set hook prior to |
| 20 | the call: the H_MOVE_OBJECT0 closure is bound to the current |
| 21 | object, the H_MOVE_OBJECT1 to 'item'. |
| 22 | If both hooks are set, H_MOVE_OBJECT0 is ignored. |
| 23 | |
| 24 | HISTORY |
| 25 | |
| 26 | SEE ALSO |
| 27 | move_object(E), set_environment(E), hooks(C) |