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_TutorialFakeBaseComponent.c
Go to the documentation of this file.
1
class
SCR_TutorialFakeBaseComponentClass
:
ScriptComponentClass
2
{
3
}
4
5
class
SCR_TutorialFakeBaseComponent :
ScriptComponent
6
{
7
[
Attribute
()]
8
protected
ref
SCR_GraphLinesData
m_GraphLinesData;
9
10
protected
SCR_MapEntity
m_MapEntity
;
11
12
[
Attribute
(
"BASE NAME"
)];
13
string
m_sBaseName
;
14
15
[
Attribute
(
"BASE NAME LONG"
)];
16
string
m_sBaseNameLonger
;
17
18
[
Attribute
(
"AVRORA"
)];
19
string
m_sBaseCallSign
;
20
21
[
Attribute
(
"0.854994 0.031006 0.028000 1.000000"
, uiwidget:
UIWidgets
.ColorPicker)]
22
ref
Color
m_BaseColor
;
23
24
[
Attribute
(
"0"
,
UIWidgets
.ComboBox,
""
, enums: ParamEnumArray.FromEnum(
EMilitarySymbolIdentity
))]
25
EMilitarySymbolIdentity
m_eMilitarySymbolIdentity
;
26
27
[
Attribute
(
"2"
,
UIWidgets
.ComboBox,
""
, enums: ParamEnumArray.FromEnum(
EMilitarySymbolDimension
))]
28
EMilitarySymbolDimension
m_eMilitarySymbolDimension
;
29
30
[
Attribute
(
"0"
,
UIWidgets
.ComboBox,
""
, enums: ParamEnumArray.FromEnum(
EMilitarySymbolIcon
))]
31
EMilitarySymbolIcon
m_eMilitarySymbolIcon
;
32
33
[
Attribute
(
"0"
,
UIWidgets
.ComboBox,
""
, enums: ParamEnumArray.FromEnum(
EMilitarySymbolAmplifier
))]
34
EMilitarySymbolAmplifier
m_eMilitarySymbolAplifier
;
35
36
[
Attribute
(
"0"
,
UIWidgets
.Flags,
""
, enums: ParamEnumArray.FromEnum(
SCR_EFakeBaseServices
))]
37
SCR_EFakeBaseServices
m_eServices
;
38
39
[
Attribute
(
"Hostile_Installation_Focus_Land"
)]
40
string
m_sHighlight
;
41
42
[
Attribute
()]
43
bool
m_bAntennaWidgetVisible
;
44
45
[
Attribute
(
"1"
)]
46
bool
m_bAllowServices
;
47
48
[
Attribute
(
"1"
)]
49
bool
m_bAllowServicesSizeOverlay
;
50
51
[
Attribute
()]
52
bool
m_bVisible
;
53
54
[
Attribute
(
"38"
)]
55
int
m_iWidthOverride
;
56
57
[
Attribute
(
"38"
)]
58
int
m_iHeightOverride
;
59
60
[
Attribute
()]
61
ref array <string>
m_aBasesToLink
;
62
63
protected
MapItem
m_MapItem
;
64
protected
ref array <MapLink>
m_aLinks
= {};
65
66
//------------------------------------------------------------------------------------------------
67
void
RemoveLinkName
(
string
link)
68
{
69
m_aBasesToLink
.RemoveItem(link);
70
}
71
72
//------------------------------------------------------------------------------------------------
73
void
AddLinkName
(
string
link)
74
{
75
m_aBasesToLink
.Insert(link);
76
}
77
78
//------------------------------------------------------------------------------------------------
79
void
ColorLinks
(
bool
isHoovering)
80
{
81
if
(!
m_aLinks
||
m_aLinks
.IsEmpty())
82
return
;
83
84
foreach
(
MapLink
link :
m_aLinks
)
85
{
86
ColorMapLink
(link, isHoovering);
87
}
88
}
89
90
//------------------------------------------------------------------------------------------------
91
void
ClearLinks
()
92
{
93
if
(
m_MapItem
)
94
m_MapItem
.ClearLinks();
95
96
m_aLinks
.Clear();
97
}
98
99
//------------------------------------------------------------------------------------------------
100
void
CreateLinks
()
101
{
102
IEntity
ent;
103
MapDescriptorComponent
mapDescriptor;
104
105
foreach
(
string
base
:
m_aBasesToLink
)
106
{
107
ent =
GetGame
().
GetWorld
().FindEntityByName(
base
);
108
if
(!ent)
109
continue
;
110
111
mapDescriptor =
MapDescriptorComponent
.Cast(ent.
FindComponent
(
MapDescriptorComponent
));
112
if
(!mapDescriptor)
113
continue
;
114
115
MapLink
link =
m_MapItem
.LinkTo(mapDescriptor.Item());
116
ColorMapLink
(link,
false
);
117
118
m_aLinks
.Insert(link);
119
}
120
}
121
122
//------------------------------------------------------------------------------------------------
123
protected
void
ColorMapLink
(notnull
MapLink
link,
bool
isHovering)
124
{
125
MapLinkProps
props = link.GetMapLinkProps();
126
127
if
(!props)
128
return
;
129
130
if
(!m_GraphLinesData)
131
return
;
132
133
props.SetLineWidth(m_GraphLinesData.GetLineWidth());
134
135
Color
c =
Color
.FromInt(props.GetLineColor().PackToInt());
136
137
if
(!c)
138
return
;
139
140
if
(isHovering)
141
c.SetA(m_GraphLinesData.GetHighlightedAlpha());
142
else
143
c.SetA(m_GraphLinesData.GetDefaultAlpha());
144
145
props.SetLineColor(c);
146
}
147
148
//------------------------------------------------------------------------------------------------
149
void
OnMapOpen
(
MapConfiguration
config)
150
{
151
SCR_TutorialMapUI
tutorialMapUI;
152
foreach
(
SCR_MapUIBaseComponent
mapUIComponent : config.Components)
153
{
154
tutorialMapUI =
SCR_TutorialMapUI
.Cast(mapUIComponent);
155
if
(tutorialMapUI)
156
break
;
157
}
158
159
if
(tutorialMapUI)
160
tutorialMapUI.
InsertFakeBase
(
this
);
161
}
162
163
//------------------------------------------------------------------------------------------------
164
override
void
OnPostInit
(
IEntity
owner)
165
{
166
m_MapEntity
=
SCR_MapEntity
.
GetMapInstance
();
167
if
(!
m_MapEntity
)
168
return
;
169
170
m_MapEntity
.GetOnMapOpen().Insert(
OnMapOpen
);
171
172
MapDescriptorComponent
mapDescriptor =
MapDescriptorComponent
.Cast(owner.
FindComponent
(
MapDescriptorComponent
));
173
if
(!mapDescriptor)
174
return
;
175
176
m_MapItem
= mapDescriptor.Item();
177
178
if
(
m_MapItem
)
179
m_MapItem
.GetProps().SetIconVisible(
false
);
180
}
181
}
EMilitarySymbolIdentity
EMilitarySymbolIdentity
Definition
EMilitarySymbol.c:2
EMilitarySymbolDimension
EMilitarySymbolDimension
Definition
EMilitarySymbol.c:15
EMilitarySymbolIcon
EMilitarySymbolIcon
Definition
EMilitarySymbol.c:30
EMilitarySymbolAmplifier
EMilitarySymbolAmplifier
Definition
EMilitarySymbol.c:64
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
OnMapOpen
void OnMapOpen(MapConfiguration config)
Definition
SCR_CampaignFeedbackComponent.c:350
m_sBaseName
string m_sBaseName
Definition
SCR_CampaignMilitaryBaseComponent.c:13
m_MapItem
MapItem m_MapItem
Definition
SCR_CampaignMobileAssemblyStandaloneComponent.c:14
SCR_EFakeBaseServices
SCR_EFakeBaseServices
Definition
SCR_EFakeBaseServices.c:2
base
around base
Definition
SCR_HoldCampaignMilitaryBaseTaskEntity.c:9
m_MapEntity
SCR_MapEntity m_MapEntity
Definition
SCR_MapGadgetComponent.c:38
ColorMapLink
void ColorMapLink(notnull MapLink link, bool isHovering)
Definition
SCR_RadioCoverageMapDescriptorComponent.c:201
CreateLinks
void CreateLinks()
Definition
SCR_RadioCoverageMapDescriptorComponent.c:70
m_BaseColor
ref Color m_BaseColor
Definition
SCR_SpherePointGeneratorPreviewComponent.c:24
m_eServices
SCR_EFakeBaseServices m_eServices
Definition
SCR_TutorialFakeBaseComponent.c:37
m_aLinks
ref array< MapLink > m_aLinks
Definition
SCR_TutorialFakeBaseComponent.c:64
AddLinkName
void AddLinkName(string link)
Definition
SCR_TutorialFakeBaseComponent.c:73
m_bVisible
bool m_bVisible
Definition
SCR_TutorialFakeBaseComponent.c:52
ClearLinks
void ClearLinks()
Definition
SCR_TutorialFakeBaseComponent.c:91
m_eMilitarySymbolAplifier
EMilitarySymbolAmplifier m_eMilitarySymbolAplifier
Definition
SCR_TutorialFakeBaseComponent.c:34
m_eMilitarySymbolDimension
EMilitarySymbolDimension m_eMilitarySymbolDimension
Definition
SCR_TutorialFakeBaseComponent.c:28
m_iWidthOverride
int m_iWidthOverride
Definition
SCR_TutorialFakeBaseComponent.c:55
m_aBasesToLink
ref array< string > m_aBasesToLink
Definition
SCR_TutorialFakeBaseComponent.c:61
m_bAllowServicesSizeOverlay
bool m_bAllowServicesSizeOverlay
Definition
SCR_TutorialFakeBaseComponent.c:49
m_sHighlight
string m_sHighlight
Definition
SCR_TutorialFakeBaseComponent.c:40
m_iHeightOverride
int m_iHeightOverride
Definition
SCR_TutorialFakeBaseComponent.c:58
m_bAntennaWidgetVisible
bool m_bAntennaWidgetVisible
Definition
SCR_TutorialFakeBaseComponent.c:43
m_sBaseCallSign
string m_sBaseCallSign
Definition
SCR_TutorialFakeBaseComponent.c:19
m_eMilitarySymbolIdentity
EMilitarySymbolIdentity m_eMilitarySymbolIdentity
Definition
SCR_TutorialFakeBaseComponent.c:25
m_sBaseNameLonger
string m_sBaseNameLonger
Definition
SCR_TutorialFakeBaseComponent.c:16
m_eMilitarySymbolIcon
EMilitarySymbolIcon m_eMilitarySymbolIcon
Definition
SCR_TutorialFakeBaseComponent.c:31
ColorLinks
void ColorLinks(bool isHoovering)
Definition
SCR_TutorialFakeBaseComponent.c:79
m_bAllowServices
bool m_bAllowServices
Definition
SCR_TutorialFakeBaseComponent.c:46
RemoveLinkName
void RemoveLinkName(string link)
Definition
SCR_TutorialFakeBaseComponent.c:67
Color
Definition
Color.c:13
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
IEntity::GetWorld
proto external BaseWorld GetWorld()
MapConfiguration
Definition
MapConfiguration.c:3
MapDescriptorComponent
Definition
MapDescriptorComponent.c:13
MapItem
Definition
MapItem.c:13
MapLink
Definition
MapLink.c:13
MapLinkProps
Definition
MapLinkProps.c:13
SCR_GraphLinesData
Definition
SCR_GraphLinesData.c:4
SCR_MapEntity
Definition
SCR_MapEntity.c:18
SCR_MapEntity::GetMapInstance
static SCR_MapEntity GetMapInstance()
Get map entity instance.
Definition
SCR_MapEntity.c:112
SCR_MapUIBaseComponent
Definition
SCR_MapUIBaseComponent.c:4
SCR_TutorialFakeBaseComponentClass
Definition
SCR_TutorialFakeBaseComponent.c:2
SCR_TutorialMapUI
Definition
SCR_TutorialMapUI.c:3
SCR_TutorialMapUI::InsertFakeBase
void InsertFakeBase(notnull SCR_TutorialFakeBaseComponent fakeBase)
Definition
SCR_TutorialMapUI.c:13
ScriptComponentClass
Definition
ScriptComponentClass.c:8
ScriptComponent
Definition
ScriptComponent.c:24
UIWidgets
Definition
attributes.c:40
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
OnPostInit
@ OnPostInit
Definition
SndComponentCallbacks.c:15
scripts
Game
GameMode
Tutorial
Logic
SCR_TutorialFakeBaseComponent.c
Generated by
1.17.0