DayZ 1.24
Loading...
Searching...
No Matches
PPEMatClassParameterCommandData.c
Go to the documentation of this file.
2
4{
5 //default layer constants, complex data like colors PPEMatClassParameterColor are handled separately
6 const int LAYER_INFO_VALUE = 0;
7 const int LAYER_INFO_OPERATOR = 1;
8
9 ref array<int> m_CommandLayersArray; //for tracking active priorities and sorting them //TODO - could have been 'set'..
10 protected int m_UpdatedCount;
11 protected int m_MaterialIndex; //just a helper
12 protected int m_ParameterIndex;
13 protected ref ActiveParameterRequestsMap m_RequestMap;//<request_ID, parameter data>
15 protected ref Param m_Defaults; // Careful, formating is such, that param1 is ALWAYS string, containing parameter name. Actual values follow.
16 protected ref Param m_CurrentValues; // Careful, only actual values, WITHOUT string
17
19
30
32 {
33 return -1;
34 }
35
37 {
39 }
40
42 {
44 }
45
47 {
48 m_Parent = parent;
49 }
50
52 {
53 m_RequestMap.Set(request_data.GetRequesterIDX(), request_data); //<request_ID, data>
54 }
55
57 {
58 //insert dependencies to another update round
59 if (m_Dependencies && m_Dependencies.Count() > 0 && order < PPEConstants.DEPENDENCY_ORDER_HIGHEST)
60 {
61 int key_mat = -1;
62 int element_par = -1;
63 for (int i = 0; i < m_Dependencies.Count(); i++)
64 {
65 key_mat = m_Dependencies.GetKey(i);
66 for (int j = 0; j < m_Dependencies.GetElement(i).Count(); j++)
67 {
68 element_par = m_Dependencies.GetElement(i).Get(j);
69 PPEManagerStatic.GetPPEManager().SetMaterialParamUpdating(key_mat, element_par, order + 1); // TODO - revise, currently only does one more update
70 }
71 }
72 }
73 }
74
79
82 {
83 if (m_CommandLayersArray.Find(priority) == -1)
84 {
87 }
88 else
89 {
90 //DbgPrnt("PPEDebug | PPEMatClassParameterCommandData - AddPriorityInfo | Already exists, values have been overwritten!");
91 }
92 }
93
96 {
97 }
98
101 {
102 m_Defaults = p;
103 InitDefaults();
104 InitCuttent();
105 }
106
107 protected void InitDefaults() {};
108
109 protected void InitCuttent() {};
110
112 {
113 }
114
117 {
118 return m_Defaults;
119 }
120
123 {
124 return m_CurrentValues;
125 }
126
127 void DbgPrnt(string text)
128 {
129 //Debug.Log(""+text);
130 }
131}
map< int, ref PPERequestParamDataBase > ActiveParameterRequestsMap
Created once, on manager init. Script-side representation of C++ material class, separate handling.
Static component of PPE manager, used to hold the instance.
Definition PPEManager.c:3
static PPEManager GetPPEManager()
Returns the manager instance singleton.
Definition PPEManager.c:27
void RemovePriorityInfo(int priority)
Currently unused; layer info gets cleared every update.
void AddPriorityInfo(int priority)
Adds 'layers' to be iterated throug.
void RegisterDefaults(Param p)
Adds name and default values from material registration, override on children to properly add for eac...
Param GetCurrentValues()
Careful, only actual values, WITHOUT string.
void Update(float timeslice, out Param p_total, out bool setting_defaults, int order)
void PPEMatClassParameterCommandData(int mat_idx, int parameter_idx, PPEClassBase parent)
Param GetDefaultValues()
Careful, formating is such, that param1 is ALWAYS string, containing parameter name,...
void InsertRequestData(PPERequestParamDataBase request_data)
ref ActiveParameterRequestsMap m_RequestMap
void ModifyResultValues(inout Param result_values)
Modifies values to be used for setter methods later in the manager update. Currently used only on PPE...
ref map< int, ref array< int > > m_Dependencies
Data for one material parameter, requester side.
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12