mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Tweaked HOOK_INVENTORYMOVE for dropping caps
* before the amount was set in the dropped object only after the hook. Edits to hook script documents.
This commit is contained in:
@@ -408,6 +408,7 @@
|
||||
id: HOOK_INVENTORYMOVE
|
||||
doc: |
|
||||
Runs before moving items between inventory slots in dude interface. You can override the action.
|
||||
|
||||
What you can NOT do with this hook:
|
||||
- force moving items to inappropriate slots (like gun in armor slot)
|
||||
What you can do:
|
||||
@@ -432,6 +433,11 @@
|
||||
int ret0 - Override setting (-1 - use engine handler, any other value - prevent relocation of item/reloading weapon/picking up item)
|
||||
```
|
||||
|
||||
Notes for the event of dropping items on the ground:
|
||||
- the event is called for each item when dropping multiple items from the stack
|
||||
- for ammo type items, the number of dropped ammo in a pack can be found by using the `get_weapon_ammo_count` function
|
||||
- for the `PID_BOTTLE_CAPS` item, the event is called only once, and the number of dropped units can be found from the value of the `OBJ_DATA_CUR_CHARGES` object field (or with the `get_weapon_ammo_count` function)
|
||||
|
||||
- name: InvenWield
|
||||
id: HOOK_INVENWIELD
|
||||
doc: |
|
||||
|
||||
Reference in New Issue
Block a user