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_FactionCommanderDismantleCommandMenuHandler.c
Go to the documentation of this file.
1
[
BaseContainerProps
()]
2
class
SCR_FactionCommanderDismantleCommandMenuHandler
:
SCR_FactionCommanderConflictBaseMenuHandler
3
{
4
[
Attribute
(
"-10 0 -10"
,
desc
:
"Task offset"
)]
5
protected
vector
m_vPositionOffset
;
6
7
protected
const
string
HQ_CANNOT_BE_DISMANTLED
=
"#AR-FactionCommander_HQCannotBeDismantled"
;
8
protected
const
string
BASE_CANNOT_BE_DISMANTLED
=
"#AR-FactionCommander_BaseCannotBeDismantled"
;
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
=
GetTaskOnHoveredBase
(commanderFaction, SCR_DismantleCampaignMilitaryBaseTaskEntity);
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
SCR_Task
task
= SCR_DismantleCampaignMilitaryBaseTaskEntity.Cast(hoveredEntity);
30
if
(!
task
)
31
return
false
;
32
33
return
true
;
34
}
35
36
//------------------------------------------------------------------------------------------------
37
override
bool
CanEntryBeSelected
(notnull
Faction
commanderFaction,
int
playerId,
vector
position
,
IEntity
hoveredEntity, out
string
disabledText =
""
)
38
{
39
if
(!super.CanEntryBeSelected(commanderFaction, playerId,
position
, hoveredEntity))
40
{
41
disabledText =
BASE_NOT_SELECTED_TEXT
;
42
return
false
;
43
}
44
45
SCR_CampaignFaction
campaignFaction =
SCR_CampaignFaction
.Cast(commanderFaction);
46
if
(!campaignFaction)
47
return
false
;
48
49
SCR_CampaignMilitaryBaseComponent
hoveredBase =
GetHoveredBase
();
50
if
(hoveredBase.GetFaction() != commanderFaction)
51
return
false
;
52
53
if
(hoveredBase.
IsHQ
())
54
{
55
disabledText =
HQ_CANNOT_BE_DISMANTLED
;
56
return
false
;
57
}
58
59
if
(hoveredBase.
IsControlPoint
() || hoveredBase.
GetType
() ==
SCR_ECampaignBaseType
.RELAY || hoveredBase.
GetType
() ==
SCR_ECampaignBaseType
.SOURCE_BASE)
60
{
61
disabledText =
BASE_CANNOT_BE_DISMANTLED
;
62
return
false
;
63
}
64
65
return
true
;
66
}
67
68
//------------------------------------------------------------------------------------------------
69
override
bool
CanGroupEntryBeSelected
(notnull
Faction
commanderFaction,
int
playerId,
vector
position
,
IEntity
hoveredEntity,
SCR_AIGroup
group, out
string
disabledText =
""
)
70
{
71
if
(!super.CanGroupEntryBeSelected(commanderFaction, playerId,
position
, hoveredEntity, group))
72
return
false
;
73
74
return
CanCampaignGroupEntryBeSelected
(commanderFaction, hoveredEntity, group, SCR_DismantleCampaignMilitaryBaseTaskEntity);
75
}
76
77
//------------------------------------------------------------------------------------------------
78
override
void
OnCommandIssued
(notnull
Faction
commanderFaction,
int
playerId,
vector
position
,
IEntity
hoveredEntity,
SCR_AIGroup
group)
79
{
80
SCR_CampaignFactionCommanderPlayerComponent factionCommanderPlayerComponent =
GetLocalCampaignCommanderComponent
();
81
if
(!factionCommanderPlayerComponent)
82
return
;
83
84
SCR_Task
task
= SCR_DismantleCampaignMilitaryBaseTaskEntity.Cast(hoveredEntity);
85
if
(!
task
)
86
task
=
GetTaskOnHoveredBase
(commanderFaction, SCR_DismantleCampaignMilitaryBaseTaskEntity);
87
88
if
(!
task
)
89
factionCommanderPlayerComponent.CreateCampaignMilitaryBaseTask(
GetTaskPrefab
(), group, playerId,
m_vPositionOffset
);
90
else
if
(group)
91
factionCommanderPlayerComponent.AssignGroupToTask(group.
GetGroupID
(),
task
.GetTaskID());
92
}
93
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_ECampaignBaseType
SCR_ECampaignBaseType
Definition
SCR_CampaignMilitaryBaseComponent.c:2966
position
vector position
Definition
SCR_DestructibleTreeV2.c:30
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
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::GetType
SCR_ECampaignBaseType GetType()
Returns type of this base.
Definition
SCR_CampaignMilitaryBaseComponent.c:2190
SCR_CampaignMilitaryBaseComponent::IsHQ
bool IsHQ()
Definition
SCR_CampaignMilitaryBaseComponent.c:1031
SCR_CampaignMilitaryBaseComponent::IsControlPoint
bool IsControlPoint()
Definition
SCR_CampaignMilitaryBaseComponent.c:453
SCR_FactionCommanderBaseTaskMenuHandler::GetTaskPrefab
ResourceName GetTaskPrefab()
Definition
SCR_FactionCommanderBaseTaskMenuHandler.c:5
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::GetTaskOnHoveredBase
SCR_Task GetTaskOnHoveredBase(notnull Faction faction, typename taskClass)
Definition
SCR_FactionCommanderConflictBaseMenuHandler.c:109
SCR_FactionCommanderConflictBaseMenuHandler::GetLocalCampaignCommanderComponent
SCR_CampaignFactionCommanderPlayerComponent GetLocalCampaignCommanderComponent()
Definition
SCR_FactionCommanderConflictBaseMenuHandler.c:47
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
SCR_FactionCommanderDismantleCommandMenuHandler
Definition
SCR_FactionCommanderDismantleCommandMenuHandler.c:3
SCR_FactionCommanderDismantleCommandMenuHandler::CanQuickEntryBeShown
override bool CanQuickEntryBeShown(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity)
Definition
SCR_FactionCommanderDismantleCommandMenuHandler.c:24
SCR_FactionCommanderDismantleCommandMenuHandler::CanEntryBeSelected
override bool CanEntryBeSelected(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity, out string disabledText="")
Definition
SCR_FactionCommanderDismantleCommandMenuHandler.c:37
SCR_FactionCommanderDismantleCommandMenuHandler::OnCommandIssued
override void OnCommandIssued(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity, SCR_AIGroup group)
Definition
SCR_FactionCommanderDismantleCommandMenuHandler.c:78
SCR_FactionCommanderDismantleCommandMenuHandler::HQ_CANNOT_BE_DISMANTLED
const string HQ_CANNOT_BE_DISMANTLED
Definition
SCR_FactionCommanderDismantleCommandMenuHandler.c:7
SCR_FactionCommanderDismantleCommandMenuHandler::CanGroupEntryBeSelected
override bool CanGroupEntryBeSelected(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity, SCR_AIGroup group, out string disabledText="")
Definition
SCR_FactionCommanderDismantleCommandMenuHandler.c:69
SCR_FactionCommanderDismantleCommandMenuHandler::CanCreateObjectiveEntryBeShown
override bool CanCreateObjectiveEntryBeShown(notnull Faction commanderFaction, int playerId, vector position, IEntity hoveredEntity)
Definition
SCR_FactionCommanderDismantleCommandMenuHandler.c:11
SCR_FactionCommanderDismantleCommandMenuHandler::m_vPositionOffset
vector m_vPositionOffset
Definition
SCR_FactionCommanderDismantleCommandMenuHandler.c:5
SCR_FactionCommanderDismantleCommandMenuHandler::BASE_CANNOT_BE_DISMANTLED
const string BASE_CANNOT_BE_DISMANTLED
Definition
SCR_FactionCommanderDismantleCommandMenuHandler.c:8
vector
Definition
vector.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
FactionCommander
MenuHandlers
SCR_FactionCommanderDismantleCommandMenuHandler.c
Generated by
1.17.0