DIFF

class InventorySlots

provides access to slot configuration

Constructors 2

private void InventorySlots()
private void ~InventorySlots()

Constants 2

const int COUNT

Amount of pre-populated slots (32)

const int INVALID

Invalid slot (-1)

Referenced by ActionAttachOnSelection.ActionCondition(), ActionAttachOnSelection.FindSlotIdToAttachOrCombine(), ActionAttachOnSelection.SetupAction()
Show 32 more, ActionAttachToConstruction.ActionCondition(), ActionAttachToConstruction.FindAndTranslateAttachmentSlot(), ActionAttachToConstruction.OnExecuteImpl(), ActionAttachToConstruction.Post_SetupAction(), ActionDetachFromTarget.ActionCondition(), ActionDetachFromTarget.FindSlotIdToDetach(), ActionDetachFromTarget.GetDisplayInteractObject(), ActionDetachFromTarget.SetupAction(), ActionDetachFromTarget_SpecificSlot.FindSlotIdToDetach(), ActionDetachFromTarget_SpecificSlotsCategory.FindSlotIdToDetach(), ActionRefuelTorch.ActionCondition(), BotTestItemMoveBackAndForth_MoveFromSlotToSlot.GetNextSlot(), ConstructionActionData.GetAttachmentSlotFromSelection(), ConstructionBase.DropNonUsableMaterialsServer(), ConstructionMaterialData.Init(), ConstructionMaterialInfoIcon.CheckDisplayableAttachment(), ConstructionMaterialInfoIcon.ClearRemainSelected(), ConstructionMaterialInfoIcon.InitMaterialInfo(), EntityAI.CheckExclusionAccessPropagation(), EntityAI.FindAttachmentBySlotName(), EntityAI.InitInherentSlotExclusionMap(), GameInventory.GetCurrentAttachmentSlotInfo(), GenericIconBase.ResetIconValues(), InventoryItemSoundAttach.LoadSoundEvents(), InventoryItemSoundDetach.LoadSoundEvents(), InventoryItemType.GetSlotAttachSoundSet(), InventoryItemType.GetSlotDetachSoundSet(), ItemBase.ClearStartItemSoundServer(), ItemBase.InitItemVariables(), ItemBase.LegacyItemSoundSync(), ItemBase.StartItemSoundServer(), and VehicleBattery.CanPutAsAttachment()

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 GetSlotName(int id)

converts slot_id to string

in slot_id
slot id to be find.

Returns: string or null string

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