Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actionsplintself.c
Go to the documentation of this file.
1
class
ActionSplintSelfCB
:
ActionContinuousBaseCB
2
{
3
override
void
CreateActionComponent
()
4
{
5
m_ActionData
.m_ActionComponent =
new
CAContinuousTime
(
UATimeSpent
.
APPLY_SPLINT
);
6
}
7
};
8
9
class
ActionSplintSelf
:
ActionContinuousBase
10
{
11
void
ActionSplintSelf
()
12
{
13
m_CallbackClass
=
ActionSplintSelfCB
;
14
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONFB_CRAFTING;
15
m_FullBody
=
true
;
16
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_CROUCH;
17
m_SpecialtyWeight
= UASoftSkillsWeight.PRECISE_LOW;
18
m_Text
=
"#apply_splint"
;
19
}
20
21
override
void
CreateConditionComponents
()
22
{
23
m_ConditionItem
=
new
CCINonRuined
;
24
m_ConditionTarget
=
new
CCTSelf
;
25
}
26
27
override
bool
HasTarget
()
28
{
29
return
false
;
30
}
31
32
override
void
OnFinishProgressServer
(
ActionData
action_data )
33
{
34
action_data.m_MainItem.TransferModifiers(action_data.m_Player);
35
action_data.m_Player.ApplySplint();
36
37
//Double check to not enter splinted state if legs are not broken
38
if
(action_data.m_Player.GetBrokenLegs() ==
eBrokenLegs
.BROKEN_LEGS)
39
{
40
action_data.m_Player.SetBrokenLegs(
eBrokenLegs
.BROKEN_LEGS_SPLINT);
41
42
ItemBase
new_item =
ItemBase
.Cast(action_data.m_Player.GetInventory().CreateInInventory(
"Splint_Applied"
));
43
if
( new_item )
44
{
45
MiscGameplayFunctions.TransferItemProperties(action_data.m_MainItem,new_item,
true
,
false
,
true
);
46
action_data.m_MainItem.Delete();
47
}
48
}
49
}
50
51
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item)
52
{
53
if
(player.GetBrokenLegs() !=
eBrokenLegs
.BROKEN_LEGS ||
IsWearingSplint
(player))
54
{
55
return
false
;
56
}
57
return
super.ActionCondition(player, target, item);
58
59
}
60
61
bool
IsWearingSplint
(
PlayerBase
player )
62
{
63
if
( player.GetItemOnSlot(
"Splint_Right"
) )
64
{
65
return
true
;
66
}
67
return
false
;
68
}
69
};
ActionData
ActionBase ActionData
Definition
actionbase.c:30
ActionTarget
class ActionTargets ActionTarget
ActionBaseCB::m_ActionData
ActionData m_ActionData
Definition
animatedactionbase.c:3
ActionBase::m_FullBody
bool m_FullBody
Definition
actionbase.c:67
ActionBase::m_Text
string m_Text
Definition
actionbase.c:64
ActionBase::m_ConditionItem
ref CCIBase m_ConditionItem
Definition
actionbase.c:70
ActionBase::m_SpecialtyWeight
float m_SpecialtyWeight
Definition
actionbase.c:83
ActionBase::m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition
actionbase.c:71
ActionBase::m_StanceMask
int m_StanceMask
Definition
actionbase.c:68
ActionContinuousBaseCB
Definition
actioncontinuousbase.c:2
ActionContinuousBase::ActionContinuousBase
void ActionContinuousBase()
Definition
actioncontinuousbase.c:124
ActionSplintSelfCB
Definition
actionsplintself.c:2
ActionSplintSelfCB::CreateActionComponent
override void CreateActionComponent()
Definition
actionsplintself.c:3
ActionSplintSelf::OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition
actionsplintself.c:32
ActionSplintSelf::ActionSplintSelf
void ActionSplintSelf()
Definition
actionsplintself.c:11
ActionSplintSelf::CreateConditionComponents
override void CreateConditionComponents()
Definition
actionsplintself.c:21
ActionSplintSelf::IsWearingSplint
bool IsWearingSplint(PlayerBase player)
Definition
actionsplintself.c:61
ActionSplintSelf::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actionsplintself.c:51
ActionSplintSelf::HasTarget
override bool HasTarget()
Definition
actionsplintself.c:27
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
animatedactionbase.c:143
AnimatedActionBase::m_CallbackClass
m_CallbackClass
Definition
animatedactionbase.c:145
CAContinuousTime
Definition
cacontinuoustime.c:2
CCINonRuined
Definition
ccinonruined.c:2
CCTSelf
Definition
cctself.c:2
ItemBase
Definition
inventoryitem.c:742
PlayerBase
Definition
playerbaseclient.c:2
UATimeSpent
Definition
actionconstants.c:28
UATimeSpent::APPLY_SPLINT
const float APPLY_SPLINT
Definition
actionconstants.c:45
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:602
eBrokenLegs
eBrokenLegs
Definition
ebrokenlegs.c:2
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
continuous
medical
actionsplintself.c
Generated by
1.17.0