DayZ 1.24
Loading...
Searching...
No Matches
ActionTogglePlaceObject.c
Go to the documentation of this file.
2{
4 {
5 m_Text = "#toggle_placing";
6 }
7
9 {
12 }
13
14 override bool HasTarget()
15 {
16 return false;
17 }
18
19 override bool IsLocal()
20 {
21 return true;
22 }
23
24 override bool IsInstant()
25 {
26 return true;
27 }
28
29 override bool IsDeploymentAction()
30 {
31 return true;
32 }
33
35 {
36 return false;
37 }
38
40 {
41 return false;
42 }
43
44 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
45 {
46 // not placeable if liquid is present; exception for barrels, for now
47 if (!item.IsKindOf("Barrel_ColorBase") && item.IsLiquidPresent())
48 return false;
49
50 return true;
51 }
52
54 {
55 super.Start(action_data);
56
57 action_data.m_Player.SetLocalProjectionPosition(action_data.m_Target.GetCursorHitPos());
58 action_data.m_Player.TogglePlacingLocal();
59 }
60}
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 ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void CreateConditionComponents()
override bool RemoveForceTargetAfterUse()
override void Start(ActionData action_data)