Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
EditablePrefabsLabel_Faction.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_BaseContainerCustomTitleEnum
(
EEditableEntityLabel
,
"m_Label"
)]
2
class
EditablePrefabsLabel_Faction
:
EditablePrefabsLabel_Base
3
{
4
[
Attribute
()]
5
protected
FactionKey
m_FactionToCheck
;
6
7
//------------------------------------------------------------------------------------------------
8
override
bool
GetLabelValid
(
WorldEditorAPI
api,
IEntitySource
entitySource,
IEntityComponentSource
componentSource,
string
targetPath,
EEditableEntityType
entityType, notnull array<EEditableEntityLabel> authoredLabels, out
EEditableEntityLabel
label)
9
{
10
IEntityComponentSource
factionComponentSource =
SCR_BaseContainerTools
.FindComponentSource(entitySource, FactionAffiliationComponent);
11
IEntityComponentSource
factionControlComponentSource =
SCR_BaseContainerTools
.FindComponentSource(entitySource,
SCR_FactionAffiliationComponent
);
12
FactionKey
factionKey =
string
.Empty;
13
if
(factionComponentSource)
14
factionComponentSource.Get(
"faction affiliation"
, factionKey);
15
else
if
(factionControlComponentSource)
16
factionControlComponentSource.Get(
"m_DefaultFaction"
, factionKey);
17
18
// Check if faction was set through authored labels, override
19
bool
factionLabelAuthored = authoredLabels.Contains(
m_Label
);
20
if
(factionLabelAuthored)
21
factionKey =
m_FactionToCheck
;
22
23
if
(factionKey !=
string
.Empty && factionKey ==
m_FactionToCheck
)
24
{
25
// Set faction on Editable Entity UIInfo, used for a lot of... ui info
26
array<ref ContainerIdPathEntry> UIInfoPath = {
ContainerIdPathEntry
(componentSource.GetClassName()),
ContainerIdPathEntry
(
"m_UIInfo"
) };
27
api.SetVariableValue(entitySource, UIInfoPath,
"m_sFaction"
,
m_FactionToCheck
);
28
label =
m_Label
;
29
30
// Only add the auto label if faction label was not authored
31
return
!factionLabelAuthored;
32
}
33
34
return
false
;
35
}
36
}
ContainerIdPathEntry
void ContainerIdPathEntry(string propertyName, int index=-1)
Definition
worldEditor.c:30
EEditableEntityLabel
EEditableEntityLabel
Definition
EEditableEntityLabel.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
EditablePrefabsLabel_Base
Definition
EditablePrefabsLabel_Base.c:3
EditablePrefabsLabel_Base::m_Label
EEditableEntityLabel m_Label
Definition
EditablePrefabsLabel_Base.c:5
EditablePrefabsLabel_Faction
Definition
EditablePrefabsLabel_Faction.c:3
EditablePrefabsLabel_Faction::m_FactionToCheck
FactionKey m_FactionToCheck
Definition
EditablePrefabsLabel_Faction.c:5
EditablePrefabsLabel_Faction::GetLabelValid
override bool GetLabelValid(WorldEditorAPI api, IEntitySource entitySource, IEntityComponentSource componentSource, string targetPath, EEditableEntityType entityType, notnull array< EEditableEntityLabel > authoredLabels, out EEditableEntityLabel label)
Definition
EditablePrefabsLabel_Faction.c:8
FactionKey
Definition
FactionKey.c:3
IEntityComponentSource
Definition
IEntityComponentSource.c:13
IEntitySource
Definition
IEntitySource.c:13
SCR_BaseContainerTools
Definition
SCR_BaseContainerTools.c:4
SCR_FactionAffiliationComponent
Definition
SCR_FactionAffiliationComponent.c:11
WorldEditorAPI
Definition
WorldEditorAPI.c:13
EEditableEntityType
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
Definition
EEditableEntityType.c:6
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
WorkbenchGame
Editor
EditablePrefabsComponent
LabelsConfig
EditablePrefabsLabel_Faction.c
Generated by
1.17.0