Iterate over each of the different stances to extract the distance values and the effects for each stance
90 {
91 string configPath = "CfgMagazines ";
92 string childClass = "";
93
94 int count =
g_Game.ConfigGetChildrenCount(configPath);
95
97 for (int i = 0; i < count; ++i)
98 {
99 g_Game.ConfigGetChildName(configPath, i, childClass);
101 continue;
102
104
105 int effCount =
g_Game.ConfigGetChildrenCount(configPath + childClass +
" Effects");
106 array<ref DustKickupEffectDistanceData> dataArray = new array <ref DustKickupEffectDistanceData>();
107
109 for (int j = 0; j < effCount; ++j)
110 {
111 string stance;
112 g_Game.ConfigGetChildName(configPath + childClass +
" Effects", j, stance);
113
114 string effectPath = configPath + childClass + " Effects" + " " + stance;
115
116 float minDist;
117 float maxDist;
118 array<string> effects = new array<string>();
119
120 minDist =
g_Game.ConfigGetFloat(effectPath +
" minDist");
121 maxDist =
g_Game.ConfigGetFloat(effectPath +
" maxDist");
122 g_Game.ConfigGetTextArray(effectPath +
" Effects", effects);
123
124 dataArray.Insert(new DustKickupEffectDistanceData(minDist, maxDist, effects));
125 }
126
127 if (effCount > 0)
128 {
130 }
131 }
132 }
ref map< string, ref array< ref DustKickupEffectDistanceData > > m_EffectRanges
bool Contains(string sample)
Returns true if sample is substring of string.