6 void Init(
string partPath)
13 string pathBase = partPath +
" StaticsSupportData";
14 if (
g_Game.ConfigIsExisting(pathBase))
17 string supportCategory;
26 string path = pathBase +
" SupportProviders";
27 int count =
g_Game.ConfigGetChildrenCount(
path);
30 for (i = 0; i < count; ++i)
37 g_Game.ConfigGetTextRaw(
path +
" " + childName +
" supportCategory", supportCategory);
38 supportStrength =
g_Game.ConfigGetInt(
path +
" " + childName +
" supportStrength");
39 providerMap.Insert(supportCategory.
Hash(), supportStrength);
45 path = pathBase +
" SupportRequirements";
49 for (i = 0; i < count; ++i)
56 g_Game.ConfigGetTextRaw(
path +
" " + childName +
" supportCategory", supportCategory);
57 supportStrength =
g_Game.ConfigGetInt(
path +
" " + childName +
" supportStrength");
58 requirementMap.Insert(supportCategory.
Hash(), supportStrength);
76 return m_ValueMap.Get(category).m_ProvidedSupport;
84 return m_ValueMap.Get(category).m_RequiredSupport;
void StaticsSupportCategoryValues(int category, int provides, int requires)
void Init(string partPath)
int GetSupportProvided(int category)
set< int > GetConfiguredSupportCategories()
ref set< int > m_ConfiguredCategories
int GetSupportRequirement(int category)
ref map< int, ref StaticsSupportCategoryValues > m_ValueMap
string m_Category
folder structure eg. StaticEntities/Walls
proto native int Hash()
Returns hash of string.