DayZ 1.24
Loading...
Searching...
No Matches
ActionPlugIntoFence Class Reference
Inheritance diagram for ActionPlugIntoFence:
[legend]
Collaboration diagram for ActionPlugIntoFence:
[legend]

Private Member Functions

void ActionPlugIntoFence ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnExecuteServer (ActionData action_data)
 

Detailed Description

Definition at line 1 of file ActionPlugIntoFence.c.

Constructor & Destructor Documentation

◆ ActionPlugIntoFence()

void ActionPlugIntoFence::ActionPlugIntoFence ( )
inlineprivate

Definition at line 3 of file ActionPlugIntoFence.c.

4 {
5 m_Text = "#plug_in";
6 }
string m_Text
Definition ActionBase.c:49

References m_Text.

Member Function Documentation

◆ ActionCondition()

override bool ActionPlugIntoFence::ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate

Definition at line 14 of file ActionPlugIntoFence.c.

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 }

◆ CreateConditionComponents()

override void ActionPlugIntoFence::CreateConditionComponents ( )
inlineprivate

Definition at line 8 of file ActionPlugIntoFence.c.

9 {
12 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
const float DEFAULT

References UAMaxDistances::DEFAULT, m_ConditionItem, and m_ConditionTarget.

◆ OnExecuteServer()

override void ActionPlugIntoFence::OnExecuteServer ( ActionData action_data)
inlineprivate

Definition at line 31 of file ActionPlugIntoFence.c.

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 }

The documentation for this class was generated from the following file: