DayZ
1.24
Loading...
Searching...
No Matches
ActionRepairShelter.c
Go to the documentation of this file.
1
//used for shelters (non-proxy tent objects)
2
class
ActionRepairShelter
:
ActionRepairTent
3
{
4
void
ActionRepairShelter
()
5
{
6
m_CallbackClass
=
ActionRepairTentCB
;
7
m_SpecialtyWeight
=
UASoftSkillsWeight
.
PRECISE_LOW
;
8
9
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONFB_INTERACT;
10
m_FullBody
=
true
;
11
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_ERECT |
DayZPlayerConstants
.STANCEMASK_CROUCH;
12
}
13
14
override
void
CreateConditionComponents
()
15
{
16
m_ConditionItem
=
new
CCINonRuined
;
17
m_ConditionTarget
=
new
CCTCursor
(
UAMaxDistances
.
SMALL
);
18
}
19
20
override
bool
IsUsingProxies
()
21
{
22
return
false
;
23
}
24
25
override
bool
ActionCondition
(
PlayerBase
player
, ActionTarget
target
,
ItemBase
item
)
26
{
27
ShelterBase
shelter
=
ShelterBase
.Cast(
target
.GetObject());
28
if
(!
shelter
)
29
return
false
;
30
31
if
(
player
&&
shelter
)
32
{
33
PluginRepairing
module_repairing
;
34
Class
.
CastTo
(
module_repairing
,
GetPlugin
(
PluginRepairing
));
35
if
(
module_repairing
.CanRepair(
item
,
shelter
))
36
return
true
;
37
}
38
39
return
false
;
40
}
41
42
override
void
OnFinishProgressServer
(
ActionData
action_data
)
43
{
44
ShelterBase
shelter
=
ShelterBase
.Cast(
action_data
.m_Target.GetObject());
45
46
if
(
shelter
)
47
{
48
PluginRepairing
module_repairing
;
49
Class
.
CastTo
(
module_repairing
,
GetPlugin
(
PluginRepairing
));
50
module_repairing
.Repair(
action_data
.m_Player,
action_data
.m_MainItem,
shelter
,
m_SpecialtyWeight
);
51
}
52
}
53
};
m_FullBody
bool m_FullBody
Definition
ActionBase.c:52
m_ConditionItem
ref CCIBase m_ConditionItem
Definition
ActionBase.c:55
m_SpecialtyWeight
float m_SpecialtyWeight
Definition
ActionBase.c:68
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition
ActionBase.c:56
m_StanceMask
int m_StanceMask
Definition
ActionBase.c:53
GetPlugin
PluginBase GetPlugin(typename plugin_type)
Definition
PluginManager.c:300
ActionData
Definition
ActionBase.c:21
ActionRepairShelter
Definition
ActionRepairShelter.c:3
ActionRepairShelter::ActionRepairShelter
void ActionRepairShelter()
Definition
ActionRepairShelter.c:4
ActionRepairShelter::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
ActionRepairShelter.c:25
ActionRepairShelter::CreateConditionComponents
override void CreateConditionComponents()
Definition
ActionRepairShelter.c:14
ActionRepairShelter::IsUsingProxies
override bool IsUsingProxies()
Definition
ActionRepairShelter.c:20
ActionRepairShelter::OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition
ActionRepairShelter.c:42
ActionRepairTentCB
Definition
ActionRepairTent.c:12
ActionRepairTent
Definition
ActionRepairTent.c:20
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
AnimatedActionBase.c:122
AnimatedActionBase::m_CallbackClass
m_CallbackClass
Definition
AnimatedActionBase.c:124
CCINonRuined
Definition
CCINonRuined.c:2
CCTCursor
Definition
CCTCursor.c:2
Class
Super root of all classes in Enforce script.
Definition
EnScript.c:11
ItemBase
Definition
InventoryItem.c:697
Param3
Definition
EntityAI.c:95
PlayerBase
Definition
PlayerBaseClient.c:2
ShelterBase
Definition
Shelter.c:97
UAMaxDistances
Definition
ActionConstants.c:105
UAMaxDistances::SMALL
const float SMALL
Definition
ActionConstants.c:106
UASoftSkillsWeight
Definition
ActionConstants.c:119
UASoftSkillsWeight::PRECISE_LOW
const float PRECISE_LOW
Definition
ActionConstants.c:123
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:597
Class::CastTo
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
scripts
4_World
Classes
UserActionsComponent
Actions
Continuous
ActionRepairShelter.c
Generated by
1.10.0