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_InspectionUserAction.c
Go to the documentation of this file.
1
class
SCR_InspectionUserAction
:
SCR_InventoryAction
2
{
3
protected
BaseWeaponComponent
m_WeaponComponent
;
4
5
override
bool
CanBeShownScript
(
IEntity
user)
6
{
7
if
(!
m_WeaponComponent
)
8
return
false
;
9
10
CharacterControllerComponent charComp = CharacterControllerComponent.Cast(user.
FindComponent
(CharacterControllerComponent));
11
return
charComp.GetInspect();
12
}
13
14
override
void
Init
(
IEntity
pOwnerEntity,
GenericComponent
pManagerComponent)
15
{
16
m_WeaponComponent
=
WeaponComponent
.Cast(pOwnerEntity.
FindComponent
(
WeaponComponent
));
17
// If there is no WeaponComponent, this might be an attachment. Check up the parent chain
18
if
(!
m_WeaponComponent
)
19
{
20
IEntity
parent = pOwnerEntity.
GetParent
();
21
while
(parent)
22
{
23
m_WeaponComponent
=
WeaponComponent
.Cast(parent.
FindComponent
(
WeaponComponent
));
24
if
(
m_WeaponComponent
)
25
parent = null;
26
else
27
parent = parent.
GetParent
();
28
}
29
}
30
}
31
};
BaseWeaponComponent
Definition
BaseWeaponComponent.c:13
GenericComponent
Definition
GenericComponent.c:13
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
IEntity::GetParent
proto external IEntity GetParent()
SCR_InspectionUserAction
Definition
SCR_InspectionUserAction.c:2
SCR_InspectionUserAction::Init
override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
Definition
SCR_InspectionUserAction.c:14
SCR_InspectionUserAction::m_WeaponComponent
BaseWeaponComponent m_WeaponComponent
Definition
SCR_InspectionUserAction.c:3
SCR_InspectionUserAction::CanBeShownScript
override bool CanBeShownScript(IEntity user)
Definition
SCR_InspectionUserAction.c:5
SCR_InventoryAction
modded version for to be used with the inventory 2.0
Definition
SCR_InventoryAction.c:4
WeaponComponent
Definition
WeaponComponent.c:13
scripts
Game
UserActions
Inspection
SCR_InspectionUserAction.c
Generated by
1.17.0