Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actionlightitemonfirewithblowtorch.c
Go to the documentation of this file.
1
class
ActionLightItemOnFireWithBlowtorchCB
:
ActionLightItemOnFireCB
2
{
3
override
void
CreateActionComponent
()
4
{
5
m_ActionData
.m_ActionComponent =
new
CAContinuousTime
(
UATimeSpent
.
FIREPLACE_IGNITE
);
6
}
7
}
8
9
class
ActionLightItemOnFireWithBlowtorch
:
ActionLightItemOnFire
10
{
11
void
ActionLightItemOnFireWithBlowtorch
()
12
{
13
m_CallbackClass =
ActionLightItemOnFireWithBlowtorchCB
;
14
}
15
16
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item)
17
{
18
Blowtorch bt = Blowtorch.Cast(item);
19
if
(!bt.HasEnoughEnergyForRepair(
UATimeSpent
.
FIREPLACE_IGNITE
))
20
{
21
return
false
;
22
}
23
24
ItemBase
target_item =
ItemBase
.Cast(target.GetObject());
25
if
(target_item && item)
26
{
27
// when igniting item on the ground with igniter in hands
28
if
(!target_item.
IsIgnited
() && !
IsItemInCargoOfSomething
(target_item) && target_item.
CanBeIgnitedBy
(item))
29
{
30
// oven stage of standard fireplace
31
if
(target_item.IsKindOf(
"Fireplace"
))
32
{
33
if
(Fireplace.Cast(target_item).IsOven())
34
{
35
return
true
;
36
}
37
38
if
(Fireplace.CanIgniteEntityAsFireplace(target_item))
39
{
40
return
true
;
41
}
42
43
return
false
;
44
}
45
46
return
true
;
47
}
48
// when igniting item in hands from something on ground
49
else
if
(!item.
IsIgnited
() && !
IsItemInCargoOfSomething
(item) && target_item.
CanIgniteItem
(item) && item.
CanBeIgnitedBy
(target_item))
50
{
51
return
true
;
52
}
53
}
54
55
return
false
;
56
}
57
58
override
void
OnUpdateServer
(
ActionData
action_data)
59
{
60
super.OnUpdate(action_data);
61
62
if
(action_data.m_State ==
UA_PROCESSING
&& !action_data.m_MainItem.GetCompEM().IsWorking())
63
{
64
Interrupt
(action_data);
65
}
66
}
67
68
override
void
OnExecuteServer
(
ActionData
action_data)
69
{
70
super.OnExecuteServer(action_data);
71
72
action_data.m_MainItem.GetCompEM().SwitchOn();
73
}
74
75
override
void
OnFinishProgressServer
(
ActionData
action_data)
76
{
77
super.OnFinishProgressServer(action_data);
78
79
action_data.m_MainItem.GetCompEM().SwitchOff();
80
}
81
82
override
void
OnEndServer
(
ActionData
action_data)
83
{
84
super.OnEndServer(action_data);
85
86
action_data.m_MainItem.GetCompEM().SwitchOff();
87
}
88
}
OnUpdateServer
void OnUpdateServer(float deltatime, float blood_scale, bool no_blood_loss)
Definition
bleedingsource.c:118
OnFinishProgressServer
override void OnFinishProgressServer(ActionData action_data)
Definition
actionactivatetrap.c:131
ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actionactivatetrap.c:46
OnEndServer
override void OnEndServer(ActionData action_data)
Definition
actionarmexplosive.c:67
ActionData
ActionBase ActionData
Definition
actionbase.c:30
OnExecuteServer
override void OnExecuteServer(ActionData action_data)
Definition
actiondigoutstash.c:57
IsItemInCargoOfSomething
bool IsItemInCargoOfSomething(ItemBase item)
Definition
actionlightitemonfire.c:40
ActionLightItemOnFire
ActionLightItemOnFireCB ActionContinuousBaseCB ActionLightItemOnFire()
Definition
actionlightitemonfire.c:11
ActionLightItemOnFireWithBlowtorch
ActionLightItemOnFireWithBlowtorchCB ActionLightItemOnFireCB ActionLightItemOnFireWithBlowtorch()
Definition
actionlightitemonfirewithblowtorch.c:11
Interrupt
void Interrupt()
Definition
actionmanagerbase.c:284
ActionTarget
class ActionTargets ActionTarget
ActionBaseCB::m_ActionData
ActionData m_ActionData
Definition
animatedactionbase.c:3
ActionLightItemOnFireCB
Definition
actionlightitemonfire.c:2
ActionLightItemOnFireWithBlowtorchCB
Definition
actionlightitemonfirewithblowtorch.c:2
ActionLightItemOnFireWithBlowtorchCB::CreateActionComponent
override void CreateActionComponent()
Definition
actionlightitemonfirewithblowtorch.c:3
CAContinuousTime
Definition
cacontinuoustime.c:2
ItemBase
Definition
inventoryitem.c:742
ItemBase::CanBeIgnitedBy
override bool CanBeIgnitedBy(EntityAI igniter=NULL)
Definition
bandagedressing.c:11
ItemBase::IsIgnited
override bool IsIgnited()
Definition
blowtorch.c:76
ItemBase::CanIgniteItem
override bool CanIgniteItem(EntityAI ignite_target=NULL)
Definition
bandagedressing.c:18
PlayerBase
Definition
playerbaseclient.c:2
UATimeSpent
Definition
actionconstants.c:28
UATimeSpent::FIREPLACE_IGNITE
const float FIREPLACE_IGNITE
Definition
actionconstants.c:96
UA_PROCESSING
const int UA_PROCESSING
Definition
constants.c:467
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
continuous
actionlightitemonfirewithblowtorch.c
Generated by
1.17.0