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

Private Member Functions

void ActionTakeMaterialToHandsSwitch ()
 
override void CreateConditionComponents ()
 
override bool IsInstant ()
 
override bool RemoveForceTargetAfterUse ()
 
override bool UseAcknowledgment ()
 
override GetInputType ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void Start (ActionData action_data)
 

Detailed Description

Definition at line 1 of file ActionTakeMaterialToHandsSwitch.c.

Constructor & Destructor Documentation

◆ ActionTakeMaterialToHandsSwitch()

void ActionTakeMaterialToHandsSwitch::ActionTakeMaterialToHandsSwitch ( )
inlineprivate

Definition at line 3 of file ActionTakeMaterialToHandsSwitch.c.

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

References m_Text.

Member Function Documentation

◆ ActionCondition()

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

Definition at line 34 of file ActionTakeMaterialToHandsSwitch.c.

35 {
36 EntityAI target_entity = EntityAI.Cast(target.GetObject());
37 if (target_entity && target_entity.CanUseConstruction())
38 {
40 if (!base_building.IsPlayerInside(player, ""))
41 return false;
42
43 ConstructionActionData construction_action_data = player.GetConstructionActionData();
44
45 string main_part_name = target_entity.GetActionComponentName(target.GetComponentIndex());
46 construction_action_data.RefreshAttachmentsToDetach(target_entity, main_part_name);
47
48 if (construction_action_data.GetAttachmentsToDetachCount() > 1)
49 return true;
50 }
51
52 return false;
53 }

◆ CreateConditionComponents()

override void ActionTakeMaterialToHandsSwitch::CreateConditionComponents ( )
inlineprivate

◆ GetInputType()

override ActionTakeMaterialToHandsSwitch::GetInputType ( )
inlineprivate

Definition at line 29 of file ActionTakeMaterialToHandsSwitch.c.

◆ IsInstant()

override bool ActionTakeMaterialToHandsSwitch::IsInstant ( )
inlineprivate

Definition at line 14 of file ActionTakeMaterialToHandsSwitch.c.

15 {
16 return true;
17 }

◆ RemoveForceTargetAfterUse()

override bool ActionTakeMaterialToHandsSwitch::RemoveForceTargetAfterUse ( )
inlineprivate

Definition at line 19 of file ActionTakeMaterialToHandsSwitch.c.

20 {
21 return false;
22 }

◆ Start()

override void ActionTakeMaterialToHandsSwitch::Start ( ActionData action_data)
inlineprivate

Definition at line 55 of file ActionTakeMaterialToHandsSwitch.c.

56 {
57 super.Start(action_data);
58
59 //set next index
60 ConstructionActionData construction_action_data = action_data.m_Player.GetConstructionActionData();
61 construction_action_data.SetNextAttachmentIndex();
62 }

◆ UseAcknowledgment()

override bool ActionTakeMaterialToHandsSwitch::UseAcknowledgment ( )
inlineprivate

Definition at line 24 of file ActionTakeMaterialToHandsSwitch.c.

25 {
26 return true;
27 }

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