@@ -61,10 +61,18 @@ class KeyValuesExt
6161 {
6262 pKeyValues->SetInt (szName, bValue);
6363 }
64+
65+ static bool LoadFromFile (KeyValues* pKeyValues, const char * szFile)
66+ {
67+ return pKeyValues->LoadFromFile (filesystem, szFile);
68+ }
69+
70+ static bool SaveToFile (KeyValues* pKeyValues, const char * szFile)
71+ {
72+ return pKeyValues->SaveToFile (filesystem, szFile);
73+ }
6474};
6575
66- BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS (load_from_file_overload, LoadFromFile, 2 , 3 );
67- BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS (save_to_file_overload, SaveToFile, 2 , 3 );
6876BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS (find_key_overload, FindKey, 1 , 2 );
6977BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS (get_int_overload, GetInt, 0 , 2 );
7078BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS (get_uint64_overload, GetUint64, 0 , 2 );
@@ -117,19 +125,15 @@ void export_keyvalues()
117125 )
118126
119127 .def (" load_from_file" ,
120- &KeyValues::LoadFromFile,
121- load_from_file_overload (
122- " Loads KeyValues data from a file into this CKeyValues instance." ,
123- args (" filesystem" , " resource_name" , " path_id" )
124- )
128+ &KeyValuesExt::LoadFromFile,
129+ " Loads KeyValues data from a file into this CKeyValues instance." ,
130+ args (" file_name" )
125131 )
126132
127133 .def (" save_to_file" ,
128- &KeyValues::SaveToFile,
129- save_to_file_overload (
130- args (" filesystem" , " resource_name" , " path_id" ),
131- " Saves the data in this CKeyValues instance to the given file path."
132- )
134+ &KeyValuesExt::SaveToFile,
135+ args (" file_name" ),
136+ " Saves the data in this CKeyValues instance to the given file path."
133137 )
134138
135139 .def (" find_key" ,
0 commit comments