4 const string SLOT_LAYOUT_SUPPLY =
"{AF25F325D2730142}UI/layouts/Menus/Inventory/SupplyInventoryItemSlot.layout";
5 const float SLOT_UNAVAILABLE_OPACITY = 0.35;
39 string slotLayout = SLOT_LAYOUT_SUPPLY;
70 if (
m_pItem.GetOwner().FindComponent(BaseInventoryStorageComponent))
92 if (storage.
UseItem(item, overrideSlotFunction, context))
114 return storage.
CanUseItem(item, overrideSlotFunction);
120 if (!super.IsDraggable())
130 super.SetSlotVisible(bVisible);
146 resourceCost.SetVisible(
false);
163 float totalResources, maxResources;
193 float additionalTotalResources, additionalMaxResources;
212 RplComponent rpl = RplComponent.Cast(
Replication.FindItem(
id));
220 SCR_ResourceComponent resComp = SCR_ResourceComponent.Cast(ent.
FindComponent(SCR_ResourceComponent));
224 float addTotal, addMax;
227 addTotalResources += addTotal;
228 addMaxResources += addMax;
260 super.HandlerAttached(w);
268 super.HandlerDeattached(w);
294 if (!resourceInventoryPlayerComponent)
297 RplId resourceInventoryPlayerComponentRplId =
Replication.FindItemId(resourceInventoryPlayerComponent);
299 if (!resourceInventoryPlayerComponentRplId.IsValid())
ArmaReforgerScripted GetGame()
proto external Managed FindComponent(typename typeName)
Replication item identifier.
bool UseItem(notnull IEntity item, ESlotFunction slotFunction=ESlotFunction.TYPE_GENERIC, SCR_EUseContext context=SCR_EUseContext.FROM_QUICKSLOT)
bool CanUseItem(notnull IEntity item, ESlotFunction slotFunction=ESlotFunction.TYPE_GENERIC)
void SCR_InventorySlotUI(InventoryItemComponent pComponent=null, SCR_InventoryStorageBaseUI pStorageUI=null, bool bVisible=true, int iSlotIndex=-1, SCR_ItemAttributeCollection pAttributes=null)
SCR_CharacterInventoryStorageComponent GetCharacterStorage(IEntity entity)
ESlotFunction m_eSlotFunction
ref SCR_ItemAttributeCollection m_Attributes
InventoryItemComponent m_pItem
static IEntity GetLocalControlledEntity()
SCR_ResourceConsumer m_ResourceConsumer
TextWidget m_AvailableResourcesText
override void HandlerAttached(Widget w)
ref array< RplId > m_aStackedItems
override void SetSlotVisible(bool bVisible)
override bool IsDraggable()
ref SCR_ResourceSystemSubscriptionHandleBase m_ResourceSubscriptionHandle
override void OnOwnedSlotsUpdated()
void GetAdditionalResourceValuesFromStack(out float addTotalResources, out float addMaxResources)
void UpdateStoredResources(bool showUI, float totalResources, float maxResources)
const string AVAILABLE_RESOURCES_WIDGET_NAME
override bool CanUseItem(IEntity player)
override void UseItem(IEntity player, SCR_EUseContext context)
const string COST_RESOURCES_WIDGET_NAME
EResourceType m_eResourceType
SCR_ResourceComponent m_ResourceComponent
Widget m_AvailableResourcesHolder
override void SetItemFunctionality()
LocalizedString m_sCurrentAndMaxResourceFormat
override void HandlerDeattached(Widget w)
void SCR_SupplyInventorySlotUI(InventoryItemComponent pComponent=null, SCR_InventoryStorageBaseUI pStorageUI=null, bool bVisible=true, int iSlotIndex=-1, SCR_ItemAttributeCollection pAttributes=null)
Widget m_StoredResourcesHolder
const string RESOURCES_TEXT_WIDGET_NAME
SCR_ResourceComponent GetResourceComponent()
void UpdateAvailableResources(bool showUI, float totalResources)
override void IncreaseStackNumberWithRplId(RplId id)
TextWidget m_StoredResourcesText
const string STORED_RESOURCES_WIDGET_NAME
proto external PlayerController GetPlayerController()