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_FieldManualConfigLoader.c
Go to the documentation of this file.
1
class
SCR_FieldManualConfigLoader
2
{
3
//------------------------------------------------------------------------------------------------
7
static
SCR_FieldManualConfigRoot
LoadConfigRoot(
ResourceName
configPath)
8
{
9
SCR_FieldManualConfigRoot
result = SCR_ConfigHelperT<SCR_FieldManualConfigRoot>.GetConfigObject(configPath);
10
if
(!result)
11
return
null;
12
13
if
(result.m_aCategories)
14
{
15
foreach
(
SCR_FieldManualConfigCategory
category
: result.m_aCategories)
16
{
17
FillCategories
(
category
);
18
}
19
}
20
21
return
result;
22
}
23
24
//------------------------------------------------------------------------------------------------
25
protected
static
void
FillCategories
(notnull
SCR_FieldManualConfigCategory
category
)
26
{
27
if
(
category
.m_aCategories)
28
{
29
foreach
(
SCR_FieldManualConfigCategory
subCategory :
category
.m_aCategories)
30
{
31
FillCategories
(subCategory);
32
}
33
}
34
35
if
(
category
.m_aEntries)
36
FillEntries
(
category
.m_aEntries);
37
}
38
39
//------------------------------------------------------------------------------------------------
40
protected
static
void
FillEntries
(notnull array<ref SCR_FieldManualConfigEntry> entries)
41
{
42
foreach
(
SCR_FieldManualConfigEntry
entry : entries)
43
{
44
SCR_FieldManualConfigEntry_Weapon
weaponEntry =
SCR_FieldManualConfigEntry_Weapon
.Cast(entry);
45
if
(weaponEntry)
46
FillEntries_Weapon
(weaponEntry);
47
}
48
}
49
50
//------------------------------------------------------------------------------------------------
51
protected
static
void
FillEntries_Weapon
(notnull
SCR_FieldManualConfigEntry_Weapon
weaponEntry)
52
{
53
if
(weaponEntry.m_sWeaponEntityPath.IsEmpty())
54
return
;
55
56
SCR_FieldManualUI_WeaponStatsHelper
weaponStatsHelper =
new
SCR_FieldManualUI_WeaponStatsHelper
(weaponEntry.m_sWeaponEntityPath);
57
58
if
(weaponEntry.m_sTitle.IsEmpty())
59
weaponEntry.m_sTitle = weaponStatsHelper.
GetDisplayName
();
60
61
if
(weaponEntry.m_Image.IsEmpty())
62
weaponEntry.m_Image = weaponStatsHelper.
GetInventoryIcon
();
63
64
if
(!weaponEntry.m_aContent)
65
weaponEntry.m_aContent = {};
66
67
if
(weaponEntry.m_aContent.IsEmpty())
68
weaponEntry.m_aContent.Insert(
new
SCR_FieldManualPiece_Text
());
// will be auto-filled below
69
70
// fill the first empty text with weapon description
71
foreach
(
SCR_FieldManualPiece
piece : weaponEntry.m_aContent)
72
{
73
SCR_FieldManualPiece_Text
textPiece =
SCR_FieldManualPiece_Text
.Cast(weaponEntry.m_aContent[0]);
74
if
(textPiece && textPiece.m_sText.IsEmpty())
75
{
76
textPiece.m_sText = weaponStatsHelper.
GetDescription
();
77
break
;
78
}
79
}
80
81
weaponEntry.m_WeaponStatsHelper = weaponStatsHelper;
82
}
83
}
category
params category
Definition
SCR_VehicleDamageManagerComponent.c:302
ResourceName
Definition
ResourceName.c:13
SCR_FieldManualConfigCategory
Definition
SCR_FieldManualConfigCategory.c:3
SCR_FieldManualConfigEntry_Weapon
Definition
SCR_FieldManualConfigEntry_Weapon.c:3
SCR_FieldManualConfigEntry
Definition
SCR_FieldManualConfigEntry.c:3
SCR_FieldManualConfigLoader
Definition
SCR_FieldManualConfigLoader.c:2
SCR_FieldManualConfigLoader::FillCategories
static void FillCategories(notnull SCR_FieldManualConfigCategory category)
Definition
SCR_FieldManualConfigLoader.c:25
SCR_FieldManualConfigLoader::FillEntries_Weapon
static void FillEntries_Weapon(notnull SCR_FieldManualConfigEntry_Weapon weaponEntry)
Definition
SCR_FieldManualConfigLoader.c:51
SCR_FieldManualConfigLoader::FillEntries
static void FillEntries(notnull array< ref SCR_FieldManualConfigEntry > entries)
Definition
SCR_FieldManualConfigLoader.c:40
SCR_FieldManualConfigRoot
Definition
SCR_FieldManualConfigRoot.c:3
SCR_FieldManualPiece_Text
Definition
SCR_FieldManualPiece_Text.c:3
SCR_FieldManualPiece
Definition
SCR_FieldManualPiece.c:3
SCR_FieldManualUI_WeaponStatsHelper
Definition
SCR_FieldManualUI_WeaponStatsHelper.c:2
SCR_FieldManualUI_WeaponStatsHelper::GetInventoryIcon
ResourceName GetInventoryIcon()
Definition
SCR_FieldManualUI_WeaponStatsHelper.c:23
SCR_FieldManualUI_WeaponStatsHelper::GetDisplayName
string GetDisplayName()
Definition
SCR_FieldManualUI_WeaponStatsHelper.c:16
SCR_FieldManualUI_WeaponStatsHelper::GetDescription
string GetDescription()
Definition
SCR_FieldManualUI_WeaponStatsHelper.c:30
scripts
Game
FieldManual
SCR_FieldManualConfigLoader.c
Generated by
1.17.0