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_FactionCommanderCommandConflictBaseMenuHandler.c
Go to the documentation of this file.
1
[
BaseContainerProps
()]
2
class
SCR_FactionCommanderCommandConflictBaseMenuHandler
:
SCR_FactionCommanderConflictBaseMenuHandler
3
{
4
[
Attribute
(
desc
:
"If checked, player commander can only place this command on enemy base"
)]
5
protected
bool
m_bMustPlaceOnEnemyBase
;
6
7
[
Attribute
(
"0 0 0"
,
desc
:
"Task offset"
)]
8
protected
vector
m_vPositionOffset
;
9
10
//------------------------------------------------------------------------------------------------
11
override
bool
CanCreateObjectiveEntryBeShown
(notnull
Faction
commanderFaction,
int
playerId,
vector
position
,
IEntity
hoveredEntity)
12
{
13
if
(!super.CanCreateObjectiveEntryBeShown(commanderFaction, playerId,
position
, hoveredEntity))
14
return
false
;
15
16
SCR_Task
task
=
GetTask
(hoveredEntity, commanderFaction,
GetTaskPrefabClassTypename
());
17
if
(
task
)
18
return
false
;
19
20
return
true
;
21
}
22
23
//------------------------------------------------------------------------------------------------
24
override
bool
CanQuickEntryBeShown
(notnull
Faction
commanderFaction,
int
playerId,
vector
position
,
IEntity
hoveredEntity)
25
{
26
if
(!super.CanQuickEntryBeShown(commanderFaction, playerId,
position
, hoveredEntity))
27
return
false
;
28
29
return
IsTaskValid
(hoveredEntity);
30
}
31
32
//------------------------------------------------------------------------------------------------
33
override
bool
CanEntryBeSelected
(notnull
Faction
commanderFaction,
int
playerId,
vector
position
,
IEntity
hoveredEntity, out
string
disabledText =
""
)
34
{
35
SCR_CampaignMilitaryBaseComponent
hoveredBase =
GetHoveredBase
();
36
if
(!hoveredBase)
37
{
38
disabledText =
BASE_NOT_SELECTED_TEXT
;
39
return
false
;
40
}
41
42
SCR_CampaignFaction
campaignFaction =
SCR_CampaignFaction
.Cast(commanderFaction);
43
if
(!campaignFaction)
44
return
false
;
45
46
SCR_Task
task
=
GetTask
(hoveredEntity, commanderFaction,
GetTaskPrefabClassTypename
());
47
if
(!
m_bIsObjectiveCreationEnabled
&& !
task
)
48
return
false
;
49
50
if
(
m_bMustPlaceOnEnemyBase
)
51
return
hoveredBase.
IsValidTarget
(campaignFaction);
52
53
return
hoveredBase.GetFaction() == commanderFaction;
54
}
55
56
//------------------------------------------------------------------------------------------------
57
override
bool
CanGroupEntryBeShown
(notnull
Faction
commanderFaction,
int
playerId,
vector
position
,
IEntity
hoveredEntity,
SCR_AIGroup
group)
58
{
59
SCR_Task
task
=
GetTask
(hoveredEntity, commanderFaction,
GetTaskPrefabClassTypename
());
60
if
(!
m_bIsObjectiveCreationEnabled
&& !
task
)
61
return
false
;
62
63
if
(!super.CanGroupEntryBeShown(commanderFaction, playerId,
position
, hoveredEntity, group))
64
return
false
;
65
66
return
true
;
67
}
68
69
//------------------------------------------------------------------------------------------------
70
override
bool
CanGroupEntryBeSelected
(notnull
Faction
commanderFaction,
int
playerId,
vector
position
,
IEntity
hoveredEntity,
SCR_AIGroup
group, out
string
disabledText =
""
)
71
{
72
if
(!super.CanGroupEntryBeSelected(commanderFaction, playerId,
position
, hoveredEntity, group))
73
return
false
;
74
75
return
CanCampaignGroupEntryBeSelected
(commanderFaction, hoveredEntity, group,
GetTaskPrefabClassTypename
());
76
}
77
78
//------------------------------------------------------------------------------------------------
79
override
void
OnCommandIssued
(notnull
Faction
commanderFaction,
int
playerId,
vector
position
,
IEntity
hoveredEntity,
SCR_AIGroup
group)
80
{
81
SCR_CampaignFactionCommanderPlayerComponent factionCommanderPlayerComponent =
GetLocalCampaignCommanderComponent
();
82
if
(!factionCommanderPlayerComponent)
83
return
;
84
85
SCR_Task
task
=
GetTask
(hoveredEntity, commanderFaction,
GetTaskPrefabClassTypename
());
86
if
(!
task
)
87
{
88
factionCommanderPlayerComponent.CreateCampaignMilitaryBaseTask(
GetTaskPrefab
(), group, playerId,
m_vPositionOffset
);
89
return
;
90
}
91
92
if
(group)
93
factionCommanderPlayerComponent.AssignGroupToTask(group.
GetGroupID
(),
task
.GetTaskID());
94
}
95
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
position
vector position
Definition
SCR_DestructibleTreeV2.c:30
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
GetTask
SCR_ScenarioFrameworkTask GetTask()
Definition
SCR_ScenarioFrameworkLayerTask.c:131
SCR_Task
void SCR_Task(IEntitySource src, IEntity parent)
Definition
SCR_Task.c:1938
task
from task
Definition
SCR_TaskNotificationConfigs.c:12
Faction
Definition
Faction.c:13
IEntity
Definition
IEntity.c:13
SCR_AIGroup
Definition
SCR_AIGroup.c:75
SCR_AIGroup::GetGroupID
int GetGroupID()
Definition
SCR_AIGroup.c:935
SCR_CampaignFaction
Definition
SCR_CampaignFaction.c:2
SCR_CampaignMilitaryBaseComponent
Definition
SCR_CampaignMilitaryBaseComponent.c:38
SCR_CampaignMilitaryBaseComponent::IsValidTarget
bool IsValidTarget(notnull SCR_CampaignFaction faction)
Definition
SCR_CampaignMilitaryBaseComponent.c:400
SCR_FactionCommanderBaseTaskMenuHandler::GetTaskPrefab
ResourceName GetTaskPrefab()
Definition
SCR_FactionCommanderBaseTaskMenuHandler.c:5
SCR_FactionCommanderBaseTaskMenuHandler::IsTaskValid
bool IsTaskValid(IEntity hoveredEntity)
Definition
SCR_FactionCommanderBaseTaskMenuHandler.c:18
SCR_FactionCommanderBaseTaskMenuHandler::GetTaskPrefabClassTypename
GetTaskPrefabClassTypename()
Definition
SCR_FactionCommanderBaseTaskMenuHandler.c:36
SCR_FactionCommanderCommandConflictBaseMenuHandler
Definition
SCR_FactionCommanderCommandConflictBaseMenuHandler.c:3
SCR_FactionCommanderCommandConflictBaseMenuHandler::CanCreateObjectiveEntryBeShown
override bool CanCreateObjectiveEntryBeShown(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity)
Definition
SCR_FactionCommanderCommandConflictBaseMenuHandler.c:11
SCR_FactionCommanderCommandConflictBaseMenuHandler::CanGroupEntryBeShown
override bool CanGroupEntryBeShown(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity, SCR_AIGroup group)
Definition
SCR_FactionCommanderCommandConflictBaseMenuHandler.c:57
SCR_FactionCommanderCommandConflictBaseMenuHandler::CanQuickEntryBeShown
override bool CanQuickEntryBeShown(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity)
Definition
SCR_FactionCommanderCommandConflictBaseMenuHandler.c:24
SCR_FactionCommanderCommandConflictBaseMenuHandler::m_bMustPlaceOnEnemyBase
bool m_bMustPlaceOnEnemyBase
Definition
SCR_FactionCommanderCommandConflictBaseMenuHandler.c:5
SCR_FactionCommanderCommandConflictBaseMenuHandler::CanEntryBeSelected
override bool CanEntryBeSelected(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity, out string disabledText="")
Definition
SCR_FactionCommanderCommandConflictBaseMenuHandler.c:33
SCR_FactionCommanderCommandConflictBaseMenuHandler::OnCommandIssued
override void OnCommandIssued(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity, SCR_AIGroup group)
Definition
SCR_FactionCommanderCommandConflictBaseMenuHandler.c:79
SCR_FactionCommanderCommandConflictBaseMenuHandler::m_vPositionOffset
vector m_vPositionOffset
Definition
SCR_FactionCommanderCommandConflictBaseMenuHandler.c:8
SCR_FactionCommanderCommandConflictBaseMenuHandler::CanGroupEntryBeSelected
override bool CanGroupEntryBeSelected(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity, SCR_AIGroup group, out string disabledText="")
Definition
SCR_FactionCommanderCommandConflictBaseMenuHandler.c:70
SCR_FactionCommanderConflictBaseMenuHandler
Definition
SCR_FactionCommanderConflictBaseMenuHandler.c:3
SCR_FactionCommanderConflictBaseMenuHandler::CanCampaignGroupEntryBeSelected
bool CanCampaignGroupEntryBeSelected(notnull Faction faction, IEntity hoveredEntity, notnull SCR_AIGroup group, typename taskClass)
Definition
SCR_FactionCommanderConflictBaseMenuHandler.c:115
SCR_FactionCommanderConflictBaseMenuHandler::GetLocalCampaignCommanderComponent
SCR_CampaignFactionCommanderPlayerComponent GetLocalCampaignCommanderComponent()
Definition
SCR_FactionCommanderConflictBaseMenuHandler.c:47
SCR_FactionCommanderConflictBaseMenuHandler::m_bIsObjectiveCreationEnabled
bool m_bIsObjectiveCreationEnabled
Definition
SCR_FactionCommanderConflictBaseMenuHandler.c:5
SCR_FactionCommanderConflictBaseMenuHandler::BASE_NOT_SELECTED_TEXT
const string BASE_NOT_SELECTED_TEXT
Definition
SCR_FactionCommanderConflictBaseMenuHandler.c:7
SCR_FactionCommanderConflictBaseMenuHandler::GetHoveredBase
SCR_CampaignMilitaryBaseComponent GetHoveredBase()
Definition
SCR_FactionCommanderConflictBaseMenuHandler.c:53
vector
Definition
vector.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
FactionCommander
MenuHandlers
SCR_FactionCommanderCommandConflictBaseMenuHandler.c
Generated by
1.17.0