DayZ 1.24
Loading...
Searching...
No Matches
ActionPlugIntoFence.c
Go to the documentation of this file.
2{
4 {
5 m_Text = "#plug_in";
6 }
7
13
14 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
15 {
16 Object targetObject = target.GetObject();
17
18 if (targetObject && item && targetObject.IsInherited(BaseBuildingBase))
19 {
21
22 BarbedWire bw = BarbedWire.Cast(target_BBB.GetAttachmentByType(BarbedWire));
23
24 if (bw && bw.GetCompEM().CanReceivePlugFrom(item))
25 return true;
26 }
27
28 return false;
29 }
30
32 {
33 Object targetObject = action_data.m_Target.GetObject();
35 BarbedWire bw = BarbedWire.Cast(target_IB.GetAttachmentByType(BarbedWire));
36 action_data.m_MainItem.GetCompEM().PlugThisInto(bw);
37
38 if (!action_data.m_Player.IsPlacingServer())
39 {
40 //action_data.m_Player.TogglePlacing( action_data.m_Target, action_data.m_MainItem );
41 }
42 }
43};
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 OnExecuteServer(ActionData action_data)
override void CreateConditionComponents()
const float DEFAULT