File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -171,4 +171,4 @@ static func is_mod_loaded(mod_id: String) -> bool:
171
171
if not ModLoaderStore .mod_data .has (mod_id ) or not ModLoaderStore .mod_data [mod_id ].is_loadable :
172
172
return false
173
173
174
- return true
174
+ return true
Original file line number Diff line number Diff line change @@ -43,36 +43,37 @@ static func handle_script_extensions() -> void:
43
43
44
44
# Inner class so the sort function can be called by handle_script_extensions()
45
45
class InheritanceSorting :
46
-
47
- static func _check_inheritances (extension_a :ScriptExtensionData , extension_b :ScriptExtensionData )-> bool :
46
+
47
+ static func _check_inheritances (extension_a : ScriptExtensionData , extension_b : ScriptExtensionData ) -> bool :
48
48
var a_stack := []
49
49
var parent_script : Script = load (extension_a .extension_path )
50
50
while parent_script :
51
51
a_stack .push_front (parent_script .resource_path )
52
52
parent_script = parent_script .get_base_script ()
53
53
a_stack .pop_back ()
54
-
54
+
55
55
var b_stack := []
56
56
parent_script = load (extension_b .extension_path )
57
57
while parent_script :
58
58
b_stack .push_front (parent_script .resource_path )
59
59
parent_script = parent_script .get_base_script ()
60
60
b_stack .pop_back ()
61
-
61
+
62
62
var last_index : int
63
63
for index in a_stack .size ():
64
64
if index >= b_stack .size ():
65
65
return false
66
66
if a_stack [index ] != b_stack [index ]:
67
67
return a_stack [index ] < b_stack [index ]
68
68
last_index = index
69
-
69
+
70
70
if last_index < b_stack .size ():
71
71
# 'a' has a shorter stack
72
72
return true
73
-
73
+
74
74
return extension_a .extension_path < extension_b .extension_path
75
75
76
+
76
77
static func apply_extension (extension_path : String ) -> Script :
77
78
# Check path to file exists
78
79
if not File .new ().file_exists (extension_path ):
Original file line number Diff line number Diff line change @@ -80,10 +80,11 @@ var logged_messages := {
80
80
81
81
# Active user profile
82
82
var current_user_profile : ModUserProfile
83
- # List of user profiles loaded from user://mods.json
83
+
84
+ # List of user profiles loaded from user://mod_user_profiles.json
84
85
var user_profiles := {}
85
86
86
- # ModLoader cache is stored in user://ModLoaderCache .json
87
+ # ModLoader cache is stored in user://mod_loader_cache .json
87
88
var cache := {}
88
89
89
90
# These variables handle various options, which can be changed either via
You can’t perform that action at this time.
0 commit comments