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_EntityBudgetValue.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_BaseContainerCustomTitleEnum
(
EEditableEntityBudget
,
"m_BudgetType"
)]
2
class
SCR_EntityBudgetValue
3
{
4
[
Attribute
(
"0"
,
UIWidgets
.SearchComboBox,
""
, enums: ParamEnumArray.FromEnum(
EEditableEntityBudget
))]
5
private
EEditableEntityBudget
m_BudgetType;
6
7
[
Attribute
(
"0"
,
UIWidgets
.Auto,
""
)]
8
private
int
m_Value;
9
10
EEditableEntityBudget
GetBudgetType()
11
{
12
return
m_BudgetType;
13
}
14
15
int
GetBudgetValue()
16
{
17
return
m_Value;
18
}
19
20
void
SetBudgetValue(
int
newValue)
21
{
22
m_Value = newValue;
23
}
24
25
bool
AddBudgetValue(SCR_EntityBudgetValue entityBudgetValue)
26
{
27
if
(entityBudgetValue.GetBudgetType() == GetBudgetType())
28
{
29
m_Value += entityBudgetValue.GetBudgetValue();
30
return
true
;
31
}
32
return
false
;
33
}
34
35
static
void
MergeBudgetCosts(out notnull array<ref SCR_EntityBudgetValue> outExistingBudgets, array<ref SCR_EntityBudgetValue> newBudgetCosts)
36
{
37
foreach
(SCR_EntityBudgetValue newBudgetCost : newBudgetCosts)
38
{
39
bool
budgetExists =
false
;
40
foreach
(SCR_EntityBudgetValue existingBudget : outExistingBudgets)
41
{
42
if
(existingBudget.AddBudgetValue(newBudgetCost))
43
{
44
budgetExists =
true
;
45
break
;
46
}
47
}
48
if
(!budgetExists)
49
{
50
outExistingBudgets.Insert(newBudgetCost);
51
}
52
}
53
}
54
55
static
void
AddBudgetValueToBudgetArray(out notnull array<ref SCR_EntityBudgetValue> budgets,
EEditableEntityBudget
budgetType,
int
value)
56
{
57
foreach
(SCR_EntityBudgetValue budgetValue : budgets)
58
{
59
if
(budgetValue.GetBudgetType() == budgetType)
60
{
61
budgetValue.SetBudgetValue(budgetValue.GetBudgetValue() + value);
62
return
;
63
}
64
}
65
66
budgets.Insert(
new
SCR_EntityBudgetValue(budgetType, value));
67
}
68
69
void
SCR_EntityBudgetValue(
EEditableEntityBudget
budgetType,
int
budgetValue = -1)
70
{
71
if
(budgetValue == -1)
return
;
72
m_BudgetType = budgetType;
73
m_Value = budgetValue;
74
}
75
};
EEditableEntityBudget
EEditableEntityBudget
Definition
EEditableEntityBudget.c:2
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_BaseContainerCustomTitleEnum
class SCR_CampaignHintStorage SCR_BaseContainerCustomTitleEnum(EHint, "m_eHintId")
Definition
SCR_CampaignHintStorage.c:22
UIWidgets
Definition
attributes.c:40
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Editor
Containers
EditableEntityCore
SCR_EntityBudgetValue.c
Generated by
1.17.0