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