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

Private Member Functions

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

Detailed Description

Definition at line 6 of file ActionInstallSparkplug.c.

Constructor & Destructor Documentation

◆ ActionInsertSparkplug()

void ActionInsertSparkplug::ActionInsertSparkplug ( )
inlineprivate

Definition at line 8 of file ActionInstallSparkplug.c.

9 {
10 }

Member Function Documentation

◆ ActionCondition()

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

Definition at line 19 of file ActionInstallSparkplug.c.

20 {
21 EntityAI target_EAI = EntityAI.Cast(target.GetObject());
22 string selection = target_EAI.GetActionComponentName(target.GetComponentIndex());
23
24 if (selection == "sparkplug" && target_EAI.GetInventory().CanAddAttachment(item))
25 return true;
26
27 return false;
28 }

◆ CreateConditionComponents()

override void ActionInsertSparkplug::CreateConditionComponents ( )
inlineprivate

Definition at line 12 of file ActionInstallSparkplug.c.

13 {
16 m_Text = "#attach";
17 }
string m_Text
Definition ActionBase.c:49
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
const float DEFAULT

References UAMaxDistances::DEFAULT, m_ConditionItem, m_ConditionTarget, and m_Text.

◆ OnExecuteClient()

override void ActionInsertSparkplug::OnExecuteClient ( ActionData action_data)
inlineprivate

Definition at line 35 of file ActionInstallSparkplug.c.

36 {
37 EntityAI target_EAI = EntityAI.Cast(action_data.m_Target.GetObject()); // cast to ItemBase
38 target_EAI.LocalTakeEntityAsAttachment(action_data.m_MainItem);
39 }

◆ OnExecuteServer()

override void ActionInsertSparkplug::OnExecuteServer ( ActionData action_data)
inlineprivate

Definition at line 30 of file ActionInstallSparkplug.c.

31 {
32 EntityAI target_EAI = EntityAI.Cast(action_data.m_Target.GetObject()); // cast to ItemBase
33 target_EAI.LocalTakeEntityAsAttachment(action_data.m_MainItem);
34 }

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