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_AttachPylonSupportStationAction.c
Go to the documentation of this file.
1
class
SCR_AttachPylonSupportStationAction
:
SCR_BaseItemHolderSupportStationAction
2
{
3
[
Attribute
(
"0"
,
params
:
"0 inf"
)]
4
protected
int
m_iPylonIndex
;
5
6
protected
WeaponSlotComponent
m_WeaponSlot
;
7
8
//------------------------------------------------------------------------------------------------
9
WeaponSlotComponent
GetLinkedWeaponSlot
()
10
{
11
return
m_WeaponSlot
;
12
}
13
14
//------------------------------------------------------------------------------------------------
15
override
bool
CanBeShownScript
(
IEntity
user)
16
{
17
//~ Not valid or already occupied
18
if
(
m_sItemPrefab
.IsEmpty() || !
m_WeaponSlot
||
m_WeaponSlot
.GetWeaponEntity())
19
return
false
;
20
21
return
super.CanBeShownScript(user);
22
}
23
24
//------------------------------------------------------------------------------------------------
25
protected
override
void
DelayedInit
(
IEntity
owner)
26
{
27
if
(!owner)
28
return
;
29
30
super.DelayedInit(owner);
31
32
SCR_ResupplyItemSupportStationData
itemData =
SCR_ResupplyItemSupportStationData
.Cast(
m_ResupplyData
);
33
if
(!itemData)
34
return
;
35
36
m_sItemPrefab
= itemData.
GetItemPrefab
();
37
38
SetItemName
();
39
40
array<Managed> weaponSlots = {};
41
GetOwner
().
FindComponents
(
WeaponSlotComponent
, weaponSlots);
42
WeaponSlotComponent
weaponSlot;
43
44
foreach
(Managed slot : weaponSlots)
45
{
46
weaponSlot =
WeaponSlotComponent
.Cast(slot);
47
if
(!weaponSlot)
48
continue
;
49
50
if
(weaponSlot.GetWeaponSlotIndex() ==
m_iPylonIndex
)
51
m_WeaponSlot
= weaponSlot;
52
}
53
54
if
(!
m_WeaponSlot
)
55
Print
(
"SCR_AttachPylonSupportStationAction: Could not find weapon slot!"
,
LogLevel
.ERROR);
56
}
57
58
//------------------------------------------------------------------------------------------------
59
protected
override
ESupportStationType
GetSupportStationType
()
60
{
61
return
ESupportStationType
.VEHICLE_WEAPON;
62
}
63
64
//------------------------------------------------------------------------------------------------
65
override
bool
GetActionNameScript
(out
string
outName)
66
{
67
UIInfo
uiInfo =
GetUIInfo
();
68
if
(!uiInfo)
69
return
super.GetActionNameScript(outName);
70
71
outName =
WidgetManager
.Translate(uiInfo.GetName(),
m_sItemName
);
72
73
return
super.GetActionNameScript(outName);
74
}
75
}
ESupportStationType
ESupportStationType
Definition
ESupportStationType.c:3
GetUIInfo
SCR_UIInfo GetUIInfo()
Definition
SCR_EditableEntityCampaignBuildingModeLabelSetting.c:27
params
category params
Definition
SCR_SpherePointGeneratorPreviewComponent.c:21
IEntity
Definition
IEntity.c:13
IEntity::FindComponents
proto external int FindComponents(typename typeName, notnull array< Managed > outComponents)
SCR_AttachPylonSupportStationAction
Definition
SCR_AttachPylonSupportStationAction.c:2
SCR_AttachPylonSupportStationAction::DelayedInit
override void DelayedInit(IEntity owner)
Definition
SCR_AttachPylonSupportStationAction.c:25
SCR_AttachPylonSupportStationAction::CanBeShownScript
override bool CanBeShownScript(IEntity user)
Definition
SCR_AttachPylonSupportStationAction.c:15
SCR_AttachPylonSupportStationAction::m_iPylonIndex
int m_iPylonIndex
Definition
SCR_AttachPylonSupportStationAction.c:4
SCR_AttachPylonSupportStationAction::m_WeaponSlot
WeaponSlotComponent m_WeaponSlot
Definition
SCR_AttachPylonSupportStationAction.c:6
SCR_AttachPylonSupportStationAction::GetLinkedWeaponSlot
WeaponSlotComponent GetLinkedWeaponSlot()
Definition
SCR_AttachPylonSupportStationAction.c:9
SCR_AttachPylonSupportStationAction::GetActionNameScript
override bool GetActionNameScript(out string outName)
Definition
SCR_AttachPylonSupportStationAction.c:65
SCR_AttachPylonSupportStationAction::GetSupportStationType
override ESupportStationType GetSupportStationType()
Definition
SCR_AttachPylonSupportStationAction.c:59
SCR_BaseItemHolderSupportStationAction
Definition
SCR_BaseItemHolderSupportStationAction.c:3
SCR_BaseItemHolderSupportStationAction::m_sItemPrefab
ResourceName m_sItemPrefab
Definition
SCR_BaseItemHolderSupportStationAction.c:10
SCR_BaseItemHolderSupportStationAction::SetItemName
void SetItemName()
Definition
SCR_BaseItemHolderSupportStationAction.c:36
SCR_BaseItemHolderSupportStationAction::m_ResupplyData
ref SCR_ResupplySupportStationData m_ResupplyData
Definition
SCR_BaseItemHolderSupportStationAction.c:5
SCR_BaseItemHolderSupportStationAction::m_sItemName
string m_sItemName
Definition
SCR_BaseItemHolderSupportStationAction.c:12
SCR_ResupplyItemSupportStationData
Definition
SCR_BaseItemHolderSupportStationAction.c:130
SCR_ResupplyItemSupportStationData::GetItemPrefab
ResourceName GetItemPrefab()
Definition
SCR_BaseItemHolderSupportStationAction.c:143
UIInfo
UIInfo - allows to define UI elements.
Definition
UIInfo.c:14
WeaponSlotComponent
Definition
WeaponSlotComponent.c:13
WidgetManager
Definition
WidgetManager.c:16
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition
SCR_FuelNode.c:128
Print
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
LogLevel
Enum with severity of the logging message.
Definition
LogLevel.c:14
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
UserActions
SupportStations
SCR_AttachPylonSupportStationAction.c
Generated by
1.17.0