Skip to content

Commit f77edac

Browse files
committed
🎨 Use const for preloads
1 parent 48d41ed commit f77edac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

addons/window_helper/window_helper.gd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
extends EditorPlugin
33

44
const WINDOW_HELPER_SCENE = preload("res://addons/window_helper/window_helper.tscn")
5+
const GAME_SCREENS := preload("res://components/game_screens/data/game_screens.tres")
56

67
# A class member to hold the dock during the plugin life cycle.
78
var dock
89

9-
var _game_screens := preload("res://components/game_screens/data/game_screens.tres")
1010
var _load_screen_button: OptionButton
1111

1212
func _enter_tree():
@@ -29,5 +29,5 @@ func _fill_scene_button_with_scenes():
2929
_load_screen_button.add_item(screen_key, GameScreens.Screen[screen_key])
3030

3131
func _on_load_scene_button_selected(screen_option: GameScreens.Screen):
32-
var screen_path = _game_screens.get_screen_path(screen_option)
32+
var screen_path = GAME_SCREENS.get_screen_path(screen_option)
3333
EditorInterface.open_scene_from_path(screen_path)

0 commit comments

Comments
 (0)