18 m_ClosableHeader.GetMainWidget().ClearFlags(
WidgetFlags.DRAGGABLE);
20 RecomputeOpenedContainers();
32 return icon.GetSlotID();
129 if (CanTakeToInventory())
153 if (
item.GetTargetQuantityMax() <
item.GetQuantity())
154 item.SplitIntoStackMaxClient(
null, -1);
289 return GetFocusedItem() !=
null && (!
icon || !
icon.IsOutOfReach());
326 if (!
item.GetInventory().CanRemoveEntity() || !
player.CanManipulateInventory())
334 if (
player.GetWeaponManager().CanAttachMagazine(
wpn,
mag))
335 player.GetWeaponManager().AttachMagazine(
mag);
383 Widget w =
Get(
i).GetMainWidget().FindAnyWidget(
"Cursor" +
j);
402 string name =
w.GetName();
403 name.Replace(
"PanelWidget",
"Render");
415 name.Replace(
"PanelWidget",
"Render");
505 if (
w.FindAnyWidget(
"Cursor"))
506 w.FindAnyWidget(
"Cursor").SetColor(
color);
509 string name =
w.GetName();
510 name.Replace(
"PanelWidget",
"Cursor");
511 if (
w.FindAnyWidget(
name))
570 string name =
w.GetName();
571 name.Replace(
"PanelWidget",
"Render");
578 return ipw.GetItem();
619 icon.GetMainWidget().Show(
false);
623 if (
icon.GetEntity())
625 icon.ClearRemainSelected();
635 icon.GetMainWidget().Show(
true);
639 icon.GetMainWidget().Show(
true);
666 SetOpenForSlotIcon(
cont.IsOpened(),
icon);
671 icon.GetRadialIconPanel().Show(
cont.IsDisplayable());
680 icon.GetMountedWidget().Show(
true);
684 icon.GetMountedWidget().Show(
false);
690 icon.GetOutOfReachWidget().Show(
false);
693 icon.GetOutOfReachWidget().Show(
true);
711 string name =
w.GetName();
712 name.Replace(
"PanelWidget",
"Render");
725 if (
icon.IsOutOfReach())
731 if (!
item.GetInventory().CanRemoveEntity())
741 if (
item.GetTargetQuantityMax() <
item.GetQuantity())
750 if (
item.GetTargetQuantityMax() <
item.GetQuantity())
761 name.Replace(
"PanelWidget",
"Temperature");
762 w.FindAnyWidget(
name).Show(
false);
781 if (
g_Game.IsLeftCtrlDown())
793 if (
g_Game.IsLeftCtrlDown())
795 if (
icon.IsOutOfReach())
898 super.UpdateInterval();
void Remove(Object object)
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
PlayerSpawnPreset slotName
FindInventoryLocationType
flags for searching locations in inventory
override void CombineItemsClient(EntityAI entity2, bool use_stack_max=true)
array< ref PlayerStatBase > Get()
void MouseClick(Widget w, int x, int y, int button)
override bool CanSplitEx(EntityAI focusedItem)
override void UpdateInterval()
override bool TransferItemToVicinity()
override void OnDropReceivedFromHeader(Widget w, int x, int y, Widget receiver)
override bool IsItemWithQuantityActive()
override bool IsItemActive()
override bool CanCombineAmmo()
ref AttachmentsGroupContainer m_AttachmentsContainer
void Init(int attachments_categories_count, int i, string attachment_category, string config_path_attachment_categories, EntityAI entity, int parent_m_Body_count)
override void UnfocusAll()
void DoubleClick(Widget w, int x, int y, int button)
override bool TransferItem()
ref map< int, ref ContainerWithCargo > m_AttachmentCargos
string m_CategoryIdentifier
void AttachmentCategoriesRow(LayoutHolder parent, int sort=-1)
void RefreshSlot(int row, int column, int slot_id, string slot_name)
void DropReceived(Widget w, int x, int y, CargoContainer cargo)
override void DraggingOverHeader(Widget w, int x, int y, Widget receiver)
override bool SplitItem()
bool DraggingOverGrid(Widget w, int x, int y, Widget reciever, CargoContainer cargo)
string GetCategoryIdentifier()
override bool CanCombine()
override bool EquipItem()
EntityAI GetItemPreviewItem(Widget w)
static bool IsAttachmentReachable(EntityAI e, string att_slot_name="", int slot_id=-1, float range=1.5)
represents base for cargo storage for entities
Super root of all classes in Enforce script.
override bool InspectItem()
void ContainerWithCargo(Container parent, int sort=-1)
static ColorManager GetInstance()
script counterpart to engine's class Inventory
static bool CanSwapEntitiesEx(notnull EntityAI item1, notnull EntityAI item2)
provides access to slot configuration
static proto native int GetStackMaxForSlotId(int slot_Id)
static proto native owned string GetSlotName(int id)
converts slot_id to string
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 void TakeOrSplitToInventoryLocation(notnull PlayerBase player, notnull InventoryLocation dst)
static void TakeOrSplitToInventory(notnull PlayerBase player, notnull EntityAI target, notnull EntityAI item)
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.
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.