Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actionplugintofence.c
Go to the documentation of this file.
1
2
class
ActionPlugIntoFence
:
ActionSingleUseBase
3
{
4
void
ActionPlugIntoFence
()
5
{
6
m_Text
=
"#plug_in"
;
7
}
8
9
override
void
CreateConditionComponents
()
10
{
11
m_ConditionItem
=
new
CCINonRuined
;
12
m_ConditionTarget
=
new
CCTNonRuined
(
UAMaxDistances
.
DEFAULT
);
13
}
14
15
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item )
16
{
17
Object
targetObject = target.GetObject();
18
19
if
( targetObject && item && targetObject.IsInherited(
BaseBuildingBase
))
20
{
21
BaseBuildingBase
target_BBB =
BaseBuildingBase
.Cast( targetObject );
22
23
BarbedWire bw = BarbedWire.Cast( target_BBB.GetAttachmentByType(BarbedWire) );
24
25
if
( bw && bw.GetCompEM().CanReceivePlugFrom(item) )
26
{
27
return
true
;
28
}
29
}
30
31
return
false
;
32
}
33
34
override
void
OnExecuteServer
(
ActionData
action_data )
35
{
36
Object
targetObject = action_data.m_Target.GetObject();
37
ItemBase
target_IB =
ItemBase
.Cast( targetObject );
38
BarbedWire bw = BarbedWire.Cast( target_IB.GetAttachmentByType(BarbedWire) );
39
action_data.m_MainItem.GetCompEM().PlugThisInto(bw);
40
41
if
( !action_data.m_Player.IsPlacingServer() )
42
{
43
//action_data.m_Player.TogglePlacing( action_data.m_Target, action_data.m_MainItem );
44
}
45
}
46
};
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
ActionPlugIntoFence::ActionPlugIntoFence
void ActionPlugIntoFence()
Definition
actionplugintofence.c:4
ActionPlugIntoFence::OnExecuteServer
override void OnExecuteServer(ActionData action_data)
Definition
actionplugintofence.c:34
ActionPlugIntoFence::CreateConditionComponents
override void CreateConditionComponents()
Definition
actionplugintofence.c:9
ActionPlugIntoFence::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actionplugintofence.c:15
ActionSingleUseBase::ActionSingleUseBase
void ActionSingleUseBase()
Definition
actionsingleusebase.c:31
BaseBuildingBase
Definition
fence.c:2
CCINonRuined
Definition
ccinonruined.c:2
CCTNonRuined
Definition
cctnonruined.c:2
ItemBase
Definition
inventoryitem.c:742
Object
Definition
objecttyped.c:2
PlayerBase
Definition
playerbaseclient.c:2
UAMaxDistances
Definition
actionconstants.c:110
UAMaxDistances::DEFAULT
const float DEFAULT
Definition
actionconstants.c:112
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
singleuse
actionplugintofence.c
Generated by
1.17.0