Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
bloodcontainerbase.c
Go to the documentation of this file.
1 class BloodContainerBase extends ItemBase
2 {
3  private bool m_IsBloodTypeVisible = false;
4 
5  void BloodContainerBase()
6  {
7  RegisterNetSyncVariableBool("m_IsBloodTypeVisible");
8  }
9 
10  override bool IsBloodContainer()
11  {
12  return true;
13  }
14 
15  void SetBloodTypeVisible( bool visible )
16  {
17  m_IsBloodTypeVisible = visible;
18  SetSynchDirty();
19  }
20 
21  bool GetBloodTypeVisible()
22  {
23  return m_IsBloodTypeVisible;
24  }
25 
26  override void OnStoreSave( ParamsWriteContext ctx )
27  {
28  super.OnStoreSave(ctx);
29 
30  ctx.Write( m_IsBloodTypeVisible );
31  }
32 
33  override bool OnStoreLoad( ParamsReadContext ctx, int version )
34  {
35  if ( !super.OnStoreLoad(ctx, version) )
36  return false;
37 
38  bool is_blood_type_visible = false;
39  ctx.Read( is_blood_type_visible );
40  SetBloodTypeVisible( is_blood_type_visible );
41 
42  return true;
43  }
44 }
ItemBase
Definition: inventoryitem.c:730
BloodContainerBase
Definition: bloodbagempty.c:1
Serializer
Serialization general interface. Serializer API works with:
Definition: serializer.c:55
OnStoreSave
void OnStoreSave(ParamsWriteContext ctx)
Definition: modifierbase.c:229
IsBloodContainer
bool IsBloodContainer()
Definition: itembase.c:894
OnStoreLoad
bool OnStoreLoad(ParamsReadContext ctx, int version)
Definition: modifiersmanager.c:270