Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
worm.c
Go to the documentation of this file.
1
class
Worm
extends
Edible_Base
2
{
3
override
bool
CanBeCookedOnStick
()
4
{
5
return
false
;
6
}
7
8
override
bool
CanBeCooked
()
9
{
10
return
false
;
11
}
12
13
override
bool
IsMeat
()
14
{
15
return
true
;
16
}
17
18
override
void
OnWasAttached
(
EntityAI
parent,
int
slot_id)
19
{
20
super.OnWasAttached(parent, slot_id);
21
22
if
(
InventorySlots
.
GetSlotName
(slot_id) ==
"Bait"
)
23
{
24
SetAnimationPhase(
"bait_unhooked"
,1);
25
SetAnimationPhase(
"bait_hooked"
,0);
26
}
27
}
28
29
override
void
OnWasDetached
(
EntityAI
parent,
int
slot_id)
30
{
31
super.OnWasDetached(parent, slot_id);
32
33
if
(
InventorySlots
.
GetSlotName
(slot_id) ==
"Bait"
)
34
{
35
SetAnimationPhase(
"bait_unhooked"
,0);
36
SetAnimationPhase(
"bait_hooked"
,1);
37
}
38
}
39
}
Edible_Base
Definition
edible_base.c:2
Edible_Base::CanBeCookedOnStick
override bool CanBeCookedOnStick()
Definition
worm.c:3
Edible_Base::CanBeCooked
override bool CanBeCooked()
Definition
worm.c:8
Edible_Base::OnWasDetached
override void OnWasDetached(EntityAI parent, int slot_id)
Definition
worm.c:29
Edible_Base::OnWasAttached
override void OnWasAttached(EntityAI parent, int slot_id)
Definition
worm.c:18
Edible_Base::IsMeat
override bool IsMeat()
Definition
worm.c:13
EntityAI
Definition
inventoryitem.c:2
InventorySlots
provides access to slot configuration
Definition
inventoryslots.c:6
InventorySlots::GetSlotName
static proto native owned string GetSlotName(int id)
Games
Dayz
scripts
4_world
entities
itembase
edible_base
worm.c
Generated by
1.17.0