Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
pperequestdata.c
Go to the documentation of this file.
3 {
4  PPERequesterBase m_Requester;
5  protected bool m_UpdatingDataValues; //new values are being sent periodically
6  protected bool m_IsActive; //hasn't been stopped yet (does not have to update values)
7  protected bool m_SettingDefaultValues;
8 
9  protected int m_MaterialID;
10  protected int m_ParameterID;
11  protected int m_VariableType; //PPEConstants.VAR_TYPE_INT etc.
12  protected int m_RequesterIDX;
13  protected int m_InteractionMask;
14  protected int m_Priority; //de-facto blending layer
15 
16  void PPERequestParamDataBase(int requester_idx, int mat_id, int param_id, int data_type = 0, int priority = 0, int mask = PPOperators.SET)
17  {
18  m_RequesterIDX = requester_idx;
19  m_MaterialID = mat_id;
20  m_ParameterID = param_id;
21  m_VariableType = data_type;
22  m_Priority = priority;
23  m_InteractionMask = mask;
24  m_UpdatingDataValues = false;
25  m_SettingDefaultValues = false;
26  m_IsActive = false;
27  InitValues();
28  }
29 
30  void InitValues()
31  {
32  }
33 
34  void SetUpdatingDataValues(bool state)
35  {
36  m_UpdatingDataValues = state;
37  }
38 
39  bool GetUpdatingDataValues()
40  {
41  return m_UpdatingDataValues;
42  }
43 
44  void SetDataActive(bool state)
45  {
46  m_IsActive = state;
47  }
48 
49  bool IsDataActive()
50  {
51  return m_IsActive;
52  }
53 
54  void SetSettingDefaultValues(bool state)
55  {
56  m_SettingDefaultValues = state;
57  }
58 
59  bool IsSettingDefaultValues()
60  {
61  return m_SettingDefaultValues;
62  }
63 
64  int GetRequesterIDX()
65  {
66  return m_RequesterIDX;
67  }
68 
69  int GetMaterialID()
70  {
71  return m_MaterialID;
72  }
73 
74  int GetParameterID()
75  {
76  return m_ParameterID;
77  }
78 
79  int GetVarType()
80  {
81  return m_VariableType;
82  }
83 
84  void SetInteractionMask(int mask)
85  {
86  m_InteractionMask = mask;
87  }
88 
89  int GetInteractionMask()
90  {
91  return m_InteractionMask;
92  }
93 
94  void SetPriorityLayer(int priority)
95  {
96  m_Priority = priority;
97  }
98 
99  int GetPriorityLayer()
100  {
101  return m_Priority;
102  }
103 }
104 
106 {
107  bool m_BoolTarget;
110 
111  void PPERequestParamDataBool(int requester_idx, int mat_id, int param_id, int data_type = 0, int priority = 0, int mask = PPOperators.SET, bool relative = false )
112  {
113  m_BoolCurrent = 0;
114  m_BoolLast = 0;
115  m_VariableType = PPEConstants.VAR_TYPE_BOOL;
116  }
117 }
118 
119 class PPERequestParamDataInt extends PPERequestParamDataBase
120 {
121  int m_IntTarget;
122  int m_IntCurrent;
123  int m_IntLast;
124 
125  void PPERequestParamDataInt(int requester_idx, int mat_id, int param_id, int data_type = 0, int priority = 0, int mask = PPOperators.SET, bool relative = false )
126  {
127  m_IntCurrent = -1;
128  m_IntLast = -1;
129  m_VariableType = PPEConstants.VAR_TYPE_INT;
130  }
131 }
132 
134 {
135  float m_FloatTarget;
137  float m_FloatLast;
138 
139  float m_FloatFormerTarget;//former target; remnants of a fading mechanic...revise and re-connect?
140  float m_FloatStart;//actual start value; remnants of a fading mechanic...revise and re-connect?
141 
142  void PPERequestParamDataFloat(int requester_idx, int mat_id, int param_id, int data_type = 0, int priority = 0, int mask = PPOperators.SET, bool relative = false )
143  {
144  m_VariableType = PPEConstants.VAR_TYPE_FLOAT;
145  }
146 
147  override void InitValues()
148  {
149  m_FloatTarget = float.LOWEST;
150  m_FloatCurrent = float.LOWEST;
151  m_FloatLast = float.LOWEST;
152  m_FloatFormerTarget = float.LOWEST;
153  m_FloatStart = float.LOWEST;
154  }
155 }
156 
157 class PPERequestParamDataColor extends PPERequestParamDataBase
158 {
159  ref array<float> m_ColorTarget;
160  ref array<float> m_ColorCurrent;
161  ref array<float> m_ColorLast;
162 
163  ref array<float> m_ColorFormerTarget;//former target; remnants of a fading mechanic...revise and re-connect?
164  ref array<float> m_ColorStart;//actual start values; remnants of a fading mechanic...revise and re-connect?
165 
166  void PPERequestParamDataColor(int requester_idx, int mat_id, int param_id, int data_type = 0, int priority = 0, int mask = PPOperators.SET, bool relative = false )
167  {
168  m_VariableType = PPEConstants.VAR_TYPE_COLOR;
169  }
170 
171  override void InitValues()
172  {
173  m_ColorTarget = {0.0,0.0,0.0,0.0};
174  m_ColorCurrent = {0,0.0,0.0,0.0};
175  m_ColorLast = {0.0,0.0,0.0,0.0};
176  m_ColorFormerTarget = {0.0,0.0,0.0,0.0};
177  m_ColorStart = {0.0,0.0,0.0,0.0};
178  }
179 }
180 
181 //TODO
182 class PPERequestParamDataVector extends PPERequestParamDataBase
183 {
187 }
PPERequestParamDataBool
void PPERequestParamDataBool(int requester_idx, int mat_id, int param_id, int data_type=0, int priority=0, int mask=PPOperators.SET, bool relative=false)
Definition: pperequestdata.c:111
m_Priority
int m_Priority
Definition: bioslobbyservice.c:34
PPERequestParamDataFloat
void PPERequestParamDataFloat(int requester_idx, int mat_id, int param_id, int data_type=0, int priority=0, int mask=PPOperators.SET, bool relative=false)
Definition: pperequestdata.c:142
m_BoolCurrent
bool m_BoolCurrent
Definition: pperequestdata.c:108
m_FloatTarget
class PPERequestParamDataInt extends PPERequestParamDataBase m_FloatTarget
m_FloatCurrent
float m_FloatCurrent
Definition: pperequestdata.c:136
m_FloatFormerTarget
float m_FloatFormerTarget
Definition: pperequestdata.c:139
vector
Definition: enconvert.c:105
m_IsActive
bool m_IsActive
Definition: modifierbase.c:20
m_BoolTarget
class PPERequestParamDataBase m_BoolTarget
m_VectorTarget
class PPERequestParamDataColor extends PPERequestParamDataBase m_VectorTarget
m_VectorLast
vector m_VectorLast
Definition: pperequestdata.c:186
PPERequesterBase
Definition: pperequestplatformsbase.c:2
m_FloatStart
float m_FloatStart
Definition: pperequestdata.c:140
PPERequestParamDataBase
Data for one material parameter, requester side.
Definition: pperequestdata.c:2
array< float >
m_BoolLast
bool m_BoolLast
Definition: pperequestdata.c:109
PPOperators
PPOperators
PP operators, specify operation between subsequent layers.
Definition: ppeconstants.c:51
m_FloatLast
float m_FloatLast
Definition: pperequestdata.c:137
m_VectorCurrent
vector m_VectorCurrent
Definition: pperequestdata.c:185
InitValues
override void InitValues()
Definition: pperequestdata.c:147