Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
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
}
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::CreateConditionComponents
override void CreateConditionComponents()
Definition
actionpin.c:8
ActionSingleUseBase::OnExecute
override void OnExecute(ActionData action_data)
Definition
actionpin.c:44
ActionSingleUseBase::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actionpin.c:19
ActionSingleUseBase::ActionPin
void ActionPin()
Definition
actionpin.c:3
ActionSingleUseBase::HasTarget
override bool HasTarget()
Definition
actionpin.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::IsPinnable
bool IsPinnable()
Definition
grenade_base.c:79
Grenade_Base::IsPinned
bool IsPinned()
Definition
grenade_base.c:74
Grenade_Base::Pin
void Pin()
Definition
grenade_base.c:44
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
actionpin.c
Generated by
1.17.0