30 con.SetColumnCount(0);
31 con.SetForceShow(
true);
42 return ent && (
ent.GetInventory().GetCargo() || (
ent.GetSlotsCountCorrect() > 0 &&
ent.CanDisplayAnyAttachmentSlot()));
73 return ent.IsTakeable();
96 res =
GetGame().GetPlayer().PredictiveTakeOrSwapAttachment(
ent);
119 if (CanTakeToInventory())
124 if (
ent.IsTakeable())
186 if (
ent &&
ent.GetInventory().CanRemoveEntity())
201 GetGame().GetPlayer().PredictiveTakeEntityToHands(
ent);
217 if (
c &&
c.GetMainWidget())
234 return GetFocusedContainer().GetColumnCount();
273 icon.GetMainWidget().Show(
true);
274 icon.GetPanelWidget().SetUserID(
item.GetID());
278 icon.UpdateInterval();
295 conta.UpdateRadialIcon();
298 icon.GetRadialIconPanel().Show(
false);
309 icon.GetMainWidget().Show(
false);
317 slots_last.GetSlotIcon(0).GetMainWidget().Show(
true);
318 slots_last.GetSlotIcon(0).GetGhostSlot().Show(
false);
335 string name =
w.GetName();
336 name.Replace(
"PanelWidget",
"Render");
347 if (!
item.IsTakeable())
353 if (!
item.GetInventory().CanRemoveEntity())
364 if (
dst.IsValid() &&
player.GetInventory().LocationCanAddEntity(
dst))
371 menu.RefreshQuickbar();
392 int max =
item.GetQuantityMax();
418 int max =
item.GetQuantityMax();
419 bool bar =
item.ConfigGetBool(
"quantityBar");
451 string name =
w.GetName();
452 name.Replace(
"PanelWidget",
"Render");
462 string name =
w.GetName();
463 name.Replace(
"PanelWidget",
"Render");
505 string name =
w.GetName();
506 name.Replace(
"PanelWidget",
"Render");
520 if (!
item.GetInventory().CanRemoveEntity())
525 if (
item.GetTargetQuantityMax() <
item.GetQuantity())
526 item.SplitIntoStackMaxClient(
null, -1);
578 RecomputeOpenedContainers();
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
FindInventoryLocationType
flags for searching locations in inventory
Super root of all classes in Enforce script.
override EntityAI GetFocusedItem()
script counterpart to engine's class Inventory
static bool CanSwapEntitiesEx(notnull EntityAI item1, notnull EntityAI item2)
static ItemManager GetInstance()
static int HasItemQuantity(notnull EntityAI item)
static void TakeOrSplitToInventoryLocation(notnull PlayerBase player, notnull InventoryLocation dst)
bool ExcludeFromContainer(EntityAI item)
Decides on the icon visibility.
int HasItemQuantity(EntityAI item)
bool IsItemWithContainerActive()
void ShowItemsInContainers(array< EntityAI > items)
override void SetLayoutName()
void ~VicinitySlotsContainer()
float GetItemQuantity(InventoryItem item)
override bool IsItemActive()
override bool TransferItem()
string GetItemQuantityText(EntityAI item)
override void OnDropReceivedFromHeader(Widget w, int x, int y, Widget receiver)
override bool CanCombineAmmo()
override bool EquipItem()
override bool IsItemWithQuantityActive()
void VicinitySlotsContainer(LayoutHolder parent)
override bool InspectItem()
void DoubleClick(Widget w, int x, int y, int button)
void MouseButtonDown(Widget w, int x, int y, int button)
ref array< EntityAI > m_ShowedItems
override bool IsDisplayable()
void RecomputeNumberOfContainers(array< EntityAI > items)
void MouseClick(Widget w, int x, int y, int button)
ref AttachmentsGroupContainer m_Container
proto native CGame GetGame()
const int QUANTITY_PROGRESS
const int QUANTITY_HIDDEN
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto float Floor(float f)
Returns floor of value.
static proto float Round(float f)
Returns mathematical round of value.