Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
paper.c
Go to the documentation of this file.
1 class Paper extends ItemBase
2 {
3  protected ref WrittenNoteData m_NoteContents;
4 
5  void Paper()
6  {
7  m_NoteContents = new WrittenNoteData(this);
8  }
9 
10  void ~Paper() {}
11 
12  override bool OnStoreLoad(ParamsReadContext ctx, int version)
13  {
14  if (!super.OnStoreLoad(ctx, version))
15  return false;
16 
17  if (version >= 108 && !ctx.Read(m_NoteContents))
18  return false;
19 
20  return true;
21  }
22 
23  override void OnStoreSave(ParamsWriteContext ctx)
24  {
25  super.OnStoreSave(ctx);
26 
27  ctx.Write(m_NoteContents);
28  }
29 
31  {
32  return m_NoteContents;
33  }
34 
35  //================================================================
36  // IGNITION ACTION
37  //================================================================
38  override bool HasFlammableMaterial()
39  {
40  return true;
41  }
42 
43  override bool CanBeIgnitedBy(EntityAI igniter = null)
44  {
45  return !GetHierarchyParent();
46  }
47 
48  override bool CanIgniteItem(EntityAI ignite_target = null)
49  {
50  return false;
51  }
52 
53  override void OnIgnitedTarget(EntityAI ignited_item) {}
54 
55  override void OnIgnitedThis(EntityAI fire_source)
56  {
57  Fireplace.IgniteEntityAsFireplace(this, fire_source);
58  }
59 
60  override bool IsThisIgnitionSuccessful(EntityAI item_source = null)
61  {
62  return Fireplace.CanIgniteEntityAsFireplace(this);
63  }
64 
65  override void SetActions()
66  {
67  super.SetActions();
68 
73  }
74 }
ItemBase
Definition: inventoryitem.c:730
WrittenNoteData
Definition: writtennotedata.c:1
GetWrittenNoteData
WrittenNoteData GetWrittenNoteData()
Definition: itembase.c:4424
OnIgnitedThis
override void OnIgnitedThis(EntityAI fire_source)
Executed on Server when some item ignited this one.
Definition: fireworksbase.c:96
ActionDetach
void ActionDetach()
Definition: actiondetach.c:10
Serializer
Serialization general interface. Serializer API works with:
Definition: serializer.c:55
HasFlammableMaterial
override bool HasFlammableMaterial()
Definition: fireworksbase.c:41
AddAction
void AddAction(typename actionName)
Definition: advancedcommunication.c:86
SetActions
void SetActions()
Definition: advancedcommunication.c:79
ActionCreateIndoorFireplace
Definition: actioncreateindoorfireplace.c:1
ActionCreateIndoorOven
Definition: actioncreateindooroven.c:1
ActionAttach
ActionAttachWheels ActionAttach
OnStoreSave
void OnStoreSave(ParamsWriteContext ctx)
Definition: modifierbase.c:229
CanBeIgnitedBy
override protected bool CanBeIgnitedBy(EntityAI igniter=NULL)
Definition: fireworksbase.c:102
OnStoreLoad
bool OnStoreLoad(ParamsReadContext ctx, int version)
Definition: modifiersmanager.c:270
EntityAI
Definition: building.c:5