Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actionunpin.c
Go to the documentation of this file.
1
class
ActionUnpin
extends
ActionSingleUseBase
2
{
3
void
ActionUnpin
()
4
{
5
m_Text
=
"#unpin"
;
6
}
7
8
override
void
CreateConditionComponents
()
9
{
10
m_ConditionItem
=
new
CCINonRuined
;
11
m_ConditionTarget
=
new
CCTNone
;
12
}
13
14
override
bool
HasTarget
()
15
{
16
return
false
;
17
}
18
19
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item )
20
{
21
if
( item.IsInherited(
Grenade_Base
) )
22
{
23
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONMOD_UNPINGRENAGE;
24
}
25
else
26
{
27
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONMOD_ITEM_ON;
28
}
29
30
Grenade_Base
grenade =
Grenade_Base
.Cast(item);
31
if
( grenade )
32
{
33
if
( grenade.
IsPinned
() )
34
{
35
return
true
;
36
}
37
}
38
39
return
false
;
40
}
41
42
override
void
OnExecute
(
ActionData
action_data )
43
{
44
Grenade_Base
grenade =
Grenade_Base
.Cast(action_data.m_MainItem);
45
if
( grenade )
46
{
47
grenade.
Unpin
();
48
}
49
}
50
}
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_ConditionTarget
ref CCTBase m_ConditionTarget
Definition
actionbase.c:71
ActionSingleUseBase
Definition
actionsingleusebase.c:30
ActionSingleUseBase::ActionUnpin
void ActionUnpin()
Definition
actionunpin.c:3
ActionSingleUseBase::CreateConditionComponents
override void CreateConditionComponents()
Definition
actionunpin.c:8
ActionSingleUseBase::OnExecute
override void OnExecute(ActionData action_data)
Definition
actionunpin.c:42
ActionSingleUseBase::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actionunpin.c:19
ActionSingleUseBase::HasTarget
override bool HasTarget()
Definition
actionunpin.c:14
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
animatedactionbase.c:143
CCINonRuined
Definition
ccinonruined.c:2
CCTNone
Definition
cctnone.c:2
Grenade_Base
Definition
flashgrenade.c:2
Grenade_Base::Unpin
void Unpin()
Definition
grenade_base.c:52
Grenade_Base::IsPinned
bool IsPinned()
Definition
grenade_base.c:74
ItemBase
Definition
inventoryitem.c:742
PlayerBase
Definition
playerbaseclient.c:2
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:602
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
singleuse
actionunpin.c
Generated by
1.17.0