1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-31 07:29:49 +00:00

Don't do anything if the user adds an already existing extension

The .pck file gets replaced but changes will only be visible on app restart, as there's no way (I think) to unload and then reload the .pck file.
This commit is contained in:
Manolis Papadeas 2022-02-21 03:33:05 +02:00
parent 375f3d4cb6
commit 8d0418fe21

View file

@ -71,14 +71,7 @@ func install_extension(path: String) -> void:
func _add_extension(file_name: String) -> void:
if extensions.has(file_name):
var extension: Extension = extensions[file_name]
if extension.enabled: # Reload the extension if it's enabled
extension.enabled = false
_enable_extension(extension, false)
extension.enabled = true
_enable_extension(extension, false)
return
var file_name_no_ext: String = file_name.get_basename()
var file_path: String = EXTENSIONS_PATH.plus_file(file_name)
var success := ProjectSettings.load_resource_pack(file_path)