Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
actionrepairboatchassis.c
Go to the documentation of this file.
1
class
ActionRepairBoatChassis
:
ActionRepairVehiclePartBase
2
{
3
void
ActionRepairBoatChassis
()
4
{
5
m_CallbackClass
=
ActionRepairVehiclePartCB
;
6
m_CommandUID
=
DayZPlayerConstants
.CMD_ACTIONFB_INTERACT;
7
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_ERECT;
8
m_FullBody
=
true
;
9
m_LockTargetOnUse
=
false
;
10
m_Text
=
"#repair"
;
11
}
12
13
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item)
14
{
15
if
(player.GetBrokenLegs() ==
eBrokenLegs
.BROKEN_LEGS)
16
return
false
;
17
18
BoatScript
boat =
BoatScript
.Cast(target.GetObject());
19
if
(!boat)
20
return
false
;
21
22
if
(
g_Game
.IsDedicatedServer())
23
return
true
;
24
25
string
damageZone =
""
;
26
array<string>
selections =
new
array<string>
();
27
boat.GetActionComponentNameList(target.GetComponentIndex(), selections);
28
29
foreach
(
string
selection : selections)
30
{
31
if
(boat && DamageSystem.GetDamageZoneFromComponentName(boat, selection, damageZone))
32
{
33
if
(damageZone ==
"Engine"
)
34
continue
;
35
36
int
zoneHP = boat.GetHealthLevel(damageZone);
37
if
(zoneHP >
GameConstants
.
STATE_WORN
&& zoneHP <
GameConstants
.
STATE_RUINED
)
38
{
39
m_CurrentDamageZone
= damageZone;
40
return
true
;
41
}
42
}
43
}
44
45
return
false
;
46
}
47
}
m_StanceMask
int m_StanceMask
Definition
actionbase.c:33
ActionTarget
class ActionTargets ActionTarget
ActionBase::m_FullBody
bool m_FullBody
Definition
actionbase.c:67
ActionBase::m_Text
string m_Text
Definition
actionbase.c:64
ActionBase::m_LockTargetOnUse
bool m_LockTargetOnUse
Definition
actionbase.c:66
ActionRepairBoatChassis::ActionRepairBoatChassis
void ActionRepairBoatChassis()
Definition
actionrepairboatchassis.c:3
ActionRepairBoatChassis::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition
actionrepairboatchassis.c:13
ActionRepairVehiclePartBase
Definition
actionrepairvehiclepartbase.c:20
ActionRepairVehiclePartBase::m_CurrentDamageZone
string m_CurrentDamageZone
Definition
actionrepairvehiclepartbase.c:21
ActionRepairVehiclePartCB
Definition
actionrepairvehiclepartbase.c:12
AnimatedActionBase::m_CommandUID
int m_CommandUID
Definition
animatedactionbase.c:143
AnimatedActionBase::m_CallbackClass
m_CallbackClass
Definition
animatedactionbase.c:145
BoatScript
Base script class for boats.
Definition
boatscript.c:42
GameConstants
Definition
constants.c:664
ItemBase
Definition
inventoryitem.c:742
PlayerBase
Definition
playerbaseclient.c:2
array
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition
isboxcollidinggeometryproxyclasses.c:28
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition
dayzplayer.c:602
eBrokenLegs
eBrokenLegs
Definition
ebrokenlegs.c:2
GameConstants::STATE_RUINED
const int STATE_RUINED
Definition
constants.c:851
GameConstants::STATE_WORN
const int STATE_WORN
Definition
constants.c:854
Games
Dayz
scripts
4_world
classes
useractionscomponent
actions
continuous
actionrepairboatchassis.c
Generated by
1.17.0