Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionpin.c
Go to the documentation of this file.
1
class
ActionPin
extends
ActionSingleUseBase
2
{
3
void
ActionPin()
4
{
5
m_Text
=
"#pin"
;
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
/*
22
if ( item.IsInherited(Grenade_Base) )
23
{
24
m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_PINGRENAGE;
25
}
26
else
27
*/
28
{
29
m_CommandUID =
DayZPlayerConstants
.CMD_ACTIONMOD_ITEM_ON;
30
}
31
32
Grenade_Base
grenade =
Grenade_Base
.Cast(item);
33
if
( grenade )
34
{
35
if
( !grenade.IsPinned() && grenade.IsPinnable() )
36
{
37
return
true
;
38
}
39
}
40
41
return
false
;
42
}
43
44
override
void
OnExecute
(
ActionData
action_data )
45
{
46
Grenade_Base
grenade =
Grenade_Base
.Cast(action_data.m_MainItem);
47
if
( grenade )
48
{
49
grenade.Pin();
50
}
51
}
52
}
ItemBase
Definition:
inventoryitem.c:730
OnExecute
override void OnExecute(ActionData action_data)
Definition:
actionpacktent.c:111
Grenade_Base
Definition:
flashgrenade.c:1
CCTNone
Definition:
cctnone.c:1
HasTarget
bool HasTarget()
Definition:
actionbase.c:232
PlayerBase
Definition:
playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition:
actionbase.c:20
CreateConditionComponents
void CreateConditionComponents()
Definition:
actionbase.c:218
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition:
dayzplayer.c:601
ActionCondition
protected bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition:
actionbase.c:372
m_Text
protected string m_Text
Definition:
actionbase.c:49
ActionSingleUseBase
Definition:
actionsingleusebase.c:41
m_ConditionItem
ref CCIBase m_ConditionItem
Definition:
actionbase.c:55
CCINonRuined
Definition:
ccinonruined.c:1
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition:
actionbase.c:56
DAYZ
scripts_v1.24.157551
scripts
world
classes
useractionscomponent
actions
singleuse
actionpin.c
Generated by
1.8.17