Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkActionShowItemSlotHint.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_ContainerActionTitle
()]
2
class
SCR_ScenarioFrameworkActionShowItemSlotHint
:
SCR_ScenarioFrameworkActionShowHint
3
{
4
[
Attribute
(
desc
:
"Get an item you want to find in player quick slots."
)]
5
ref
SCR_ScenarioFrameworkGet
m_ItemGetter;
6
7
[
Attribute
()]
8
string
m_sItemDescriptionText;
9
10
//------------------------------------------------------------------------------------------------
11
override
void
ComposeHintText
()
12
{
13
m_sText = m_sText +
DOUBLE_LINE_SPACE
+ m_sItemDescriptionText +
DOUBLE_LINE_SPACE
+
string
.Format(
"<action name='%1' scale='1.7'/>"
, GetQuickSlotAction());
14
15
super.ComposeHintText();
16
}
17
18
//------------------------------------------------------------------------------------------------
19
string
GetQuickSlotAction()
20
{
21
IEntity
item;
22
if
(m_ItemGetter)
23
{
24
SCR_ScenarioFrameworkParam<IEntity> entityWrapper = SCR_ScenarioFrameworkParam<IEntity>.Cast(m_ItemGetter.Get());
25
if
(!entityWrapper)
26
return
string
.Empty;
27
28
item = entityWrapper.GetValue();
29
}
30
31
SCR_CharacterInventoryStorageComponent
PlayerInventoryManager =
SCR_CharacterInventoryStorageComponent
.Cast(
EntityUtils
.GetPlayer().
FindComponent
(
SCR_CharacterInventoryStorageComponent
));
32
if
(!PlayerInventoryManager)
33
return
string
.Empty;
34
35
// Index needs to be increased +1 as the slots are numbered 1 to 10.
36
int
itemIndex = PlayerInventoryManager.
GetEntityIndexInQuickslots
(item) +1;
37
38
return
"InventoryQuickSlot"
+
string
.ToString(itemIndex);
39
}
40
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
EntityUtils
Definition
EntityUtils.c:13
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
SCR_CharacterInventoryStorageComponent
Definition
SCR_CharacterInventoryStorageComponent.c:90
SCR_CharacterInventoryStorageComponent::GetEntityIndexInQuickslots
int GetEntityIndexInQuickslots(notnull IEntity entity)
Definition
SCR_CharacterInventoryStorageComponent.c:1624
SCR_ContainerActionTitle
Definition
SCR_ContainerActionTitle.c:2
SCR_ScenarioFrameworkActionShowHint
Definition
SCR_ScenarioFrameworkActionShowHint.c:3
SCR_ScenarioFrameworkActionShowHint::ComposeHintText
void ComposeHintText()
Definition
SCR_ScenarioFrameworkActionShowHint.c:106
SCR_ScenarioFrameworkActionShowHint::DOUBLE_LINE_SPACE
static const string DOUBLE_LINE_SPACE
Definition
SCR_ScenarioFrameworkActionShowHint.c:25
SCR_ScenarioFrameworkActionShowItemSlotHint
Definition
SCR_ScenarioFrameworkActionShowItemSlotHint.c:3
SCR_ScenarioFrameworkGet
Definition
SCR_ScenarioFrameworkGet.c:3
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
ScenarioFramework
Actions
SCR_ScenarioFrameworkActionShowItemSlotHint.c
Generated by
1.17.0