DayZ 1.24
Loading...
Searching...
No Matches
Paper.c
Go to the documentation of this file.
1class Paper extends ItemBase
2{
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
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
44 {
45 return !GetHierarchyParent();
46 }
47
49 {
50 return false;
51 }
52
54
56 {
57 Fireplace.IgniteEntityAsFireplace(this, fire_source);
58 }
59
61 {
62 return Fireplace.CanIgniteEntityAsFireplace(this);
63 }
64
65 override void SetActions()
66 {
67 super.SetActions();
68
71 AddAction(ActionAttach);
73 }
74}
void ActionDetach()
void AddAction(typename actionName)
override bool OnStoreLoad(ParamsReadContext ctx, int version)
Definition Paper.c:12
override bool CanBeIgnitedBy(EntityAI igniter=null)
Definition Paper.c:43
override void SetActions()
Definition Paper.c:65
override bool HasFlammableMaterial()
Definition Paper.c:38
override WrittenNoteData GetWrittenNoteData()
Definition Paper.c:30
void ~Paper()
Definition Paper.c:10
override void OnIgnitedThis(EntityAI fire_source)
Definition Paper.c:55
override void OnStoreSave(ParamsWriteContext ctx)
Definition Paper.c:23
void Paper()
Definition Paper.c:5
override bool IsThisIgnitionSuccessful(EntityAI item_source=null)
Definition Paper.c:60
override bool CanIgniteItem(EntityAI ignite_target=null)
Definition Paper.c:48
ref WrittenNoteData m_NoteContents
Definition Paper.c:3
override void OnIgnitedTarget(EntityAI ignited_item)
Definition Paper.c:53
Serialization general interface. Serializer API works with:
Definition Serializer.c:56