Dayz Explorer 1.28.160049
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
20 void PPEMatClassParameterCommandData(int mat_idx, int parameter_idx, PPEClassBase parent)
21 {
22 m_MaterialIndex = mat_idx;
23 m_ParameterIndex = parameter_idx;
24 m_Parent = parent;
25
26 m_CommandLayersArray = new array<int>;
29 }
30
32 {
33 return -1;
34 }
35
36 void SetMaterialIndex(int value)
37 {
38 m_MaterialIndex = value;
39 }
40
41 void SetParameterIndex(int value)
42 {
43 m_ParameterIndex = value;
44 }
45
47 {
48 m_Parent = parent;
49 }
50
52 {
53 m_RequestMap.Set(request_data.GetRequesterIDX(),request_data);//<request_ID, data>
54 }
55
56 void Update(float timeslice, out Param p_total, out bool setting_defaults, int order)
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
76 void ModifyResultValues(inout Param result_values)
77 {
78 }
79
81 void AddPriorityInfo(int priority)
82 {
83 if ( m_CommandLayersArray.Find(priority) == -1 )
84 {
85 m_CommandLayersArray.Insert(priority);
86 m_CommandLayersArray.Sort();
87 }
88 else
89 {
90 //DbgPrnt("PPEDebug | PPEMatClassParameterCommandData - AddPriorityInfo | Already exists, values have been overwritten!");
91 }
92 }
93
95 void RemovePriorityInfo(int priority)
96 {
97 }
98
101 {
102 m_Defaults = p;
103 InitDefaults();
104 InitCuttent();
105 }
106
107 protected void InitDefaults() {};
108
109 protected void InitCuttent() {};
110
111 protected void SetParameterValueDefault(inout Param p_total)
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}
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
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...
ref map< int, ref array< int > > m_Dependencies
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...
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
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
map< int, ref PPERequestParamDataBase > ActiveParameterRequestsMap