DayZ 1.24
Loading...
Searching...
No Matches
ActionUnpin.c
Go to the documentation of this file.
1class ActionUnpin extends ActionSingleUseBase
2{
4 {
5 m_Text = "#unpin";
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 if (item.IsInherited(Grenade_Base))
22 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_UNPINGRENAGE;
23 else
24 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_ITEM_ON;
25
27 if (grenade)
28 {
29 if (grenade.IsPinned())
30 return true;
31 }
32
33 return false;
34 }
35
37 {
39 if (grenade)
40 grenade.Unpin();
41 }
42}
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 ActionUnpin.c:14
override void OnExecute(ActionData action_data)
Definition ActionUnpin.c:36
override void CreateConditionComponents()
Definition ActionUnpin.c:8
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition ActionUnpin.c:19
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597