Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actiontakematerialtohandsswitch.c
Go to the documentation of this file.
1
2
class
ActionTakeMaterialToHandsSwitch
:
ActionSingleUseBase
3
{
4
void
ActionTakeMaterialToHandsSwitch
()
5
{
6
m_Text
=
"#switch_to_next_material"
;
7
}
8
9
override
void
CreateConditionComponents
()
10
{
11
m_ConditionItem
=
new
CCINotPresent
;
12
m_ConditionTarget
=
new
CCTNonRuined
(
UAMaxDistances
.
BASEBUILDING
);
13
}
14
15
override
bool
IsInstant
()
16
{
17
return
true
;
18
}
19
20
override
bool
RemoveForceTargetAfterUse
()
21
{
22
return
false
;
23
}
24
25
override
bool
UseAcknowledgment
()
26
{
27
return
true
;
28
}
29
30
override
typename
GetInputType
()
31
{
32
return
InteractActionInput
;
33
}
34
35
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item )
36
{
37
EntityAI
target_entity =
EntityAI
.Cast( target.GetObject() );
38
if
( target_entity && target_entity.CanUseConstruction() )
39
{
40
BaseBuildingBase
base_building =
BaseBuildingBase
.Cast( target_entity );
41
if
(!base_building.
IsPlayerInside
(player,
""
))
42
return
false
;
43
44
ConstructionActionData
construction_action_data = player.GetConstructionActionData();
45
46
string
main_part_name = target_entity.GetActionComponentName( target.GetComponentIndex() );
47
construction_action_data.
RefreshAttachmentsToDetach
( target_entity, main_part_name );
48
49
if
( construction_action_data.
GetAttachmentsToDetachCount
() > 1 )
50
{
51
return
true
;
52
}
53
}
54
55
return
false
;
56
}
57
58
override
void
Start
(
ActionData
action_data )
59
{
60
super.Start( action_data );
61
62
//set next index
63
ConstructionActionData
construction_action_data = action_data.m_Player.GetConstructionActionData();
64
construction_action_data.
SetNextAttachmentIndex
();
65
}
66
}
ActionData
ActionBase ActionData
Definition
actionbase.c:30
ActionTarget
class ActionTargets ActionTarget
ActionBase::m_Text
string m_Text
Definition
actionbase.c:64
ActionBase::m_ConditionItem
ref CCIBase m_ConditionItem
Definition
actionbase.c:70
ActionBase::m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition
actionbase.c:71
ActionSingleUseBase::ActionSingleUseBase
void ActionSingleUseBase()
Definition
actionsingleusebase.c:31
ActionTakeMaterialToHandsSwitch::ActionTakeMaterialToHandsSwitch
void ActionTakeMaterialToHandsSwitch()
Definition
actiontakematerialtohandsswitch.c:4
ActionTakeMaterialToHandsSwitch::IsInstant
override bool IsInstant()
Definition
actiontakematerialtohandsswitch.c:15
ActionTakeMaterialToHandsSwitch::Start
override void Start(ActionData action_data)
Definition
actiontakematerialtohandsswitch.c:58
ActionTakeMaterialToHandsSwitch::CreateConditionComponents
override void CreateConditionComponents()
Definition
actiontakematerialtohandsswitch.c:9
ActionTakeMaterialToHandsSwitch::RemoveForceTargetAfterUse
override bool RemoveForceTargetAfterUse()
Definition
actiontakematerialtohandsswitch.c:20
ActionTakeMaterialToHandsSwitch::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actiontakematerialtohandsswitch.c:35
ActionTakeMaterialToHandsSwitch::GetInputType
override GetInputType()
Definition
actiontakematerialtohandsswitch.c:30
ActionTakeMaterialToHandsSwitch::UseAcknowledgment
override bool UseAcknowledgment()
Definition
actiontakematerialtohandsswitch.c:25
BaseBuildingBase
Definition
fence.c:2
BaseBuildingBase::IsPlayerInside
override bool IsPlayerInside(PlayerBase player, string selection)
Definition
fence.c:615
CCINotPresent
Definition
ccinotpresent.c:2
CCTNonRuined
Definition
cctnonruined.c:2
ConstructionActionData
Definition
constructionactiondata.c:2
ConstructionActionData::RefreshAttachmentsToDetach
void RefreshAttachmentsToDetach(EntityAI target, string main_part_name)
Definition
constructionactiondata.c:351
ConstructionActionData::GetAttachmentsToDetachCount
int GetAttachmentsToDetachCount()
Definition
constructionactiondata.c:375
ConstructionActionData::SetNextAttachmentIndex
void SetNextAttachmentIndex()
Definition
constructionactiondata.c:356
EntityAI
Definition
inventoryitem.c:2
InteractActionInput
Definition
actioninput.c:536
ItemBase
Definition
inventoryitem.c:742
PlayerBase
Definition
playerbaseclient.c:2
UAMaxDistances
Definition
actionconstants.c:110
UAMaxDistances::BASEBUILDING
const float BASEBUILDING
Definition
actionconstants.c:116
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
singleuse
actiontakematerialtohandsswitch.c
Generated by
1.17.0