Skip to content

Commit bd56c38

Browse files
authored
refactor: ♻️ unique ids load_before - incompatibilities (#312)
Added validation to check for the same mod_ids in `load_before` and `incompatibilities` Technically, it may break mods that have the same `mod_id` listed in both the `load_before` and `incompatibilities` sections. However, since the `load_before` feature was introduced in v6.0.0, it is highly unlikely that such conflicts exist.
1 parent bff410c commit bd56c38

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

addons/mod_loader/resources/mod_manifest.gd

+7-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,13 @@ func _init(manifest: Dictionary) -> void:
134134
load_before,
135135
optional_dependencies,
136136
["load_before", "optional_dependencies"],
137-
"\"load_before\" can be viewed as optional dependency, please remove the duplicate mod-id.")
137+
"\"load_before\" can be viewed as optional dependency, please remove the duplicate mod-id."
138+
) or
139+
not validate_distinct_mod_ids_in_arrays(
140+
mod_id,
141+
load_before,
142+
incompatibilities,
143+
["load_before", "incompatibilities"])
138144
):
139145
return
140146

0 commit comments

Comments
 (0)