@@ -80,18 +80,24 @@ void export_keyvalues(scope _keyvalues)
8080 .def (" uses_escape_sequences" ,
8181 &KeyValues::UsesEscapeSequences,
8282 " Sets whether or not this keyvalues object uses escape sequences." ,
83- args ( " uses_escape_sequences" )
83+ ( arg ( " uses_escape_sequences" ) )
8484 )
8585
8686 .def (" load_from_file" ,
8787 &KeyValuesExt::LoadFromFile,
8888 " Load KeyValues data from a file and return a new KeyValues instance on success." ,
89- args ( " file_name" )
89+ ( arg ( " file_name" ) )
9090 ).staticmethod (" load_from_file" )
9191
92+ .def (" load_from_file2" ,
93+ &KeyValues::LoadFromFile,
94+ " Load KeyValues data from a file into an existing KeyValues instance." ,
95+ (arg (" file_name" ))
96+ )
97+
9298 .def (" save_to_file" ,
9399 &KeyValuesExt::SaveToFile,
94- args ( " file_name" ),
100+ ( arg ( " file_name" ) ),
95101 " Saves the data in this KeyValues instance to the given file path."
96102 )
97103
@@ -105,7 +111,7 @@ void export_keyvalues(scope _keyvalues)
105111 .def (" find_key_by_symbol" ,
106112 GET_CONST_METHOD (KeyValues*, KeyValues, FindKey, int ),
107113 " Finds a subkey by an integer identifier." ,
108- args ( " key" ),
114+ ( arg ( " key" ) ),
109115 reference_existing_object_policy ()
110116 )
111117
@@ -119,13 +125,13 @@ void export_keyvalues(scope _keyvalues)
119125 .def (" add_sub_key" ,
120126 &KeyValues::AddSubKey,
121127 " Adds a sub key. Make sure the subkey isn't a child of some other KeyValues." ,
122- args ( " sub_key" )
128+ ( arg ( " sub_key" ) )
123129 )
124130
125131 .def (" remove_sub_key" ,
126132 &KeyValues::RemoveSubKey,
127133 " Removes a subkey from the list. DOES NOT DELETE IT!" ,
128- args ( " sub_key" )
134+ ( arg ( " sub_key" ) )
129135 )
130136
131137 .add_property (" first_sub_key" ,
@@ -227,37 +233,37 @@ void export_keyvalues(scope _keyvalues)
227233 .def (" set_string" ,
228234 &KeyValues::SetString,
229235 " Sets the given key's string value." ,
230- args ( " key_name" , " value" )
236+ ( arg ( " key_name" ), arg ( " value" ) )
231237 )
232238
233239 .def (" set_int" ,
234240 &KeyValues::SetInt,
235241 " Sets the given key's integer value." ,
236- args ( " key_name" , " value" )
242+ ( arg ( " key_name" ), arg ( " value" ) )
237243 )
238244
239245 .def (" set_uint64" ,
240246 &KeyValues::SetUint64,
241247 " Sets the given key's 64-bit integer value." ,
242- args ( " key_name" , " value" )
248+ ( arg ( " key_name" ), arg ( " value" ) )
243249 )
244250
245251 .def (" set_float" ,
246252 &KeyValues::SetFloat,
247253 " Sets the given key's floating point value." ,
248- args ( " key_name" , " value" )
254+ ( arg ( " key_name" ), arg ( " value" ) )
249255 )
250256
251257 .def (" set_color" ,
252258 &KeyValues::SetColor,
253259 " Sets the given key's color value." ,
254- args ( " key_name" , " value" )
260+ ( arg ( " key_name" ), arg ( " value" ) )
255261 )
256262
257263 .def (" set_bool" ,
258264 &KeyValuesExt::SetBool,
259265 " Sets the given key's boolean value." ,
260- args ( " key_name" , " value" )
266+ ( arg ( " key_name" ), arg ( " value" ) )
261267 )
262268
263269 .def (" get_data_type" ,
0 commit comments