DayZ 1.24
Loading...
Searching...
No Matches
Flag_Base.c
Go to the documentation of this file.
1class Flag_Base extends ItemBase
2{
3 void Flag_Base()
4 {
5 //synchronized variables
6 //RegisterNetSyncVariableBool( "m_IsMounted" );
7 ShowSelection("folded");
8 HideSelection("unfolded");
9 }
10
12 {
13 }
14
15 // --- SYNCHRONIZATION
17 {
18 if (GetGame().IsServer())
19 SetSynchDirty();
20 }
21
23 {
24 super.OnVariablesSynchronized();
25
26
27 }
28
29 // --- EVENTS
31 {
32 super.OnStoreSave(ctx);
33 }
34
35 override bool OnStoreLoad(ParamsReadContext ctx, int version)
36 {
37 if (!super.OnStoreLoad(ctx, version))
38 return false;
39
40 return true;
41 }
42
43 override void AfterStoreLoad()
44 {
45 super.AfterStoreLoad();
46
47 //set mounted state based on locked slot after everything is loaded
48 //SetMountedState( GetSlotLockedState() );
49 }
50
51 /*override void OnInventoryEnter(Man player)
52 {
53 super.OnInventoryEnter(player);
54
55 ShowSelection("folded");
56 HideSelection("unfolded");
57 }
58
59 override void OnInventoryExit(Man player)
60 {
61 super.OnInventoryExit(player);
62
63 HideSelection("folded");
64 ShowSelection("unfolded");
65 }*/
66
67 override void OnWasAttached(EntityAI parent, int slot_id)
68 {
69 super.OnWasAttached(parent, slot_id);
70
71 HideSelection("folded");
72 ShowSelection("unfolded");
73 }
74
75 override void OnWasDetached(EntityAI parent, int slot_id)
76 {
77 super.OnWasDetached(parent, slot_id);
78
79 ShowSelection("folded");
80 HideSelection("unfolded");
81 }
82
83 // SOUNDS
84 // ---------------------------------------------------------
85 //TODO
86 // ---------------------------------------------------------
87
88 override int GetViewIndex()
89 {
90 if (MemoryPointExists("invView2"))
91 {
93 GetInventory().GetCurrentInventoryLocation(il);
94 InventoryLocationType type = il.GetType();
95 switch (type)
96 {
97 case InventoryLocationType.ATTACHMENT:
98 {
99 return 1;
100 }
101 default:
102 {
103 return 0;
104 }
105 }
106 }
107 return 0;
108 }
109
110 override void SetActions()
111 {
112 super.SetActions();
113
114 AddAction(ActionAttach);
115 }
116}
117
118class Flag_Chernarus extends Flag_Base {};
119class Flag_Chedaki extends Flag_Base {};
120class Flag_NAPA extends Flag_Base {};
121class Flag_CDF extends Flag_Base {};
122class Flag_Livonia extends Flag_Base {};
123class Flag_Altis extends Flag_Base {};
124class Flag_SSahrani extends Flag_Base {};
125class Flag_NSahrani extends Flag_Base {};
126class Flag_DayZ extends Flag_Base {};
127class Flag_LivoniaArmy extends Flag_Base {};
128class Flag_White extends Flag_Base {};
129class Flag_Bohemia extends Flag_Base {};
130class Flag_APA extends Flag_Base {};
131class Flag_UEC extends Flag_Base {};
132class Flag_Pirates extends Flag_Base {};
133class Flag_Cannibals extends Flag_Base {};
134class Flag_Bear extends Flag_Base {};
135class Flag_Wolf extends Flag_Base {};
136class Flag_BabyDeer extends Flag_Base {};
137class Flag_Rooster extends Flag_Base {};
138class Flag_LivoniaPolice extends Flag_Base {};
139class Flag_CMC extends Flag_Base {};
140class Flag_TEC extends Flag_Base {};
141class Flag_CHEL extends Flag_Base {};
142class Flag_Zenit extends Flag_Base {};
143class Flag_HunterZ extends Flag_Base {};
144class Flag_BrainZ extends Flag_Base {};
145class Flag_Rex extends Flag_Base {};
146class Flag_Zagorky extends Flag_Base {};
147class Flag_Crook extends Flag_Base {};
void AddAction(typename actionName)
InventoryLocationType
types of Inventory Location
InventoryLocation.
void ~Flag_Base()
Definition Flag_Base.c:11
void Flag_Base()
Definition Flag_Base.c:3
override bool OnStoreLoad(ParamsReadContext ctx, int version)
Definition Flag_Base.c:35
override void OnWasDetached(EntityAI parent, int slot_id)
Definition Flag_Base.c:75
override int GetViewIndex()
Definition Flag_Base.c:88
void Synchronize()
Definition Flag_Base.c:16
override void SetActions()
Definition Flag_Base.c:110
override void OnStoreSave(ParamsWriteContext ctx)
Definition Flag_Base.c:30
override void AfterStoreLoad()
Definition Flag_Base.c:43
override void OnVariablesSynchronized()
Definition Flag_Base.c:22
override void OnWasAttached(EntityAI parent, int slot_id)
Definition Flag_Base.c:67
Serialization general interface. Serializer API works with:
Definition Serializer.c:56
proto native CGame GetGame()