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_BaseLockComponent.c
Go to the documentation of this file.
1
[
EntityEditorProps
(
category
:
"GameScripted/Components"
, description:
"Base lock component."
)]
2
class
SCR_BaseLockComponentClass
:
ScriptComponentClass
3
{
4
}
5
6
class
SCR_BaseLockComponent :
ScriptComponent
7
{
8
protected
SCR_VehicleSpawnProtectionComponent
m_pVehicleSpawnProtection
;
9
10
[
Attribute
()]
11
protected
bool
m_bIsLocked
;
12
13
//------------------------------------------------------------------------------------------------
14
void
SetLocked
(
bool
locked)
15
{
16
m_bIsLocked
= locked;
17
}
18
19
//------------------------------------------------------------------------------------------------
20
override
void
OnPostInit
(
IEntity
owner)
21
{
22
SetEventMask
(owner,
EntityEvent
.INIT);
23
}
24
25
//------------------------------------------------------------------------------------------------
26
override
void
EOnInit
(
IEntity
owner)
27
{
28
m_pVehicleSpawnProtection
= SCR_VehicleSpawnProtectionComponent.Cast(owner.
FindComponent
(SCR_VehicleSpawnProtectionComponent));
29
ClearEventMask
(owner,
EntityEvent
.INIT);
30
}
31
32
//------------------------------------------------------------------------------------------------
35
LocalizedString
GetCannotPerformReason
(
IEntity
user)
36
{
37
if
(user &&
m_pVehicleSpawnProtection
)
38
return
m_pVehicleSpawnProtection
.GetReasonText(user);
39
40
return
string
.Empty;
41
}
42
43
//------------------------------------------------------------------------------------------------
48
bool
IsLocked
(
IEntity
user,
BaseCompartmentSlot
compartmentSlot)
49
{
50
if
(
m_bIsLocked
)
51
return
true
;
52
53
if
(!user || !compartmentSlot)
54
return
false
;
55
56
if
(
m_pVehicleSpawnProtection
)
57
return
m_pVehicleSpawnProtection
.IsProtected(user, compartmentSlot);
58
59
return
false
;
60
}
61
}
SetLocked
void SetLocked(bool locked)
Definition
SCR_BaseLockComponent.c:14
m_bIsLocked
bool m_bIsLocked
Definition
SCR_BaseLockComponent.c:11
m_pVehicleSpawnProtection
SCR_BaseLockComponentClass m_pVehicleSpawnProtection
GetCannotPerformReason
LocalizedString GetCannotPerformReason(IEntity user)
Definition
SCR_BaseLockComponent.c:35
IsLocked
bool IsLocked(IEntity user, BaseCompartmentSlot compartmentSlot)
Definition
SCR_BaseLockComponent.c:48
EntityEditorProps
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
Definition
SCR_CompassComponent.c:10
category
params category
Definition
SCR_VehicleDamageManagerComponent.c:302
BaseCompartmentSlot
Definition
BaseCompartmentSlot.c:2
GenericComponent::ClearEventMask
proto external int ClearEventMask(notnull IEntity owner, int mask)
GenericComponent::SetEventMask
proto external int SetEventMask(notnull IEntity owner, int mask)
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
LocalizedString
Definition
LocalizedString.c:22
SCR_BaseLockComponentClass
Definition
SCR_BaseLockComponent.c:3
ScriptComponentClass
Definition
ScriptComponentClass.c:8
ScriptComponent
Definition
ScriptComponent.c:24
ScriptComponent::EOnInit
void EOnInit(IEntity owner)
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
EntityEvent
EntityEvent
Various entity events.
Definition
EntityEvent.c:14
OnPostInit
@ OnPostInit
Definition
SndComponentCallbacks.c:15
scripts
Game
Components
SCR_BaseLockComponent.c
Generated by
1.17.0