Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
fishingconsumables.c
Go to the documentation of this file.
2{
3 override void OnDebugSpawn()
4 {
5 GetInventory().CreateInInventory("Worm");
6 }
7};
8
13
15// Obsolete item prison //
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 (GetGame().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(GetGame().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
42class Bait: BaitBase {};
const int ECE_PLACE_ON_SURFACE
const int RF_DEFAULT
InventoryLocation.
proto native CGame GetGame()
Empty
Definition hand_states.c:14
InventoryLocationType
types of Inventory Location