@@ -60,7 +60,7 @@ static func create_config(mod_id: String, config_name: String, config_data: Dict
60
60
# Store the mod_config in the mod's ModData
61
61
ModLoaderStore .mod_data [mod_id ].configs [config_name ] = mod_config
62
62
# Save the mod_config to a new config JSON file in the mod's config directory
63
- var is_save_success := mod_config .save_to_disc ()
63
+ var is_save_success := mod_config .save_to_file ()
64
64
65
65
if not is_save_success :
66
66
return null
@@ -70,7 +70,7 @@ static func create_config(mod_id: String, config_name: String, config_data: Dict
70
70
return mod_config
71
71
72
72
73
- # Updates an existing ModConfig object with new data and saves it to disk .
73
+ # Updates an existing ModConfig object with new data and save the config file .
74
74
#
75
75
# Parameters:
76
76
# - config (ModConfig): The ModConfig object to be updated.
@@ -91,8 +91,8 @@ static func update_config(config: ModConfig) -> ModConfig:
91
91
ModLoaderLog .error ("Update for config \" %s \" failed validation with error message \" %s \" " % [config .name , error_message ], LOG_NAME )
92
92
return null
93
93
94
- # Save the updated config to disk
95
- var is_save_success := config .save_to_disc ()
94
+ # Save the updated config to the config file
95
+ var is_save_success := config .save_to_file ()
96
96
97
97
if not is_save_success :
98
98
ModLoaderLog .error ("Failed to save config \" %s \" to \" %s \" ." % [config .name , config .save_path ], LOG_NAME )
@@ -119,7 +119,7 @@ static func delete_config(config: ModConfig) -> bool:
119
119
set_current_config (get_default_config (config .mod_id ))
120
120
121
121
# Remove the config file from the Mod Config directory
122
- var is_remove_success := config .remove_from_disc ()
122
+ var is_remove_success := config .remove_file ()
123
123
124
124
if not is_remove_success :
125
125
return false
0 commit comments