Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actiondismantleoven.c
Go to the documentation of this file.
1
class
ActionDismantleOvenCB
:
ActionContinuousBaseCB
2
{
3
override
void
CreateActionComponent
()
4
{
5
m_ActionData
.m_ActionComponent =
new
CAContinuousTime
(
UATimeSpent
.
DEFAULT_DECONSTRUCT
);
6
}
7
}
8
9
class
ActionDismantleOven
:
ActionContinuousBase
10
{
11
void
ActionDismantleOven
()
12
{
13
m_CallbackClass =
ActionDismantleOvenCB
;
14
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONFB_CRAFTING;
15
m_FullBody =
true
;
16
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_CROUCH;
17
m_SpecialtyWeight = UASoftSkillsWeight.ROUGH_HIGH;
18
19
m_Text =
"#dismantle_oven"
;
20
}
21
22
override
void
CreateConditionComponents
()
23
{
24
25
m_ConditionTarget =
new
CCTNonRuined
(
UAMaxDistances
.
DEFAULT
);
26
m_ConditionItem =
new
CCINotPresent
;
27
}
28
29
override
typename
GetInputType
()
30
{
31
return
ContinuousInteractActionInput
;
32
}
33
34
/*override bool HasProgress()
35
{
36
return false;
37
}*/
38
39
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item )
40
{
41
//Action not allowed if player has broken legs
42
if
(player.GetBrokenLegs() ==
eBrokenLegs
.BROKEN_LEGS)
43
return
false
;
44
45
Object
target_object = target.GetObject();
46
47
if
( target_object && target_object.IsFireplace() )
48
{
49
FireplaceBase
fireplace_target =
FireplaceBase
.Cast( target_object );
50
51
if
( fireplace_target.
IsBaseFireplace
() && fireplace_target.CanDismantleOven() )
52
{
53
return
true
;
54
}
55
}
56
57
return
false
;
58
}
59
60
override
void
OnFinishProgressServer
(
ActionData
action_data )
61
{
62
Object
target_object = action_data.m_Target.GetObject();
63
FireplaceBase
fireplace_target =
FireplaceBase
.Cast( target_object );
64
65
if
( fireplace_target.CanDismantleOven() )
66
{
67
ItemBase
attached_item =
ItemBase
.Cast( fireplace_target.GetAttachmentByType( fireplace_target.ATTACHMENT_STONES ) );
68
69
// for backward compatibility - for the cases built before slot locking was commented out for the stone att slot
70
InventoryLocation
inventory_location =
new
InventoryLocation
;
71
attached_item.GetInventory().GetCurrentInventoryLocation( inventory_location );
72
fireplace_target.GetInventory().SetSlotLock( inventory_location.
GetSlot
(),
false
);
73
74
//set oven state
75
fireplace_target.SetOvenState(
false
);
76
77
// extend lifetime (either back to stone circle lifetime or standard fireplace one)
78
if
( fireplace_target.HasStoneCircle() )
79
{
80
fireplace_target.SetLifetimeMax(
FireplaceBase
.LIFETIME_FIREPLACE_STONE_CIRCLE );
81
}
82
else
83
{
84
fireplace_target.SetLifetimeMax( 10800 );
85
}
86
}
87
}
88
}
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
ActionDismantleOven
ActionDismantleOvenCB ActionContinuousBaseCB ActionDismantleOven()
Definition
actiondismantleoven.c:11
ActionTarget
class ActionTargets ActionTarget
ActionBaseCB::m_ActionData
ActionData m_ActionData
Definition
animatedactionbase.c:3
ActionBase::CreateConditionComponents
void CreateConditionComponents()
Definition
actionbase.c:236
ActionContinuousBaseCB
Definition
actioncontinuousbase.c:2
ActionContinuousBase
Definition
actioncontinuousbase.c:121
ActionContinuousBase::OnFinishProgressServer
void OnFinishProgressServer(ActionData action_data)
Definition
actioncontinuousbase.c:283
ActionContinuousBase::GetInputType
override GetInputType()
Definition
actioncontinuousbase.c:179
ActionDismantleOvenCB
Definition
actiondismantleoven.c:2
ActionDismantleOvenCB::CreateActionComponent
override void CreateActionComponent()
Definition
actiondismantleoven.c:3
AnimatedActionBase::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
animatedactionbase.c:240
CAContinuousTime
Definition
cacontinuoustime.c:2
CCINotPresent
Definition
ccinotpresent.c:2
CCTNonRuined
Definition
cctnonruined.c:2
ContinuousInteractActionInput
Definition
actioninput.c:523
FireplaceBase
Definition
barrelholes_colorbase.c:2
FireplaceBase::IsBaseFireplace
override bool IsBaseFireplace()
Definition
barrelholes_colorbase.c:54
InventoryLocation
InventoryLocation.
Definition
inventorylocation.c:30
InventoryLocation::GetSlot
proto native int GetSlot()
returns slot id if current type is Attachment
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
UATimeSpent
Definition
actionconstants.c:28
UATimeSpent::DEFAULT_DECONSTRUCT
const float DEFAULT_DECONSTRUCT
Definition
actionconstants.c:34
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:602
eBrokenLegs
eBrokenLegs
Definition
ebrokenlegs.c:2
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
continuous
actiondismantleoven.c
Generated by
1.17.0