Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actiongagself.c
Go to the documentation of this file.
1
class
ActionGagSelf
:
ActionContinuousBase
2
{
3
void
ActionGagSelf
()
4
{
5
m_CallbackClass
=
ActionCoverHeadSelfCB
;
6
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONMOD_COVERHEAD_SELF;
7
//m_FullBody = true;
8
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_ERECT |
DayZPlayerConstants
.STANCEMASK_CROUCH;
9
m_SpecialtyWeight
= UASoftSkillsWeight.ROUGH_LOW;
10
m_Text
=
"#gag_self"
;
11
}
12
13
override
void
CreateConditionComponents
()
14
{
15
m_ConditionItem
=
new
CCINonRuined
;
16
m_ConditionTarget
=
new
CCTSelf
;
17
}
18
19
override
bool
HasTarget
()
20
{
21
return
false
;
22
}
23
24
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item )
25
{
26
if
(item.GetQuantity() > 1)
27
return
false
;
28
29
if
( !
IsWearingMask
(player) )
30
{
31
ItemBase
headgear =
ItemBase
.Cast(player.FindAttachmentBySlotName(
"Headgear"
));
32
if
( headgear )
33
{
34
bool
headgear_restricted;
35
headgear_restricted = headgear.ConfigGetBool(
"noMask"
);
36
if
(headgear_restricted)
37
{
38
return
false
;
39
}
40
}
41
return
true
;
42
}
43
44
return
false
;
45
}
46
47
override
void
OnFinishProgressServer
(
ActionData
action_data )
48
{
49
ItemBase
new_item;
50
if
(
Class
.
CastTo
(new_item,action_data.m_Player.GetInventory().CreateAttachmentEx(
"MouthRag"
,
InventorySlots
.MASK)))
51
{
52
MiscGameplayFunctions.TransferItemProperties(action_data.m_MainItem,new_item,
true
,
false
,
true
);
53
54
action_data.m_MainItem.TransferModifiers(action_data.m_Player);
55
action_data.m_MainItem.Delete();
56
}
57
}
58
59
bool
IsWearingMask
(
PlayerBase
player)
60
{
61
if
( player.GetInventory().FindAttachment(
InventorySlots
.MASK) )
62
{
63
return
true
;
64
}
65
return
false
;
66
}
67
};
ActionData
ActionBase ActionData
Definition
actionbase.c:30
ActionTarget
class ActionTargets ActionTarget
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
ActionContinuousBase::ActionContinuousBase
void ActionContinuousBase()
Definition
actioncontinuousbase.c:124
ActionCoverHeadSelfCB
Definition
actioncoverheadself.c:2
ActionGagSelf::OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition
actiongagself.c:47
ActionGagSelf::ActionGagSelf
void ActionGagSelf()
Definition
actiongagself.c:3
ActionGagSelf::CreateConditionComponents
override void CreateConditionComponents()
Definition
actiongagself.c:13
ActionGagSelf::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actiongagself.c:24
ActionGagSelf::HasTarget
override bool HasTarget()
Definition
actiongagself.c:19
ActionGagSelf::IsWearingMask
bool IsWearingMask(PlayerBase player)
Definition
actiongagself.c:59
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
animatedactionbase.c:143
AnimatedActionBase::m_CallbackClass
m_CallbackClass
Definition
animatedactionbase.c:145
CCINonRuined
Definition
ccinonruined.c:2
CCTSelf
Definition
cctself.c:2
Class
Super root of all classes in Enforce script.
Definition
enscript.c:11
InventorySlots
provides access to slot configuration
Definition
inventoryslots.c:6
ItemBase
Definition
inventoryitem.c:742
PlayerBase
Definition
playerbaseclient.c:2
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:602
Class::CastTo
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
continuous
actiongagself.c
Generated by
1.17.0