diff options
| author | radiohotline <radoihotline@disroot.rg> | 2026-08-25 16:33:56 +0300 |
|---|---|---|
| committer | radiohotline <radoihotline@disroot.rg> | 2026-08-25 16:33:56 +0300 |
| commit | a89e744ed0e8c759caf041a580112365bbfe4303 (patch) | |
| tree | dd61e320904176995727e86a857d00c90d4933ba /addons/escoria-core/plugin.gd | |
| parent | 6d53d8cac78250dc888aa49d5f9d4175c6652feb (diff) | |
Diffstat (limited to 'addons/escoria-core/plugin.gd')
| -rw-r--r-- | addons/escoria-core/plugin.gd | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/addons/escoria-core/plugin.gd b/addons/escoria-core/plugin.gd index 8c5dc09..0fb8dab 100644 --- a/addons/escoria-core/plugin.gd +++ b/addons/escoria-core/plugin.gd @@ -2,6 +2,8 @@ ## Plugin script to initialize Escoria extends EditorPlugin + + ## Comma separator const used to build enabled extensions. const COMMA_SEPARATOR = "," @@ -13,6 +15,7 @@ const ASHES_ANALYZER_MENU_ITEM = "Analyze ASHES Scripts" ## The warning popup displayed on escoria-core enabling. var popup_info: AcceptDialog +var popup_migration: AcceptDialogMigrate4647 ## ASHES scripts analyzer. Needed to allow calling the analyzer from ## Project>Tools menu. @@ -33,6 +36,7 @@ func _enable_plugin(): "escoria", "res://addons/escoria-core/game/esc_autoload.gd" ) + # Prepare settings _set_escoria_main_settings() _set_escoria_debug_settings() @@ -62,7 +66,6 @@ func _enable_plugin(): get_editor_interface().get_editor_main_screen().add_child(popup_info) popup_info.popup_centered() - ## Callback for warning popup displayed on escoria-core plugin enabling.[br] ## [br] ## #### Parameters[br] @@ -73,7 +76,7 @@ func _enable_plugin(): ## [br] ## Returns nothing. func _on_warning_popup_confirmed(): - popup_info.queue_free() + popup_info.hide() ## Virtual function called when plugin is disabled.[br] @@ -103,6 +106,13 @@ func _enter_tree(): # have to add this here since reloading the project doesn't re-add the Tools menu item add_tool_menu_item(ASHES_ANALYZER_MENU_ITEM, _compiler_analyzer.analyze) + popup_migration = preload("res://addons/escoria-core/editor/migration_4_6_4_7/acceptdialog_migrate_4_6_4_7.tscn").instantiate() + get_editor_interface().get_base_control().add_child(popup_migration) + if popup_migration.required_migration: + popup_migration.popup_centered() + else: + get_editor_interface().get_base_control().remove_child(popup_migration) + ## Called when Escoria plugin gets removed from Godot Editor's tree.[br] ## [br] @@ -307,6 +317,14 @@ func _set_escoria_main_settings(): } ) + register_setting( + ESCProjectSettingsManager.SAVE_SOUNDS_PLAYBACK_POSITION, + true, + { + "type": TYPE_BOOL, + } + ) + ## Prepare the settings in the Escoria debug category[br] ## [br] |
