DayZ
1.24
Loading...
Searching...
No Matches
ActionFoldObject.c
Go to the documentation of this file.
1
class
ActionFoldObject
:
ActionInteractBase
2
{
3
void
ActionFoldObject
()
4
{
5
m_SpecialtyWeight
=
UASoftSkillsWeight
.
ROUGH_MEDIUM
;
6
m_Text
=
"#fold"
;
7
}
8
9
override
typename
GetInputType
()
10
{
11
return
ContinuousInteractActionInput
;
12
}
13
14
override
bool
HasProgress
()
15
{
16
return
false
;
17
}
18
19
override
bool
ActionCondition
(
PlayerBase
player
, ActionTarget
target
,
ItemBase
item
)
20
{
21
Object
targetObject
=
target
.GetObject();
22
if
(
targetObject
.IsInherited(HescoBox))
23
{
24
HescoBox
hesco
= HescoBox.Cast(
targetObject
);
25
26
if
(
hesco
.GetState() == HescoBox.UNFOLDED)
27
return
true
;
28
}
29
return
false
;
30
}
31
32
override
void
OnExecuteServer
(
ActionData
action_data
)
33
{
34
Object
targetObject
=
action_data
.m_Target.GetObject();
35
HescoBox
hesco
= HescoBox.Cast(
targetObject
);
36
if
(
hesco
.GetState() == HescoBox.UNFOLDED)
37
hesco
.Fold();
38
39
action_data
.m_Player.GetSoftSkillsManager().AddSpecialty(
m_SpecialtyWeight
);
40
}
41
};
m_Text
string m_Text
Definition
ActionBase.c:49
m_SpecialtyWeight
float m_SpecialtyWeight
Definition
ActionBase.c:68
ActionData
Definition
ActionBase.c:21
ActionFoldObject
Definition
ActionFoldObject.c:2
ActionFoldObject::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
ActionFoldObject.c:19
ActionFoldObject::OnExecuteServer
override void OnExecuteServer(ActionData action_data)
Definition
ActionFoldObject.c:32
ActionFoldObject::GetInputType
override GetInputType()
Definition
ActionFoldObject.c:9
ActionFoldObject::ActionFoldObject
void ActionFoldObject()
Definition
ActionFoldObject.c:3
ActionFoldObject::HasProgress
override bool HasProgress()
Definition
ActionFoldObject.c:14
ActionInteractBase
Definition
ActionInteractBase.c:50
ContinuousInteractActionInput
Definition
ActionInput.c:504
ItemBase
Definition
InventoryItem.c:697
Object
Definition
ObjectTyped.c:2
Param3
Definition
EntityAI.c:95
PlayerBase
Definition
PlayerBaseClient.c:2
UASoftSkillsWeight
Definition
ActionConstants.c:119
UASoftSkillsWeight::ROUGH_MEDIUM
const float ROUGH_MEDIUM
Definition
ActionConstants.c:121
scripts
4_World
Classes
UserActionsComponent
Actions
Interact
ActionFoldObject.c
Generated by
1.10.0