Skip to content

Commit fa2b2f8

Browse files
Revert use of EditorInterface for 4.0 compatibility.
1 parent e5007ae commit fa2b2f8

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

addons/godot-plugin-refresher/plugin_refresher.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ signal confirm_refresh_plugin(p_name: String)
1010
func _ready() -> void:
1111
if get_tree().edited_scene_root == self:
1212
return # This is the scene opened in the editor!
13-
$RefreshButton.icon = EditorInterface.get_editor_theme().get_icon("Reload", "EditorIcons")
13+
$RefreshButton.icon = get_editor_interface().get_editor_theme().get_icon("Reload", "EditorIcons")
1414

1515

1616
func update_items(p_plugins_info: Array) -> void:

addons/godot-plugin-refresher/plugin_refresher_plugin.gd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func _enter_tree() -> void:
1818
add_control_to_container(CONTAINER_TOOLBAR, refresher)
1919

2020
# Watch whether any plugin is changed, added or removed on the filesystem
21-
var efs := EditorInterface.get_resource_filesystem()
21+
var efs := get_editor_interface().get_resource_filesystem()
2222
efs.filesystem_changed.connect(_on_filesystem_changed)
2323

2424
refresher.request_refresh_plugin.connect(_on_request_refresh_plugin)
@@ -100,7 +100,7 @@ func _save_settings() -> void:
100100

101101

102102
func get_settings_path() -> String:
103-
var editor_paths := EditorInterface.get_editor_paths()
103+
var editor_paths := get_editor_interface().get_editor_paths()
104104
var dir := editor_paths.get_project_settings_dir()
105105

106106
var home := dir.path_join(PLUGIN_CONFIG_DIR)
@@ -128,7 +128,7 @@ func get_recent_plugin() -> String:
128128
func _on_request_refresh_plugin(p_path: String) -> void:
129129
assert(not p_path.is_empty())
130130

131-
var disabled := not EditorInterface.is_plugin_enabled(p_path)
131+
var disabled := not get_editor_interface().is_plugin_enabled(p_path)
132132
if disabled:
133133
refresher.show_warning(p_path)
134134
else:
@@ -146,11 +146,11 @@ func get_plugin_path() -> String:
146146
func refresh_plugin(p_path: String) -> void:
147147
print("Refreshing plugin: ", p_path)
148148

149-
var enabled := EditorInterface.is_plugin_enabled(p_path)
149+
var enabled := get_editor_interface().is_plugin_enabled(p_path)
150150
if enabled: # can only disable an active plugin
151-
EditorInterface.set_plugin_enabled(p_path, false)
151+
get_editor_interface().set_plugin_enabled(p_path, false)
152152

153-
EditorInterface.set_plugin_enabled(p_path, true)
153+
get_editor_interface().set_plugin_enabled(p_path, true)
154154

155155
plugin_config.set_value(SETTINGS, SETTING_RECENT, p_path)
156156
_save_settings()

0 commit comments

Comments
 (0)