DIFF

class InventorySlotsSource

provides access to slot configuration

Constructors 2

private void InventorySlots()
private void ~InventorySlots()

Constants 2

const int COUNT

Amount of pre-populated slots (32)

Methods 9

static proto native int GetSlotIdFromString(string slot_name)

converts string to slot_id

@example int slot = InventorySlots.GetSlotIdFromString("FireWood"); if (slot != InventorySlots.INVALID)

@NOTE the example looks in the DZ/data/config.cpp and searches for class entry Slot_##slot_name class Slot_Firewood { whatever };

i.e. it does NOT look at name= or displayName= attributes of the entry!

in slot_name
slot name to be find.

Returns: slot id or InventorySlots.INVALID

static proto native owned string GetSlotDisplayName(int id)

converts slot_id to string

in slot_id
slot id to be find.

Returns: string or null string

static proto native bool IsSlotIdValid(int slotId)

verifies existence of the slot id

Returns: true if slot valid

static proto native int GetStackMaxForSlotId(int slot_Id)
in slot_id
queried slot

Returns: stackMax attribute from corresponding entry (or default value == 1)

static proto native bool GetShowForSlotId(int slot_Id)
in slot_id
queried slot

Returns: show attribute from corresponding entry (or default value == true)

static proto native bool GetAutoAttachForSlotId(int slot_Id)
in slot_id
queried slot

Returns: auto attach attribute from corresponding entry (or default value == 1)

static proto bool GetBoneNameForSlotId(int slot_Id, out string bone_name)
in slot_id
queried slot
out bone_name
selection filled with attribute from corresponding entry

Returns: true if slot valid

static proto bool GetSelectionForSlotId(int slot_Id, out string selection)
in slot_id
queried slot
out selection
selection filled with attribute from corresponding entry

Returns: true if slot valid