Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
anniversarybox.c
Go to the documentation of this file.
1
class
AnniversaryBox
extends
Container_Base
2
{
3
private
const
int
SPAWN_SHIRTS_MAX
= 60;
4
5
#ifndef SERVER
6
protected
AnniversaryBoxLight
m_Light
;
7
#endif
8
9
override
void
DeferredInit
()
10
{
11
super.DeferredInit();
12
13
#ifndef SERVER
14
m_Light
= AnniversaryBoxLight.Cast(
ScriptedLightBase
.CreateLight(AnniversaryBoxLight,
"0 0 0"
));
15
if
(
m_Light
)
16
m_Light
.AttachOnMemoryPoint(
this
,
"light"
);
17
#endif
18
19
}
20
21
override
void
EEDelete
(
EntityAI
parent)
22
{
23
super.EEDelete(parent);
24
25
#ifndef SERVER
26
if
(
m_Light
)
27
m_Light
.Destroy();
28
#endif
29
}
30
31
override
bool
IsTakeable
()
32
{
33
return
false
;
34
}
35
36
override
bool
CanSwapEntities
(
EntityAI
otherItem,
InventoryLocation
otherDestination,
InventoryLocation
destination)
37
{
38
return
false
;
39
}
40
41
override
bool
CanPutInCargo
(
EntityAI
parent)
42
{
43
return
false
;
44
}
45
46
override
bool
DisableVicinityIcon
()
47
{
48
if
(GetAnimationPhase(
"lidclosing"
) == 1)
49
{
50
return
true
;
51
}
52
else
53
return
false
;
54
}
55
56
override
bool
CanDisplayCargo
()
57
{
58
if
(GetAnimationPhase(
"lidclosing"
) == 1)
59
{
60
return
false
;
61
}
62
else
63
return
true
;
64
}
65
66
void
EmtpyInventory
()
67
{
68
if
(
g_Game
.IsServer())
//server or single player
69
{
70
for
(
int
j = 0; j < GetInventory().GetCargo().GetItemCount(); j++ )
71
{
72
GetInventory().GetCargo().GetItem(j).Delete();
73
}
74
}
75
}
76
77
void
FillInventory
()
78
{
79
if
(
g_Game
.IsServer())
//server or single player
80
{
81
EntityAI
ent = GetInventory().CreateInInventory(
"TShirt_10thAnniversary"
);
82
83
for
(
int
i = 0; ent && i <
SPAWN_SHIRTS_MAX
- 1; i++)
84
{
85
ent = GetInventory().CreateInInventory(
"TShirt_10thAnniversary"
);
86
}
87
}
88
}
89
}
Container_Base
Definition
container_base.c:2
Container_Base::DisableVicinityIcon
override bool DisableVicinityIcon()
Definition
anniversarybox.c:46
Container_Base::CanDisplayCargo
override bool CanDisplayCargo()
Definition
anniversarybox.c:56
Container_Base::SPAWN_SHIRTS_MAX
const int SPAWN_SHIRTS_MAX
Definition
anniversarybox.c:3
Container_Base::DeferredInit
override void DeferredInit()
Definition
anniversarybox.c:9
Container_Base::m_Light
AnniversaryBoxLight m_Light
Definition
anniversarybox.c:6
Container_Base::CanPutInCargo
override bool CanPutInCargo(EntityAI parent)
Definition
anniversarybox.c:41
Container_Base::EEDelete
override void EEDelete(EntityAI parent)
Definition
anniversarybox.c:21
Container_Base::IsTakeable
override bool IsTakeable()
Definition
anniversarybox.c:31
Container_Base::EmtpyInventory
void EmtpyInventory()
Definition
anniversarybox.c:66
Container_Base::FillInventory
void FillInventory()
Definition
anniversarybox.c:77
Container_Base::CanSwapEntities
override bool CanSwapEntities(EntityAI otherItem, InventoryLocation otherDestination, InventoryLocation destination)
Definition
anniversarybox.c:36
EntityAI
Definition
inventoryitem.c:2
InventoryLocation
InventoryLocation.
Definition
inventorylocation.c:30
ScriptedLightBase
Definition
pointlightbase.c:2
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
Games
Dayz
scripts
4_world
entities
itembase
container_base
anniversarybox.c
Generated by
1.17.0