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_FactionLoadoutBaseEditorAttribute.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_BaseEditorAttributeCustomTitle
()]
2
class
SCR_FactionLoadoutBaseEditorAttribute
:
SCR_LoadoutBaseEditorAttribute
3
{
4
override
SCR_BaseEditorAttributeVar
ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
5
{
6
//~Todo: Disabled for now
7
return
null;
8
9
SCR_EditableFactionComponent editableFaction = SCR_EditableFactionComponent.Cast(item);
10
if
(!editableFaction)
11
return
null;
12
13
return
SCR_BaseEditorAttributeVar
.
CreateInt
(editableFaction.GetAllowedArsenalItemTypes());
14
}
15
16
override
void
WriteVariable(Managed item,
SCR_BaseEditorAttributeVar
var, SCR_AttributesManagerEditorComponent manager,
int
playerID)
17
{
18
if
(!var)
19
return
;
20
21
SCR_EditableFactionComponent editableFaction = SCR_EditableFactionComponent.Cast(item);
22
if
(!editableFaction)
23
return
;
24
25
//Get the current and add/remove flags as all arsenal attributes edit the same enum and would otherwise override itself
26
SCR_EArsenalItemType
loadOutFlags = editableFaction.GetAllowedArsenalItemTypes();
27
28
int
newArsenalflags = var.
GetInt
();
29
30
foreach
(
SCR_EditorAttributeFloatStringValueHolder
value:
m_aValues
)
31
{
32
//Check if flag is true or not
33
if
(newArsenalflags & (
int
)value.GetFloatValue())
34
loadOutFlags |= (
int
)value.GetFloatValue();
35
else
36
loadOutFlags &= ~(
int
)value.GetFloatValue();
37
}
38
39
//Update the arsenal
40
editableFaction.SetAllowedArsenalItemTypes(loadOutFlags);
41
}
42
43
};
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
m_aValues
SCR_BaseEditorAttributeEntryTimeSlider m_aValues
SCR_EArsenalItemType
SCR_EArsenalItemType
Definition
SCR_EArsenalItemType.c:3
SCR_BaseEditorAttributeCustomTitle
Definition
SCR_BaseEditorAttribute.c:876
SCR_BaseEditorAttributeVar
Definition
SCR_BaseEditorAttributeVar.c:2
SCR_BaseEditorAttributeVar::CreateInt
static SCR_BaseEditorAttributeVar CreateInt(int value)
Definition
SCR_BaseEditorAttributeVar.c:107
SCR_BaseEditorAttributeVar::GetInt
int GetInt()
Definition
SCR_BaseEditorAttributeVar.c:20
SCR_EditorAttributeFloatStringValueHolder
Definition
SCR_BaseFloatValueHolderEditorAttribute.c:61
SCR_FactionLoadoutBaseEditorAttribute
Definition
SCR_FactionLoadoutBaseEditorAttribute.c:3
SCR_LoadoutBaseEditorAttribute
Definition
SCR_LoadoutBaseEditorAttribute.c:4
int
Definition
int.c:13
scripts
Game
Editor
Containers
Attributes
SCR_FactionLoadoutBaseEditorAttribute.c
Generated by
1.17.0