Link Search Menu Expand Document

Inventory

Функции


active_hand

int active_hand

critter_inven_obj2

funcX

ObjectPtr critter_inven_obj2(ObjectPtr obj, int type)

Works just like vanilla critter_inven_obj, but correctly reports item in player’s inactive hand slot.


get_current_inven_size

funcX

get_current_inven_size(ObjectPtr object)

Returns the current inventory size of the container or the critter.


get_inven_ap_cost

int get_inven_ap_cost

Returns the current AP cost to access the inventory in combat


item_weight

funcX

int item_weight(ObjectPtr obj)

Gets the current weight of an object.


obj_is_carrying_obj

int (ObjectPtr invenObj, ObjectPtr itemObj)

Returns number of itemObj inside invenObj’s inventory, note that both arguments are object pointers. useful when dealing with different stacks of same item (obj_is_carrying_obj_pid just returns total for all stacks of the same PID.)


set_inven_ap_cost

void set_inven_ap_cost

toggle_active_hand

void toggle_active_hand

unwield_slot

void sfall_func2("unwield_slot", object critter, int slot)

unequips an item from the specified slot for a critter or the player can take off player’s equipped item when the inventory is opened, or the player is in the barter screen slot: 0 - armor slot, 1 - right slot, 2 - left slot (see INVEN_TYPE_* in define.h)