DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
AnniversaryBox.c
См. документацию.
1class AnniversaryBox extends Container_Base
2{
3 private const int SPAWN_SHIRTS_MAX = 60;
4
5 #ifndef SERVER
6 #ifndef NO_GUI
7 protected AnniversaryBoxLight m_Light;
8 #endif
9 #endif
10
11 override void DeferredInit()
12 {
13 super.DeferredInit();
14
15 #ifndef SERVER
16 #ifndef NO_GUI
17 m_Light = AnniversaryBoxLight.Cast(ScriptedLightBase.CreateLight(AnniversaryBoxLight, "0 0 0"));
18 if (m_Light)
19 m_Light.AttachOnMemoryPoint(this, "light");
20 #endif
21 #endif
22
23 }
24
25 override void EEDelete(EntityAI parent)
26 {
27 super.EEDelete(parent);
28
29 #ifndef SERVER
30 #ifndef NO_GUI
31 if (m_Light)
32 m_Light.Destroy();
33 #endif
34 #endif
35 }
36
37 override bool IsTakeable()
38 {
39 return false;
40 }
41
42 override bool CanSwapEntities(EntityAI otherItem, InventoryLocation otherDestination, InventoryLocation destination)
43 {
44 return false;
45 }
46
47 override bool CanPutInCargo(EntityAI parent)
48 {
49 return false;
50 }
51
52 override bool DisableVicinityIcon()
53 {
54 if (GetAnimationPhase("lidclosing") == 1)
55 {
56 return true;
57 }
58 else
59 return false;
60 }
61
62 override bool CanDisplayCargo()
63 {
64 if (GetAnimationPhase("lidclosing") == 1)
65 {
66 return false;
67 }
68 else
69 return true;
70 }
71
73 {
74 if (g_Game.IsServer())//server or single player
75 {
76 for ( int j = 0; j < GetInventory().GetCargo().GetItemCount(); j++ )
77 {
78 GetInventory().GetCargo().GetItem(j).Delete();
79 }
80 }
81 }
82
84 {
85 if (g_Game.IsServer())//server or single player
86 {
87 EntityAI ent = GetInventory().CreateInInventory("TShirt_10thAnniversary");
88
89 for (int i = 0; ent && i < SPAWN_SHIRTS_MAX - 1; i++)
90 {
91 ent = GetInventory().CreateInInventory("TShirt_10thAnniversary");
92 }
93 }
94 }
95}
DayZGame g_Game
Определения DayZGame.c:4074
const int SPAWN_SHIRTS_MAX
Определения AnniversaryBox.c:3
override bool CanSwapEntities(EntityAI otherItem, InventoryLocation otherDestination, InventoryLocation destination)
Определения AnniversaryBox.c:42
override bool IsTakeable()
Определения AnniversaryBox.c:37
void EmtpyInventory()
Определения AnniversaryBox.c:72
override void EEDelete(EntityAI parent)
Определения AnniversaryBox.c:25
override bool CanPutInCargo(EntityAI parent)
Определения AnniversaryBox.c:47
AnniversaryBoxLight m_Light
Определения AnniversaryBox.c:7
override bool CanDisplayCargo()
Определения AnniversaryBox.c:62
override bool DisableVicinityIcon()
Определения AnniversaryBox.c:52
override void DeferredInit()
Определения AnniversaryBox.c:11
void FillInventory()
Определения AnniversaryBox.c:83
Определения Container_Base.c:2
InventoryLocation.
Определения InventoryLocation.c:30