Inside a script called by a consumable item, we have access to Global variables like:
$item - Full Item codex of item used
$item_id - Item ID of item used
This enables the script to determine which type of item invoked it.
Would like something similar for skills (maybe a $skill_id
) and for Tool Items (I can get the entity who used the tool and the entity the tool was used on, but not the tool item entity itself).