22 RecomputeOpenedContainers();
39 return (ContainerWithCargo.Cast(GetFocusedContainer()) !=
null);
44 return (ContainerWithCargoAndAttachments.Cast(GetFocusedContainer()) !=
null);
59 string type =
entity.GetType();
60 if (
container.IsInherited(ContainerWithCargo))
95 string name =
w.GetName();
96 name.Replace(
"PanelWidget",
"Render");
103 if (!
ipw || !
ipw.GetItem())
122 name.Replace(
"PanelWidget",
"Render");
130 name.Replace(
"PanelWidget",
"Render");
175 name.Replace(
"PanelWidget",
"Render");
183 name.Replace(
"PanelWidget",
"Render");
197 if (!
item.GetInventory().CanRemoveEntity())
207 item.GetInventory().GetCurrentInventoryLocation(
il2);
216 PrepareOwnedTooltip(
item);
220 menu.RefreshQuickbar();
245 string name =
w.GetName();
246 name.Replace(
"PanelWidget",
"Render");
279 menu.RefreshQuickbar();
289 super.UpdateInterval();
314 if (
eai.IsInventoryVisible())
340 GetMainWidget().Update();
367 string config =
"CfgVehicles " +
entity.GetType() +
" GUIInventoryAttachmentsProps";
376 else if (
entity.GetSlotsCountCorrect() > 0 &&
entity.GetInventory().GetCargo())
390 ContainerWithCargoAndAttachments
iwca =
new ContainerWithCargoAndAttachments(
this, -1);
396 else if (
entity.GetInventory().GetCargo())
398 ContainerWithCargo
iwc =
new ContainerWithCargo(
this, -1);
402 iwc.UpdateInterval();
404 else if (
entity.GetSlotsCountCorrect() > 0)
406 if (
entity.HasEnergyManager())
433 ContainerWithCargoAndAttachments
iwcas =
new ContainerWithCargoAndAttachments(
this, -1);
437 iwcas.UpdateInterval();
453 GetMainWidget().Update();
466 GetMainWidget().Update();
491 ContainerWithCargo
pxc =
new ContainerWithCargo(
this, -1);
492 pxc.SetEntity(
cgo.GetCargoOwner(),
cgo.GetOwnerCargoIndex(),
false);
494 pxc.UpdateInterval();
513 GetMainWidget().Update();
534 in.UpdateConsoleToolbar();
556 if (
c &&
c.IsDisplayable())
585 w.GetScreenSize(
x,
y);
586 if (
w == GetMainWidget())
588 GetMainWidget().Update();
596 if (
w == GetMainWidget())
598 GetMainWidget().Update();
606 super.CollapseButtonOnMouseButtonDown(
w);
615 if (
cont.GetHeader())
630 if (
item.HasQuantity() &&
item.CanBeSplit())
void Inventory(LayoutHolder parent)
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
InventoryLocationType
types of Inventory Location
override void CombineItemsClient(EntityAI entity2, bool use_stack_max=true)
ref Widget m_RootWidget[MAX_SIMULTANIOUS_PLAYERS]
override bool IsPlayerInside(PlayerBase player, string selection)
represents base for cargo storage for entities
override void Remove(LayoutHolder container)
ref CollapsibleHeader m_CollapsibleHeader
void UpdateCollapseButtons()
static ColorManager GetInstance()
override EntityAI GetFocusedItem()
Serializer API implementation for File IO. See Serializer for more info. usage:
script counterpart to engine's class Inventory
static bool CanSwapEntitiesEx(notnull EntityAI item1, notnull EntityAI item2)
static ItemManager GetInstance()
override bool OnChildAdd(Widget w, Widget child)
void OnDropReceivedFromEmptySpace(Widget w, int x, int y, Widget receiver)
void TraverseShowedItems()
override bool SplitItem()
override void CollapseButtonOnMouseButtonDown(Widget w)
const float DISTANCE_TO_THE_REST
void UpdateHeader(EntityAI entity, Container cont, PlayerBase player)
Updates header dragability to be consistent with current 'icon' behaviour.
void OnLeftPanelDropReceived(Widget w, int x, int y, Widget receiver)
ref VicinitySlotsContainer m_VicinityIconsContainer
ref map< int, ref Container > m_ShowedItemsIDs
bool IsContainerWithCargoActive()
override bool OnChildRemove(Widget w, Widget child)
override void UpdateInterval()
ref map< CargoBase, ref Container > m_ShowedCargos
bool IsVicinityContainerIconsActive()
void OnDropReceivedFromIcon(Widget w, int x, int y, Widget receiver)
void VicinityContainer(LayoutHolder parent, int sort=-1)
ref array< EntityAI > m_ShowedItemIcons
bool IsItemWithAttachmentsActive()
override void DraggingOverHeader(Widget w, int x, int y, Widget receiver)
const float DISTANCE_TO_ENTITIES
bool IsItemWithCategoriesActive()
void DraggingOverIcon(Widget w, int x, int y, Widget receiver)
ref map< EntityAI, ref Container > m_ShowedItems
void ToggleContainer(Widget w, EntityAI item)
void ToggleContainer(notnull Container conta)
override void ExpandCollapseContainer()
VicinitySlotsContainer GetVicinityIconsContainer()
override bool CanOpenCloseContainerEx(EntityAI focusedEntity)
override void OnDropReceivedFromHeader(Widget w, int x, int y, Widget receiver)
static VicinityItemManager GetInstance()
proto native CGame GetGame()