Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actionattachonproxy.c
Go to the documentation of this file.
1
class
ActionAttachOnProxy
:
ActionAttach
2
{
3
void
ActionAttachOnProxy
()
4
{
5
m_Text =
"#attach"
;
6
}
7
8
override
void
CreateConditionComponents
()
9
{
10
m_ConditionItem =
new
CCINonRuined
;
11
m_ConditionTarget =
new
CCTCursor
;
12
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONMOD_ATTACHITEM;
13
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_ERECT |
DayZPlayerConstants
.STANCEMASK_CROUCH;
14
}
15
16
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item )
17
{
18
Object
targetObject = target.GetObject();
19
Object
targetParent = target.GetParent();
20
EntityAI
target_entity =
EntityAI
.Cast( targetParent );
21
EntityAI
item_entity = item;
22
23
if
( targetParent )
24
{
25
if
( target_entity && item_entity )
26
{
27
if
( target_entity.GetInventory() && target_entity.GetInventory().CanAddAttachment( item_entity ) )
28
{
29
return
true
;
30
}
31
}
32
}
33
34
return
false
;
35
}
36
37
override
void
OnExecuteClient
(
ActionData
action_data )
38
{
39
super.OnExecuteClient( action_data );
40
41
if
( action_data.m_Player.IsPlacingLocal() )
42
{
43
action_data.m_Player.TogglePlacingLocal();
44
}
45
}
46
}
ActionAttach
AttachActionData ActionData ActionAttach()
Definition
actionattach.c:9
m_CommandUID
int m_CommandUID
Definition
actionbase.c:31
m_StanceMask
int m_StanceMask
Definition
actionbase.c:33
ActionData
ActionBase ActionData
Definition
actionbase.c:30
ActionTarget
class ActionTargets ActionTarget
ActionAttachOnProxy::ActionAttachOnProxy
void ActionAttachOnProxy()
Definition
actionattachonproxy.c:3
ActionAttachOnProxy::CreateConditionComponents
override void CreateConditionComponents()
Definition
actionattachonproxy.c:8
ActionAttachOnProxy::OnExecuteClient
override void OnExecuteClient(ActionData action_data)
Definition
actionattachonproxy.c:37
ActionAttachOnProxy::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actionattachonproxy.c:16
CCINonRuined
Definition
ccinonruined.c:2
CCTCursor
Definition
cctcursor.c:2
EntityAI
Definition
inventoryitem.c:2
ItemBase
Definition
inventoryitem.c:742
Object
Definition
objecttyped.c:2
PlayerBase
Definition
playerbaseclient.c:2
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:602
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
singleuse
actionattachonproxy.c
Generated by
1.17.0