DayZ
1.24
Loading...
Searching...
No Matches
ActionPlaceFireplaceIntoBarrel.c
Go to the documentation of this file.
1
class
ActionPlaceFireplaceIntoBarrel
:
ActionSingleUseBase
2
{
3
void
ActionPlaceFireplaceIntoBarrel
()
4
{
5
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONMOD_OPENDOORFW;
6
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_CROUCH |
DayZPlayerConstants
.STANCEMASK_ERECT;
7
m_SpecialtyWeight
=
UASoftSkillsWeight
.
ROUGH_LOW
;
8
m_Text
=
"#place_object"
;
9
}
10
11
override
void
CreateConditionComponents
()
12
{
13
m_ConditionItem
=
new
CCINonRuined
;
14
m_ConditionTarget
=
new
CCTNonRuined
(
UAMaxDistances
.
DEFAULT
);
15
}
16
17
override
bool
ActionCondition
(
PlayerBase
player
, ActionTarget
target
,
ItemBase
item
)
18
{
19
Object
target_object
=
target
.GetObject();
20
21
if
(
target_object
&&
target_object
.IsInherited(
BarrelHoles_ColorBase
))
22
{
23
BarrelHoles_ColorBase
fireplace_barrel
=
BarrelHoles_ColorBase
.Cast(
target_object
);
24
25
if
(
fireplace_barrel
.IsOpen() &&
fireplace_barrel
.GetInventory().AttachmentCount() == 0 &&
fireplace_barrel
.IsCargoEmpty())
26
return
true
;
27
}
28
29
return
false
;
30
}
31
32
override
void
OnExecuteServer
(
ActionData
action_data
)
33
{
34
FireplaceBase
fireplace_in_hands
=
FireplaceBase
.Cast(
action_data
.m_MainItem);
35
BarrelHoles_ColorBase
fireplace_barrel
=
BarrelHoles_ColorBase
.Cast(
action_data
.m_Target.GetObject());
36
37
auto
lambda
=
new
MoveEquipToExistingItemAndDestroyOldRootLambda
(
fireplace_in_hands
,
""
,
action_data
.m_Player,
fireplace_barrel
);
38
action_data
.m_Player.ServerReplaceItemInHandsWithNewElsewhere(
lambda
);
39
40
action_data
.m_Player.GetSoftSkillsManager().AddSpecialty(
m_SpecialtyWeight
);
41
}
42
}
m_Text
string m_Text
Definition
ActionBase.c:49
m_ConditionItem
ref CCIBase m_ConditionItem
Definition
ActionBase.c:55
m_SpecialtyWeight
float m_SpecialtyWeight
Definition
ActionBase.c:68
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition
ActionBase.c:56
m_StanceMask
int m_StanceMask
Definition
ActionBase.c:53
MoveEquipToExistingItemAndDestroyOldRootLambda
void MoveEquipToExistingItemAndDestroyOldRootLambda(EntityAI old_item, string new_item_type, PlayerBase player, EntityAI new_item)
Definition
MiscGameplayFunctions.c:158
ActionData
Definition
ActionBase.c:21
ActionPlaceFireplaceIntoBarrel
Definition
ActionPlaceFireplaceIntoBarrel.c:2
ActionPlaceFireplaceIntoBarrel::CreateConditionComponents
override void CreateConditionComponents()
Definition
ActionPlaceFireplaceIntoBarrel.c:11
ActionPlaceFireplaceIntoBarrel::OnExecuteServer
override void OnExecuteServer(ActionData action_data)
Definition
ActionPlaceFireplaceIntoBarrel.c:32
ActionPlaceFireplaceIntoBarrel::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
ActionPlaceFireplaceIntoBarrel.c:17
ActionPlaceFireplaceIntoBarrel::ActionPlaceFireplaceIntoBarrel
void ActionPlaceFireplaceIntoBarrel()
Definition
ActionPlaceFireplaceIntoBarrel.c:3
ActionSingleUseBase
Definition
ActionSingleUseBase.c:40
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
AnimatedActionBase.c:122
BarrelHoles_ColorBase
Definition
BarrelHoles_Blue.c:2
CCINonRuined
Definition
CCINonRuined.c:2
CCTNonRuined
Definition
CCTNonRuined.c:2
FireplaceBase
Definition
BarrelHoles_ColorBase.c:2
ItemBase
Definition
InventoryItem.c:697
Object
Definition
ObjectTyped.c:2
Param3
Definition
EntityAI.c:95
PlayerBase
Definition
PlayerBaseClient.c:2
UAMaxDistances
Definition
ActionConstants.c:105
UAMaxDistances::DEFAULT
const float DEFAULT
Definition
ActionConstants.c:107
UASoftSkillsWeight
Definition
ActionConstants.c:119
UASoftSkillsWeight::ROUGH_LOW
const float ROUGH_LOW
Definition
ActionConstants.c:120
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:597
scripts
4_World
Classes
UserActionsComponent
Actions
SingleUse
ActionPlaceFireplaceIntoBarrel.c
Generated by
1.10.0