@@ -30,8 +30,6 @@ signal new_hooks_created
3030
3131const LOG_NAME := "ModLoader"
3232
33- var is_in_editor := OS .has_feature ("editor" )
34-
3533
3634func _init () -> void :
3735 # if mods are not enabled - don't load mods
@@ -41,7 +39,7 @@ func _init() -> void:
4139 # Only load the hook pack if not in the editor
4240 # We can't use it in the editor - see https://github.com/godotengine/godot/issues/19815
4341 # Mod devs can use the Dev Tool to generate hooks in the editor.
44- if not is_in_editor and _ModLoaderFile .file_exists (_ModLoaderPath .get_path_to_hook_pack ()):
42+ if not ModLoaderStore . has_feature . editor and _ModLoaderFile .file_exists (_ModLoaderPath .get_path_to_hook_pack ()):
4543 _load_mod_hooks_pack ()
4644
4745 # Rotate the log files once on startup.
@@ -80,10 +78,6 @@ func _init() -> void:
8078 for mod_path in mod_paths :
8179 var is_zip := _ModLoaderPath .is_zip (mod_path )
8280
83- if not is_zip and not is_in_editor and not ModLoaderStore .ml_options .load_from_unpacked :
84- ModLoaderLog .debug ("The mod from path \" %s \" is not loaded because loading from mods-unpacked has been disabled in the options." % mod_path , LOG_NAME )
85- continue
86-
8781 # Load manifest file
8882 var manifest_data : Dictionary = _ModLoaderFile .load_manifest_file (mod_path )
8983
@@ -123,7 +117,7 @@ func _init() -> void:
123117 # "don't use ZIPs with unpacked mods!"
124118 # https://github.com/godotengine/godot/issues/19815
125119 # https://github.com/godotengine/godot/issues/16798
126- if is_in_editor :
120+ if ModLoaderStore . has_feature . editor :
127121 ModLoaderLog .hint (
128122 "Loading any resource packs (.zip/.pck) with `load_resource_pack` will WIPE the entire virtual res:// directory. " +
129123 "If you have any unpacked mods in %s , they will not be loaded.Please unpack your mod ZIPs instead, and add them to %s " %
0 commit comments