25 RecomputeOpenedContainers();
52 Widget rip = m_SlotIcon.GetRadialIconPanel();
69 return GetFocusedContainer().IsInherited(ContainerWithCargo);
74 return GetFocusedContainer().IsInherited(ContainerWithCargoAndAttachments);
85 return ent && (
ent.GetInventory().GetCargo() ||
ent.GetSlotsCountCorrect() > 0);
107 string name =
w.GetName();
108 name.Replace(
"PanelWidget",
"Render");
119 if (!
item.GetInventory().CanRemoveEntity())
132 name.Replace(
"PanelWidget",
"Render");
141 name.Replace(
"PanelWidget",
"Render");
153 if (!
item.GetInventory().CanRemoveEntity())
161 name.Replace(
"PanelWidget",
"Render");
170 name.Replace(
"PanelWidget",
"Render");
182 if (!
item.GetInventory().CanRemoveEntity())
231 if (
item.GetSlotsCountCorrect() > 0)
233 ContainerWithCargoAndAttachments
iwca =
new ContainerWithCargoAndAttachments(
this,
false);
237 icon.GetRadialIconPanel().Show(
true);
242 else if (
item.GetInventory().GetCargo())
244 ContainerWithCargo
iwc =
new ContainerWithCargo(
this,
false);
246 iwc.UpdateInterval();
249 icon.GetRadialIconPanel().Show(
true);
256 string config =
"CfgVehicles " +
item.GetType() +
" GUIInventoryAttachmentsProps";
267 RecomputeOpenedContainers();
282 RecomputeOpenedContainers();
283 GetMainWidget().Update();
291 in.UpdateConsoleToolbar();
307 if (
c &&
c.IsDisplayable())
332 RecomputeOpenedContainers();
359 if (
g_Game.IsLeftCtrlDown())
427 icon.GetMainWidget().Show(
true);
470 icon.GetMainWidget().Show(
true);
474 icon.GetRadialIconPanel().Show(
true);
475 icon.GetRadialIcon().Show(
true);
485 RecomputeOpenedContainers();
512 string name =
w.GetName();
513 name.Replace(
"PanelWidget",
"Render");
529 if (!
item.GetInventory().CanRemoveEntity())
539 if (
item.GetTargetQuantityMax(
il.GetSlot()) <
item.GetQuantity())
540 item.SplitIntoStackMaxToInventoryLocationClient(
il);
546 if (
item.GetTargetQuantityMax() <
item.GetQuantity())
556 menu.RefreshQuickbar();
562 super.CollapseButtonOnMouseButtonDown(
w);
569 if (GetFocusedContainer().IsInherited(ContainerWithCargo) || GetFocusedContainer().IsInherited(ContainerWithCargoAndAttachments))
570 return GetFocusedContainer().SplitItem();
579 if (GetFocusedContainer().IsInherited(ContainerWithCargo) || GetFocusedContainer().IsInherited(ContainerWithCargoAndAttachments))
580 return GetFocusedContainer().EquipItem();
598 if (CanTakeToInventory())
603 if (GetFocusedContainer().IsInherited(ContainerWithCargo) || GetFocusedContainer().IsInherited(ContainerWithCargoAndAttachments))
604 return GetFocusedContainer().TransferItem();
617 if (!GetFocusedContainer().IsInherited(ContainerWithCargo) && !GetFocusedContainer().IsInherited(ContainerWithCargoAndAttachments))
633 if (GetFocusedContainer().IsInherited(ContainerWithCargo) || GetFocusedContainer().IsInherited(ContainerWithCargoAndAttachments))
634 return GetFocusedContainer().Select();
700 if (GetFocusedContainer().IsInherited(ContainerWithCargo) || GetFocusedContainer().IsInherited(ContainerWithCargoAndAttachments))
701 return GetFocusedContainer().TransferItemToVicinity();
708 if (
item.GetTargetQuantityMax() <
item.GetQuantity())
709 item.SplitIntoStackMaxClient(
null, -1);
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
void Inventory(LayoutHolder parent)
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
FindInventoryLocationType
flags for searching locations in inventory
ref Widget m_RootWidget[MAX_SIMULTANIOUS_PLAYERS]
override void Remove(LayoutHolder container)
ref CollapsibleHeader m_CollapsibleHeader
override Header GetHeader()
override void SetHeader(Header header)
override EntityAI GetFocusedItem()
script counterpart to engine's class Inventory
static bool CanSwapEntitiesEx(notnull EntityAI item1, notnull EntityAI item2)
provides access to slot configuration
static proto native owned string GetSlotDisplayName(int id)
converts slot_id to string
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
static ItemManager GetInstance()
static int HasItemQuantity(notnull EntityAI item)
SlotsIcon GetSlotIcon(int index)
static const int IMAGESETGROUP_INVENTORY
static string VerifyIconImageString(int imageset_group=IMAGESETGROUP_INVENTORY, string icon_name="")
Checks for improperly formated, legacy image names and corrects them to default format.
override bool TransferItem()
ref map< EntityAI, ref Container > m_ShowedItems
override bool TransferItemToVicinity()
override void ExpandCollapseContainer()
Widget GetWidgetSlot(int slot_number)
override void DraggingOverHeader(Widget w, int x, int y, Widget receiver)
void DoubleClick(Widget w, int x, int y, int button)
ref AttachmentsGroupContainer m_Container
bool IsItemWithAttachmentsActive()
void ZombieContainer(LayoutHolder parent, int sort=-1)
override bool SplitItem()
void OnDropReceivedFromGhostArea(Widget w, int x, int y, Widget receiver)
void ItemAttached(EntityAI item, string slot_name)
override void OnDropReceivedFromHeader(Widget w, int x, int y, Widget receiver)
void MouseClick(Widget w, int x, int y, int button)
void ItemDetached(EntityAI item, string slot_name)
override void CollapseButtonOnMouseButtonDown(Widget w)
override bool CanOpenCloseContainerEx(EntityAI focusedEntity)
ref ContainerWithCargo m_CargoGrid
void AddSlotsContainer(int row_count)
bool IsZombieEquipmentActive()
bool IsContainerWithCargoActive()
SlotsIcon GetSlotsIcon(int row, int column)
override bool EquipItem()
override bool IsItemWithQuantityActive()
void ToggleContainer(Widget w)
override void UpdateRadialIcon()
bool IsItemWithContainerActive()
ref map< int, SlotsIcon > m_InventorySlots
void SetEntity(EntityAI zombie_entity)
proto native CGame GetGame()