Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actionsewself.c
Go to the documentation of this file.
1
class
ActionSewSelfCB
:
ActionContinuousBaseCB
2
{
3
override
void
CreateActionComponent
()
4
{
5
m_ActionData
.m_ActionComponent =
new
CAContinuousRepeat
(
UATimeSpent
.
SEW_CUTS
);
6
}
7
}
8
9
class
ActionSewSelf
:
ActionBandageBase
10
{
11
void
ActionSewSelf
()
12
{
13
m_CallbackClass =
ActionSewSelfCB
;
14
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONFB_STITCHUPSELF;
15
m_FullBody =
true
;
16
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_ERECT |
DayZPlayerConstants
.STANCEMASK_CROUCH;
17
18
m_Text =
"#sew_cuts"
;
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
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item)
33
{
34
if
(!super.ActionCondition(player, target, item))
35
return
false
;
36
37
return
player.IsBleeding();
38
}
39
40
override
void
OnFinishProgressServer
(
ActionData
action_data)
41
{
42
PlayerBase
player =
PlayerBase
.Cast(action_data.m_Player);
43
if
(action_data.m_MainItem && player)
44
ApplyBandage
(action_data.m_MainItem, player);
45
}
46
47
override
void
ApplyBandage
(
ItemBase
item,
PlayerBase
player)
48
{
49
if
(player.GetBleedingManagerServer())
50
player.GetBleedingManagerServer().RemoveMostSignificantBleedingSourceEx(item);
51
52
PluginTransmissionAgents transmissionAgents = PluginTransmissionAgents.Cast(
GetPlugin
(PluginTransmissionAgents));
53
transmissionAgents.TransmitAgents(item, player,
AGT_ITEM_TO_FLESH
);
54
55
if
(item.HasQuantity())
56
item.AddQuantity(-20,
true
);
57
else
58
item.Delete();
59
}
60
}
m_CommandUID
int m_CommandUID
Definition
actionbase.c:31
m_StanceMask
int m_StanceMask
Definition
actionbase.c:33
ActionData
ActionBase ActionData
Definition
actionbase.c:30
ActionSewSelf
ActionSewSelfCB ActionContinuousBaseCB ActionSewSelf()
Definition
actionsewself.c:11
ActionTarget
class ActionTargets ActionTarget
ActionBandageBase
Definition
actionbandagebase.c:2
ActionBandageBase::ApplyBandage
void ApplyBandage(ItemBase item, PlayerBase player)
Definition
actionbandagebase.c:3
ActionBaseCB::m_ActionData
ActionData m_ActionData
Definition
animatedactionbase.c:3
ActionBase::CreateConditionComponents
void CreateConditionComponents()
Definition
actionbase.c:236
ActionBase::HasTarget
bool HasTarget()
Action is performed on target, not with item itself, when set to true.
Definition
actionbase.c:250
ActionContinuousBaseCB
Definition
actioncontinuousbase.c:2
ActionContinuousBase::OnFinishProgressServer
void OnFinishProgressServer(ActionData action_data)
Definition
actioncontinuousbase.c:283
ActionSewSelfCB
Definition
actionsewself.c:2
ActionSewSelfCB::CreateActionComponent
override void CreateActionComponent()
Definition
actionsewself.c:3
AnimatedActionBase::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
animatedactionbase.c:240
CAContinuousRepeat
Definition
cacontinuousrepeat.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::SEW_CUTS
const float SEW_CUTS
Definition
actionconstants.c:47
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:602
AGT_ITEM_TO_FLESH
const int AGT_ITEM_TO_FLESH
Definition
constants.c:509
GetPlugin
PluginBase GetPlugin(typename plugin_type)
Definition
pluginmanager.c:325
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
continuous
medical
actionsewself.c
Generated by
1.17.0