Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
fishingconsumables.c
Go to the documentation of this file.
1
class
FishingHookBase
:
ItemBase
2
{
3
override
void
OnDebugSpawn
()
4
{
5
GetInventory().CreateInInventory(
"Worm"
);
6
}
7
};
8
9
class
Hook
:
FishingHookBase
{};
10
class
BoneHook
:
FishingHookBase
{};
11
class
WoodenHook
:
FishingHookBase
{};
12
class
Jig
:
FishingHookBase
{};
13
15
// Obsolete item prison //
17
class
BaitBase
:
ItemBase
18
{
19
// replaces stray baits with hook + attachment combo
20
override
void
EEItemLocationChanged
(notnull
InventoryLocation
oldLoc, notnull
InventoryLocation
newLoc)
21
{
22
super.EEItemLocationChanged(oldLoc,newLoc);
23
24
string
hookType = ConfigGetString(
"hookType"
);
25
if
(
g_Game
.IsDedicatedServer() && hookType !=
string
.
Empty
)
26
{
27
DeleteSafe();
28
vector
spawnPos;
29
if
(newLoc.GetType() ==
InventoryLocationType
.GROUND)
30
spawnPos = newLoc.GetPos();
31
else
32
spawnPos = newLoc.GetParent().GetHierarchyRoot().GetPosition();
33
34
EntityAI
newItem =
EntityAI
.Cast(
g_Game
.CreateObjectEx(hookType,spawnPos,
ECE_PLACE_ON_SURFACE
,
RF_DEFAULT
));
35
EntityAI
worm = newItem.GetInventory().CreateAttachment(
"Worm"
);
36
MiscGameplayFunctions.TransferItemProperties(
this
,newItem);
37
MiscGameplayFunctions.TransferItemProperties(
this
,worm);
38
}
39
}
40
};
41
42
class
Bait
:
BaitBase
{};
43
class
BoneBait
:
BaitBase
{};
ECE_PLACE_ON_SURFACE
const int ECE_PLACE_ON_SURFACE
Definition
centraleconomy.c:37
RF_DEFAULT
const int RF_DEFAULT
Definition
centraleconomy.c:65
BaitBase
Definition
fishingconsumables.c:18
BaitBase::EEItemLocationChanged
override void EEItemLocationChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
Definition
fishingconsumables.c:20
Bait
Definition
fishingconsumables.c:42
BoneBait
Definition
fishingconsumables.c:43
BoneHook
Definition
fishingconsumables.c:10
EntityAI
Definition
inventoryitem.c:2
FishingHookBase
Definition
fishingconsumables.c:2
FishingHookBase::OnDebugSpawn
override void OnDebugSpawn()
Definition
fishingconsumables.c:3
Hook
Definition
fishingconsumables.c:9
InventoryLocation
InventoryLocation.
Definition
inventorylocation.c:30
ItemBase
Definition
inventoryitem.c:742
Jig
Definition
fishingconsumables.c:12
WoodenHook
Definition
fishingconsumables.c:11
vector
Definition
enconvert.c:119
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
string::Empty
static const string Empty
Definition
enstring.c:7
InventoryLocationType
InventoryLocationType
types of Inventory Location
Definition
inventorylocation.c:4
Games
Dayz
scripts
4_world
entities
itembase
gear
consumables
fishingconsumables.c
Generated by
1.17.0