We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
duplicate_config
1 parent 62a0811 commit 4f5f79eCopy full SHA for 4f5f79e
addons/mod_loader/api/config.gd
@@ -129,6 +129,18 @@ static func delete_config(config: ModConfig) -> bool:
129
return true
130
131
132
+# Duplicate an existing ModConfig
133
+#
134
+# Parameters:
135
+# - config (ModConfig): The ModConfig object to be duplicated.
136
+# - config_name (String): The name of the new configuration.
137
138
+# Returns:
139
+# - ModConfig: The duplicated ModConfig object if successful, or null otherwise.
140
+static func duplicate_config(config: ModConfig, config_name: String) -> ModConfig:
141
+ return create_config(config.mod_id, config_name, config.data)
142
+
143
144
# Sets the current configuration of a mod to the specified configuration.
145
#
146
# Parameters:
0 commit comments