7 {
8
10 return;
11
13 string pathBase = partPath + " StaticsSupportData";
14 if (
g_Game.ConfigIsExisting(pathBase))
15 {
16 string childName;
17 string supportCategory;
18 int supportStrength;
19 int i;
20
21 m_ValueMap =
new map<int, ref StaticsSupportCategoryValues>();
22 map<int, int> requirementMap = new map<int, int>();
23 map<int, int> providerMap = new map<int, int>();
24
25
26 string path = pathBase +
" SupportProviders";
27 int count =
g_Game.ConfigGetChildrenCount(
path);
28 if (count > 0)
29 {
30 for (i = 0; i < count; ++i)
31 {
32 childName = "";
33 supportCategory = "";
34 supportStrength = 0;
35
37 g_Game.ConfigGetTextRaw(
path +
" " + childName +
" supportCategory", supportCategory);
38 supportStrength =
g_Game.ConfigGetInt(
path +
" " + childName +
" supportStrength");
39 providerMap.Insert(supportCategory.
Hash(), supportStrength);
41 }
42 }
43
44
45 path = pathBase +
" SupportRequirements";
47 if (count > 0)
48 {
49 for (i = 0; i < count; ++i)
50 {
51 childName = "";
52 supportCategory = "";
53 supportStrength = 0;
54
56 g_Game.ConfigGetTextRaw(
path +
" " + childName +
" supportCategory", supportCategory);
57 supportStrength =
g_Game.ConfigGetInt(
path +
" " + childName +
" supportStrength");
58 requirementMap.Insert(supportCategory.
Hash(), supportStrength);
60 }
61 }
62
63
65 {
67 }
68 }
69 }
void StaticsSupportCategoryValues(int category, int provides, int requires)
ref set< int > m_ConfiguredCategories
ref map< int, ref StaticsSupportCategoryValues > m_ValueMap
proto native int Hash()
Returns hash of string.