DayZ 1.24
Loading...
Searching...
No Matches
ActionPin.c
Go to the documentation of this file.
1class ActionPin extends ActionSingleUseBase
2{
3 void ActionPin()
4 {
5 m_Text = "#pin";
6 }
7
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
33 if (grenade)
34 {
35 if (!grenade.IsPinned() && grenade.IsPinnable())
36 return true;
37 }
38
39 return false;
40 }
41
43 {
45 if (grenade)
46 grenade.Pin();
47 }
48}
string m_Text
Definition ActionBase.c:49
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
override bool HasTarget()
Definition ActionPin.c:14
override void OnExecute(ActionData action_data)
Definition ActionPin.c:42
override void CreateConditionComponents()
Definition ActionPin.c:8
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition ActionPin.c:19
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597