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_CampaignBuildingOpenedLabelHintCondition.c
Go to the documentation of this file.
1
[
BaseContainerProps
(), SCR_BaseContainerHintCondition()]
2
class
SCR_CampaignBuildingOpenedLabelHintCondition
:
SCR_BaseEditorHintCondition
3
{
4
[
Attribute
(defvalue:
"1"
, uiwidget:
UIWidgets
.ComboBox,
desc
:
"A label provider has to have to show a hint."
, enums: ParamEnumArray.FromEnum(
EEditableEntityLabel
))]
5
protected
EEditableEntityLabel
m_eLabel
;
6
7
//------------------------------------------------------------------------------------------------
8
override
protected
void
OnInitConditionEditor
(
SCR_EditorManagerEntity
editorManager)
9
{
10
if
(!
HasLabelSet
())
11
return
;
12
13
editorManager.GetOnOpened().Insert(
Activate
);
14
editorManager.GetOnClosed().Insert(
Deactivate
);
15
}
16
17
//------------------------------------------------------------------------------------------------
18
override
protected
void
OnExitConditionEditor
(
SCR_EditorManagerEntity
editorManager)
19
{
20
if
(!
HasLabelSet
())
21
return
;
22
23
editorManager.GetOnOpened().Remove(
Activate
);
24
editorManager.GetOnClosed().Remove(
Deactivate
);
25
}
26
27
//------------------------------------------------------------------------------------------------
30
bool
HasLabelSet
()
31
{
32
SCR_CampaignBuildingEditorComponent CampaignBuildingEditorComponent = SCR_CampaignBuildingEditorComponent.Cast(SCR_CampaignBuildingEditorComponent.GetInstance(SCR_CampaignBuildingEditorComponent));
33
if
(!CampaignBuildingEditorComponent)
34
return
false
;
35
36
SCR_CampaignBuildingProviderComponent providerComponent = CampaignBuildingEditorComponent.GetProviderComponent();
37
if
(!providerComponent)
38
return
false
;
39
40
array<EEditableEntityLabel> providerTraits = providerComponent.GetAvailableTraits();
41
if
(providerTraits.Contains(
EEditableEntityLabel
.SERVICE_HQ) && !SCR_CampaignBuildingProviderComponent.CanBeUsedToEstablishBase(providerComponent.GetOwner(),
SCR_PlayerController
.s_pLocalPlayerController.GetPlayerId()))
42
providerTraits.RemoveItem(
EEditableEntityLabel
.SERVICE_HQ);
43
44
return
providerTraits.Contains(
m_eLabel
);
45
}
46
}
EEditableEntityLabel
EEditableEntityLabel
Definition
EEditableEntityLabel.c:2
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_EditorManagerEntity
void SCR_EditorManagerEntity(IEntitySource src, IEntity parent)
Definition
SCR_EditorManagerEntity.c:2211
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
SCR_BaseEditorHintCondition
Definition
SCR_BaseEditorHintCondition.c:3
SCR_BaseHintCondition::Activate
void Activate()
Definition
SCR_BaseHintCondition.c:11
SCR_BaseHintCondition::Deactivate
void Deactivate()
Definition
SCR_BaseHintCondition.c:29
SCR_CampaignBuildingOpenedLabelHintCondition
Definition
SCR_CampaignBuildingOpenedLabelHintCondition.c:3
SCR_CampaignBuildingOpenedLabelHintCondition::OnInitConditionEditor
void OnInitConditionEditor(SCR_EditorManagerEntity editorManager)
Definition
SCR_CampaignBuildingOpenedLabelHintCondition.c:8
SCR_CampaignBuildingOpenedLabelHintCondition::HasLabelSet
bool HasLabelSet()
Definition
SCR_CampaignBuildingOpenedLabelHintCondition.c:30
SCR_CampaignBuildingOpenedLabelHintCondition::m_eLabel
EEditableEntityLabel m_eLabel
Definition
SCR_CampaignBuildingOpenedLabelHintCondition.c:5
SCR_CampaignBuildingOpenedLabelHintCondition::OnExitConditionEditor
void OnExitConditionEditor(SCR_EditorManagerEntity editorManager)
Definition
SCR_CampaignBuildingOpenedLabelHintCondition.c:18
SCR_PlayerController
Definition
SCR_PlayerController.c:31
UIWidgets
Definition
attributes.c:40
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Components
Hints
HintConditions
SCR_CampaignBuildingOpenedLabelHintCondition.c
Generated by
1.17.0