Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_FuelItemHintsUIInfo.c
Go to the documentation of this file.
2 class SCR_FuelItemHintsUIInfo : SCR_InventoryItemHintUIInfo
3 {
4  //------------------------------------------------------------------------------------------------
5  override bool CanBeShown(InventoryItemComponent item, SCR_InventorySlotUI focusedSlot)
6  {
7  if (!item || !super.CanBeShown(item, focusedSlot))
8  return false;
9 
10  return FuelManagerComponent.Cast(item.GetOwner().FindComponent(FuelManagerComponent));
11  }
12 
13  //------------------------------------------------------------------------------------------------
14  override string GetItemHintName(InventoryItemComponent item)
15  {
16  if (!item)
17  return super.GetItemHintName(item);
18 
19  FuelManagerComponent fuelManager = FuelManagerComponent.Cast(item.GetOwner().FindComponent(FuelManagerComponent));
20  if (!fuelManager)
21  return super.GetItemHintName(item);
22 
23  return WidgetManager.Translate(GetName(), SCR_FormatHelper.FloatToStringNoZeroDecimalEndings(fuelManager.GetTotalFuel(), 1), SCR_FormatHelper.FloatToStringNoZeroDecimalEndings(fuelManager.GetTotalMaxFuel(), 1));
24  }
25 }
GetName
string GetName()
Definition: SCR_ScenarioFrameworkLayerBase.c:85
SCR_FormatHelper
Definition: SCR_FormatHelper.c:1
SCR_FuelItemHintsUIInfo
Definition: SCR_FuelItemHintsUIInfo.c:2
InventoryItemComponent
Definition: InventoryItemComponent.c:12
SCR_InventorySlotUI
Definition: SCR_InventorySlotUI.c:27
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468