diff --git a/addons/dialogic/Editor/CharacterEditor/char_edit_p_section_exports.gd b/addons/dialogic/Editor/CharacterEditor/char_edit_p_section_exports.gd index 3d5b226e7..d51614025 100644 --- a/addons/dialogic/Editor/CharacterEditor/char_edit_p_section_exports.gd +++ b/addons/dialogic/Editor/CharacterEditor/char_edit_p_section_exports.gd @@ -11,7 +11,7 @@ func _get_title() -> String: return "Settings" -func _init(): +func _init() -> void: hint_text = "The settings here are @export variables from the used scene." @@ -33,7 +33,7 @@ func _recheck(data:Dictionary): load_portrait_scene_export_variables() -func load_portrait_scene_export_variables(): +func load_portrait_scene_export_variables() -> void: var scene = null if !current_portrait_data.get('scene', '').is_empty(): scene = load(current_portrait_data.get('scene')) diff --git a/addons/dialogic/Editor/CharacterEditor/char_edit_p_section_main.gd b/addons/dialogic/Editor/CharacterEditor/char_edit_p_section_main.gd index c77cf233f..7ea98cdef 100644 --- a/addons/dialogic/Editor/CharacterEditor/char_edit_p_section_main.gd +++ b/addons/dialogic/Editor/CharacterEditor/char_edit_p_section_main.gd @@ -6,7 +6,7 @@ extends DialogicCharacterEditorPortraitSection func _get_title() -> String: return "Scene" -func _init(): +func _init() -> void: hint_text = "You can use a custom scene for this portrait." func _ready() -> void: @@ -30,7 +30,7 @@ func _on_scene_picker_value_changed(prop_name:String, value:String) -> void: %OpenSceneButton.visible = !data.get('scene', '').is_empty() -func _on_open_scene_button_pressed(): +func _on_open_scene_button_pressed() -> void: if !%ScenePicker.current_value.is_empty() and ResourceLoader.exists(%ScenePicker.current_value): DialogicUtil.get_dialogic_plugin().get_editor_interface().open_scene_from_path(%ScenePicker.current_value) EditorInterface.set_main_screen_editor("2D") diff --git a/addons/dialogic/Editor/CharacterEditor/char_edit_p_section_main_exports.gd b/addons/dialogic/Editor/CharacterEditor/char_edit_p_section_main_exports.gd index 30da4d370..690aefc1b 100644 --- a/addons/dialogic/Editor/CharacterEditor/char_edit_p_section_main_exports.gd +++ b/addons/dialogic/Editor/CharacterEditor/char_edit_p_section_main_exports.gd @@ -13,7 +13,7 @@ func _load_portrait_data(data:Dictionary) -> void: current_portrait_data = data load_portrait_scene_export_variables() -func load_portrait_scene_export_variables(): +func load_portrait_scene_export_variables() -> void: for child in $Grid.get_children(): child.queue_free() diff --git a/addons/dialogic/Editor/CharacterEditor/character_editor.gd b/addons/dialogic/Editor/CharacterEditor/character_editor.gd index 069a74c87..586b38368 100644 --- a/addons/dialogic/Editor/CharacterEditor/character_editor.gd +++ b/addons/dialogic/Editor/CharacterEditor/character_editor.gd @@ -642,12 +642,12 @@ func _on_some_resource_saved(file:Variant) -> void: update_preview(true) -func _on_full_preview_available_rect_resized(): +func _on_full_preview_available_rect_resized() -> void: if %FitPreview_Toggle.button_pressed: update_preview() -func _on_create_character_button_pressed(): +func _on_create_character_button_pressed() -> void: editors_manager.show_add_resource_dialog( new_character, '*.dch; DialogicCharacter', @@ -670,7 +670,7 @@ func _on_fit_preview_toggle_toggled(button_pressed): #endregion ## Open the reference manager -func _on_reference_manger_button_pressed(): +func _on_reference_manger_button_pressed() -> void: editors_manager.reference_manager.open() %PortraitChangeInfo.hide() diff --git a/addons/dialogic/Editor/Common/ReferenceManager_AddReplacementPanel.gd b/addons/dialogic/Editor/Common/ReferenceManager_AddReplacementPanel.gd index 685bb2e72..f26c95c69 100644 --- a/addons/dialogic/Editor/Common/ReferenceManager_AddReplacementPanel.gd +++ b/addons/dialogic/Editor/Common/ReferenceManager_AddReplacementPanel.gd @@ -99,7 +99,7 @@ func get_character_suggestions(search_text:String) -> Dictionary: return suggestions -func save(): +func save() -> void: if %Old.text.is_empty() or %New.text.is_empty(): return if %Where.selected == 1 and %Character.current_value == null: diff --git a/addons/dialogic/Editor/Common/hint_tooltip_icon.gd b/addons/dialogic/Editor/Common/hint_tooltip_icon.gd index 9769c9e3c..81bac7038 100644 --- a/addons/dialogic/Editor/Common/hint_tooltip_icon.gd +++ b/addons/dialogic/Editor/Common/hint_tooltip_icon.gd @@ -3,7 +3,7 @@ extends TextureRect @export_multiline var hint_text = "" -func _ready(): +func _ready() -> void: texture = get_theme_icon("NodeInfo", "EditorIcons") modulate = get_theme_color("contrast_color_1", "Editor") tooltip_text = hint_text diff --git a/addons/dialogic/Editor/Common/reference_manager.gd b/addons/dialogic/Editor/Common/reference_manager.gd index efdf9115b..dc63e54fe 100644 --- a/addons/dialogic/Editor/Common/reference_manager.gd +++ b/addons/dialogic/Editor/Common/reference_manager.gd @@ -29,7 +29,7 @@ func tab_changed(enabled:bool, index:int) -> void: child.set_pressed_no_signal(index-1 == child.get_index()) -func open(): +func open() -> void: show() $Tabs/BrokenReferences.update_indicator() diff --git a/addons/dialogic/Editor/Common/sidebar.gd b/addons/dialogic/Editor/Common/sidebar.gd index 541c8e65a..438f90814 100644 --- a/addons/dialogic/Editor/Common/sidebar.gd +++ b/addons/dialogic/Editor/Common/sidebar.gd @@ -10,7 +10,7 @@ signal content_item_activated(item_name) @onready var editors_manager = get_parent().get_parent() -func _ready(): +func _ready() -> void: if owner.get_parent() is SubViewport: return diff --git a/addons/dialogic/Editor/Common/toolbar.gd b/addons/dialogic/Editor/Common/toolbar.gd index 2877ecb84..e49c1ea04 100644 --- a/addons/dialogic/Editor/Common/toolbar.gd +++ b/addons/dialogic/Editor/Common/toolbar.gd @@ -6,7 +6,7 @@ extends HBoxContainer ################################################################################ ## EDITOR BUTTONS/LABELS ################################################################################ -func _ready(): +func _ready() -> void: if owner.get_parent() is SubViewport: return %CustomButtons.custom_minimum_size.y = 33 * DialogicUtil.get_editor_scale() diff --git a/addons/dialogic/Editor/Common/update_install_window.gd b/addons/dialogic/Editor/Common/update_install_window.gd index 7cdda8b16..d2fb1dd8c 100644 --- a/addons/dialogic/Editor/Common/update_install_window.gd +++ b/addons/dialogic/Editor/Common/update_install_window.gd @@ -5,7 +5,7 @@ var current_info : Dictionary = {} @onready var editor_view := find_parent('EditorView') -func _ready(): +func _ready() -> void: await editor_view.ready theme = editor_view.theme @@ -16,7 +16,7 @@ func _ready(): DialogicUtil.get_dialogic_plugin().get_editor_interface().get_resource_filesystem().resources_reimported.connect(_on_resources_reimported) -func open(): +func open() -> void: get_parent().popup_centered_ratio(0.5) get_parent().mode = Window.MODE_WINDOWED get_parent().move_to_foreground() @@ -76,11 +76,11 @@ func load_info(info:Dictionary, update_type:int) -> void: else: %Reactions.hide() -func _on_window_close_requested(): +func _on_window_close_requested() -> void: get_parent().visible = false -func _on_install_pressed(): +func _on_install_pressed() -> void: find_parent('UpdateManager').request_update_download() %InfoLabel.text = "Downloading. This can take a moment." @@ -88,7 +88,7 @@ func _on_install_pressed(): %LoadingIcon.create_tween().set_loops().tween_property(%LoadingIcon, 'rotation', 2*PI, 1).from(0) -func _on_refresh_pressed(): +func _on_refresh_pressed() -> void: find_parent('UpdateManager').request_update_check() @@ -163,14 +163,14 @@ func _on_content_meta_clicked(meta:Variant) -> void: OS.shell_open(str(meta)) -func _on_install_mouse_entered(): +func _on_install_mouse_entered() -> void: if not %Install.disabled: %InstallWarning.show() -func _on_install_mouse_exited(): +func _on_install_mouse_exited() -> void: %InstallWarning.hide() -func _on_restart_pressed(): +func _on_restart_pressed() -> void: DialogicUtil.get_dialogic_plugin().get_editor_interface().restart_editor(true) diff --git a/addons/dialogic/Editor/Common/update_manager.gd b/addons/dialogic/Editor/Common/update_manager.gd index d1296a33d..b1fb5e369 100644 --- a/addons/dialogic/Editor/Common/update_manager.gd +++ b/addons/dialogic/Editor/Common/update_manager.gd @@ -162,7 +162,7 @@ func _on_DownloadRequest_completed(result:int, response_code:int, headers:Packed ###################### SOME UI MANAGEMENT ##################################### ################################################################################ -func setup_version_indicator(): +func setup_version_indicator() -> void: version_indicator = %Sidebar.get_node('%CurrentVersion') version_indicator.pressed.connect($Window/UpdateInstallWindow.open) version_indicator.text = get_current_version() diff --git a/addons/dialogic/Editor/Events/EventBlock/event_block.gd b/addons/dialogic/Editor/Events/EventBlock/event_block.gd index 3d3ebeab7..2734b2ba1 100644 --- a/addons/dialogic/Editor/Events/EventBlock/event_block.gd +++ b/addons/dialogic/Editor/Events/EventBlock/event_block.gd @@ -40,7 +40,7 @@ var current_indent_level := 1 #region UI AND LOGIC INITIALIZATION ################################################################################ -func _ready(): +func _ready() -> void: if get_parent() is SubViewport: return diff --git a/addons/dialogic/Editor/Events/EventBlock/event_right_click_menu.gd b/addons/dialogic/Editor/Events/EventBlock/event_right_click_menu.gd index a2b42b9ec..16b08838b 100644 --- a/addons/dialogic/Editor/Events/EventBlock/event_right_click_menu.gd +++ b/addons/dialogic/Editor/Events/EventBlock/event_right_click_menu.gd @@ -3,7 +3,7 @@ extends PopupMenu var current_event : Node = null -func _ready(): +func _ready() -> void: clear() add_icon_item(get_theme_icon("Duplicate", "EditorIcons"), "Duplicate") add_separator() diff --git a/addons/dialogic/Editor/Events/Fields/field_array.gd b/addons/dialogic/Editor/Events/Fields/field_array.gd index 6e0d59c5f..0f5793d8e 100644 --- a/addons/dialogic/Editor/Events/Fields/field_array.gd +++ b/addons/dialogic/Editor/Events/Fields/field_array.gd @@ -7,7 +7,7 @@ extends DialogicVisualEditorField const ArrayValue := "res://addons/dialogic/Editor/Events/Fields/array_part.tscn" -func _ready(): +func _ready() -> void: %Add.icon = get_theme_icon("Add", "EditorIcons") %Add.pressed.connect(_on_AddButton_pressed) diff --git a/addons/dialogic/Editor/Events/Fields/field_condition.gd b/addons/dialogic/Editor/Events/Fields/field_condition.gd index d7a149fb8..84819d709 100644 --- a/addons/dialogic/Editor/Events/Fields/field_condition.gd +++ b/addons/dialogic/Editor/Events/Fields/field_condition.gd @@ -21,7 +21,7 @@ func _set_value(value:Variant) -> void: -func _autofocus(): +func _autofocus() -> void: %Value1Variable.grab_focus() #endregion diff --git a/addons/dialogic/Editor/Events/Fields/field_dictionary.gd b/addons/dialogic/Editor/Events/Fields/field_dictionary.gd index 194f130a5..6b496a7ab 100644 --- a/addons/dialogic/Editor/Events/Fields/field_dictionary.gd +++ b/addons/dialogic/Editor/Events/Fields/field_dictionary.gd @@ -5,7 +5,7 @@ extends DialogicVisualEditorField const PairValue = "res://addons/dialogic/Editor/Events/Fields/dictionary_part.tscn" -func _ready(): +func _ready() -> void: %Add.icon = get_theme_icon("Add", "EditorIcons") diff --git a/addons/dialogic/Editor/Events/Fields/field_number.gd b/addons/dialogic/Editor/Events/Fields/field_number.gd index 967bdf645..b139da2e3 100644 --- a/addons/dialogic/Editor/Events/Fields/field_number.gd +++ b/addons/dialogic/Editor/Events/Fields/field_number.gd @@ -53,7 +53,7 @@ func _set_value(new_value: Variant) -> void: %Value.tooltip_text = tooltip_text -func _autofocus(): +func _autofocus() -> void: %Value.grab_focus() diff --git a/addons/dialogic/Editor/Events/Fields/field_text_singleline.gd b/addons/dialogic/Editor/Events/Fields/field_text_singleline.gd index c6378eec4..6f83ae115 100644 --- a/addons/dialogic/Editor/Events/Fields/field_text_singleline.gd +++ b/addons/dialogic/Editor/Events/Fields/field_text_singleline.gd @@ -25,7 +25,7 @@ func _set_value(value:Variant) -> void: self.text = str(value) -func _autofocus(): +func _autofocus() -> void: grab_focus() #endregion diff --git a/addons/dialogic/Editor/HomePage/home_page.gd b/addons/dialogic/Editor/HomePage/home_page.gd index c666c3282..ab2b90d8e 100644 --- a/addons/dialogic/Editor/HomePage/home_page.gd +++ b/addons/dialogic/Editor/HomePage/home_page.gd @@ -11,7 +11,7 @@ func _get_icon() -> Texture: return load("res://addons/dialogic/Editor/Images/plugin-icon.svg") -func _ready(): +func _ready() -> void: self_modulate = get_theme_color("font_color", "Editor") self_modulate.a = 0.2 @@ -30,7 +30,7 @@ func _ready(): -func _register(): +func _register() -> void: editors_manager.register_simple_editor(self) self.alternative_text = "Welcome to dialogic!" diff --git a/addons/dialogic/Editor/Settings/HintLabelStylingScript.gd b/addons/dialogic/Editor/Settings/HintLabelStylingScript.gd index 1b51f30d4..f5f11e3a6 100644 --- a/addons/dialogic/Editor/Settings/HintLabelStylingScript.gd +++ b/addons/dialogic/Editor/Settings/HintLabelStylingScript.gd @@ -2,7 +2,7 @@ extends Label # Called when the node enters the scene tree for the first time. -func _ready(): +func _ready() -> void: # don't load the label settings when opening as a scene # prevents HUGE diffs if owner.get_parent() is SubViewport: diff --git a/addons/dialogic/Editor/Settings/settings_editor.gd b/addons/dialogic/Editor/Settings/settings_editor.gd index 7c51b4d8d..ef938d338 100644 --- a/addons/dialogic/Editor/Settings/settings_editor.gd +++ b/addons/dialogic/Editor/Settings/settings_editor.gd @@ -15,12 +15,12 @@ func _get_icon() -> Texture: return get_theme_icon("PluginScript", "EditorIcons") -func _register(): +func _register() -> void: editors_manager.register_simple_editor(self) self.alternative_text = "Customize dialogic and it's behaviour" -func _ready(): +func _ready() -> void: if get_parent() is SubViewport: return @@ -156,13 +156,13 @@ func _open(extra_information:Variant = null) -> void: open_tab(%SettingsContent.get_node(extra_information)) -func _close(): +func _close() -> void: for child in %SettingsContent.get_children(): if child.get_meta('section').has_method('_about_to_close'): child.get_meta('section')._about_to_close() -func refresh(): +func refresh() -> void: for child in %SettingsContent.get_children(): if child.get_meta('section').has_method('_refresh'): child.get_meta('section')._refresh() diff --git a/addons/dialogic/Editor/Settings/settings_modules.gd b/addons/dialogic/Editor/Settings/settings_modules.gd index 4f44cc3f4..8c9625f87 100644 --- a/addons/dialogic/Editor/Settings/settings_modules.gd +++ b/addons/dialogic/Editor/Settings/settings_modules.gd @@ -272,7 +272,7 @@ func _on_tree_item_selected() -> void: %GeneralInfo.text = "" -func _on_external_link_pressed(): +func _on_external_link_pressed() -> void: if %ExternalLink.has_meta('url'): OS.shell_open(%ExternalLink.get_meta('url')) diff --git a/addons/dialogic/Editor/TimelineEditor/TextEditor/CodeCompletionHelper.gd b/addons/dialogic/Editor/TimelineEditor/TextEditor/CodeCompletionHelper.gd index 7d3b92a2d..5096acfbe 100644 --- a/addons/dialogic/Editor/TimelineEditor/TextEditor/CodeCompletionHelper.gd +++ b/addons/dialogic/Editor/TimelineEditor/TextEditor/CodeCompletionHelper.gd @@ -21,7 +21,7 @@ var shortcode_events := {} var custom_syntax_events := [] var text_event :DialogicTextEvent = null -func _ready(): +func _ready() -> void: # Compile RegEx's completion_word_regex.compile("(?(\\W)|^)(?\\w*)\\x{FFFF}") completion_shortcode_getter_regex.compile("\\[(?\\w*)") diff --git a/addons/dialogic/Editor/TimelineEditor/TextEditor/syntax_highlighter.gd b/addons/dialogic/Editor/TimelineEditor/TextEditor/syntax_highlighter.gd index 56f6b83bd..767186c5b 100644 --- a/addons/dialogic/Editor/TimelineEditor/TextEditor/syntax_highlighter.gd +++ b/addons/dialogic/Editor/TimelineEditor/TextEditor/syntax_highlighter.gd @@ -30,7 +30,7 @@ var custom_syntax_events := [] var text_event :DialogicTextEvent = null -func _init(): +func _init() -> void: # Load colors from editor settings if DialogicUtil.get_dialogic_plugin(): var editor_settings = DialogicUtil.get_dialogic_plugin().get_editor_interface().get_editor_settings() diff --git a/addons/dialogic/Editor/TimelineEditor/TextEditor/timeline_editor_text.gd b/addons/dialogic/Editor/TimelineEditor/TextEditor/timeline_editor_text.gd index 183b68a2e..b80b52990 100644 --- a/addons/dialogic/Editor/TimelineEditor/TextEditor/timeline_editor_text.gd +++ b/addons/dialogic/Editor/TimelineEditor/TextEditor/timeline_editor_text.gd @@ -8,19 +8,19 @@ extends CodeEdit var label_regex := RegEx.create_from_string('label +(?[^\n]+)') -func _ready(): +func _ready() -> void: await find_parent('EditorView').ready syntax_highlighter = code_completion_helper.syntax_highlighter timeline_editor.editors_manager.sidebar.content_item_activated.connect(_on_content_item_clicked) -func _on_text_editor_text_changed(): +func _on_text_editor_text_changed() -> void: timeline_editor.current_resource_state = DialogicEditor.ResourceStates.UNSAVED request_code_completion(true) $UpdateTimer.start() -func clear_timeline(): +func clear_timeline() -> void: text = '' update_content_list() @@ -37,7 +37,7 @@ func load_timeline(timeline:DialogicTimeline) -> void: update_content_list() -func save_timeline(): +func save_timeline() -> void: if !timeline_editor.current_resource: return @@ -183,11 +183,11 @@ func _drop_data(at_position:Vector2, data:Variant) -> void: insert_text_at_caret(result) -func _on_update_timer_timeout(): +func _on_update_timer_timeout() -> void: update_content_list() -func update_content_list(): +func update_content_list() -> void: var labels :PackedStringArray = [] for i in label_regex.search_all(text): labels.append(i.get_string('name')) diff --git a/addons/dialogic/Editor/TimelineEditor/VisualEditor/AddEventButton.gd b/addons/dialogic/Editor/TimelineEditor/VisualEditor/AddEventButton.gd index 9fe4e16db..02c0a5086 100644 --- a/addons/dialogic/Editor/TimelineEditor/VisualEditor/AddEventButton.gd +++ b/addons/dialogic/Editor/TimelineEditor/VisualEditor/AddEventButton.gd @@ -59,5 +59,5 @@ func toggle_name(on:= false) -> void: apply_base_button_style() -func _on_button_down(): +func _on_button_down() -> void: find_parent('VisualEditor').get_node('%TimelineArea').start_dragging(1, resource) diff --git a/addons/dialogic/Editor/TimelineEditor/VisualEditor/TimelineArea.gd b/addons/dialogic/Editor/TimelineEditor/VisualEditor/TimelineArea.gd index 349210388..c5bf7239f 100644 --- a/addons/dialogic/Editor/TimelineEditor/VisualEditor/TimelineArea.gd +++ b/addons/dialogic/Editor/TimelineEditor/VisualEditor/TimelineArea.gd @@ -59,7 +59,7 @@ func _process(delta:float) -> void: queue_redraw() -func finish_dragging(): +func finish_dragging() -> void: dragging = false if get_global_rect().has_point(get_global_mouse_position()): drag_completed.emit(drag_type, drag_to_position, drag_data) diff --git a/addons/dialogic/Editor/TimelineEditor/timeline_editor.gd b/addons/dialogic/Editor/TimelineEditor/timeline_editor.gd index 0a4d0bc07..ed3ea58c3 100644 --- a/addons/dialogic/Editor/TimelineEditor/timeline_editor.gd +++ b/addons/dialogic/Editor/TimelineEditor/timeline_editor.gd @@ -93,7 +93,7 @@ func _input(event: InputEvent) -> void: ## Method to play the current timeline. Connected to the button in the sidebar. -func play_timeline(): +func play_timeline() -> void: _save() var dialogic_plugin = DialogicUtil.get_dialogic_plugin() @@ -105,7 +105,7 @@ func play_timeline(): ## Method to switch from visual to text editor (and vice versa). Connected to the button in the sidebar. -func toggle_editor_mode(): +func toggle_editor_mode() -> void: match current_editor_mode: 0: current_editor_mode = 1 @@ -125,12 +125,12 @@ func toggle_editor_mode(): DialogicUtil.set_editor_setting('timeline_editor_mode', current_editor_mode) -func _on_resource_unsaved(): +func _on_resource_unsaved() -> void: if current_resource: current_resource.set_meta("timeline_not_saved", true) -func _on_resource_saved(): +func _on_resource_saved() -> void: if current_resource: current_resource.set_meta("timeline_not_saved", false) @@ -145,7 +145,7 @@ func new_timeline(path:String) -> void: editors_manager.edit_resource(new_timeline) -func _ready(): +func _ready() -> void: $NoTimelineScreen.add_theme_stylebox_override("panel", get_theme_stylebox("Background", "EditorStyles")) # switch editor mode button @@ -158,7 +158,7 @@ func _ready(): -func _on_create_timeline_button_pressed(): +func _on_create_timeline_button_pressed() -> void: editors_manager.show_add_resource_dialog( new_timeline, '*.dtl; DialogicTimeline', @@ -167,7 +167,7 @@ func _on_create_timeline_button_pressed(): ) -func _clear(): +func _clear() -> void: current_resource = null current_resource_state = ResourceStates.SAVED match current_editor_mode: diff --git a/addons/dialogic/Editor/editor_main.gd b/addons/dialogic/Editor/editor_main.gd index 48589b3a4..98946db01 100644 --- a/addons/dialogic/Editor/editor_main.gd +++ b/addons/dialogic/Editor/editor_main.gd @@ -46,7 +46,7 @@ func _ready() -> void: update_theme_additions() -func update_theme_additions(): +func update_theme_additions() -> void: if theme == null: theme = Theme.new() theme.clear() @@ -162,7 +162,7 @@ func update_theme_additions(): ## Switches from floating window mode to embedded mode based on current mode -func toggle_floating_window(): +func toggle_floating_window() -> void: if get_parent() is Window: swap_to_embedded_editor() else: @@ -170,7 +170,7 @@ func toggle_floating_window(): ## Removes the main control from it's parent and adds it to a new Window node -func swap_to_floating_window(): +func swap_to_floating_window() -> void: if get_parent() is Window: return @@ -194,7 +194,7 @@ func swap_to_floating_window(): ## Removes the main control from the window node and adds it to it's grandparent ## which is the original owner. -func swap_to_embedded_editor(): +func swap_to_embedded_editor() -> void: if not get_parent() is Window: return diff --git a/addons/dialogic/Editor/editors_manager.gd b/addons/dialogic/Editor/editors_manager.gd index cbd575da6..6e96cbbc2 100644 --- a/addons/dialogic/Editor/editors_manager.gd +++ b/addons/dialogic/Editor/editors_manager.gd @@ -280,5 +280,5 @@ func get_current_editor() -> DialogicEditor: return current_editor -func _exit_tree(): +func _exit_tree() -> void: DialogicUtil.set_editor_setting('last_resources', used_resources_cache) diff --git a/addons/dialogic/Example Assets/already_read_indicator.gd b/addons/dialogic/Example Assets/already_read_indicator.gd index 8ead30869..4dbf5d392 100644 --- a/addons/dialogic/Example Assets/already_read_indicator.gd +++ b/addons/dialogic/Example Assets/already_read_indicator.gd @@ -1,6 +1,6 @@ extends Control -func _ready(): +func _ready() -> void: if DialogicUtil.autoload().has_subsystem('History'): DialogicUtil.autoload().History.visited_event.connect(_on_visited_event) DialogicUtil.autoload().History.unvisited_event.connect(_on_not_read_event) diff --git a/addons/dialogic/Example Assets/portraits/CustomPortrait_AnimatedSprite.gd b/addons/dialogic/Example Assets/portraits/CustomPortrait_AnimatedSprite.gd index e2378dd3b..5595991f9 100644 --- a/addons/dialogic/Example Assets/portraits/CustomPortrait_AnimatedSprite.gd +++ b/addons/dialogic/Example Assets/portraits/CustomPortrait_AnimatedSprite.gd @@ -9,7 +9,7 @@ func _update_portrait(passed_character:DialogicCharacter, passed_portrait:String if $Sprite.sprite_frames.has_animation(passed_portrait): $Sprite.play(passed_portrait) -func _on_animated_sprite_2d_animation_finished(): +func _on_animated_sprite_2d_animation_finished() -> void: $Sprite.frame = randi()%$Sprite.sprite_frames.get_frame_count($Sprite.animation) $Sprite.play() diff --git a/addons/dialogic/Example Assets/portraits/simple_highlight_portrait.gd b/addons/dialogic/Example Assets/portraits/simple_highlight_portrait.gd index 64aac03b4..a6b875633 100644 --- a/addons/dialogic/Example Assets/portraits/simple_highlight_portrait.gd +++ b/addons/dialogic/Example Assets/portraits/simple_highlight_portrait.gd @@ -19,12 +19,12 @@ func _ready() -> void: self.modulate = unhighlighted_color -func _highlight(): +func _highlight() -> void: create_tween().tween_property(self, 'modulate', Color.WHITE, 0.15) prev_z_index = DialogicUtil.autoload().Portraits.get_character_info(character).get('z_index', 0) DialogicUtil.autoload().Portraits.change_character_z_index(character, 99) -func _unhighlight(): +func _unhighlight() -> void: create_tween().tween_property(self, 'modulate', unhighlighted_color, 0.15) DialogicUtil.autoload().Portraits.change_character_z_index(character, prev_z_index) diff --git a/addons/dialogic/Modules/Background/event_background.gd b/addons/dialogic/Modules/Background/event_background.gd index 3fac581c9..a049d4372 100644 --- a/addons/dialogic/Modules/Background/event_background.gd +++ b/addons/dialogic/Modules/Background/event_background.gd @@ -95,7 +95,7 @@ func get_shortcode_parameters() -> Dictionary: #region EDITOR REPRESENTATION ################################################################################ -func build_event_editor(): +func build_event_editor() -> void: add_header_edit('_scene_type', ValueType.FIXED_OPTIONS, { 'left_text' :'Show', 'options': [ diff --git a/addons/dialogic/Modules/Background/node_background_holder.gd b/addons/dialogic/Modules/Background/node_background_holder.gd index 6b2c3b520..11a262872 100644 --- a/addons/dialogic/Modules/Background/node_background_holder.gd +++ b/addons/dialogic/Modules/Background/node_background_holder.gd @@ -2,5 +2,5 @@ class_name DialogicNode_BackgroundHolder extends ColorRect -func _ready(): +func _ready() -> void: add_to_group('dialogic_background_holders') diff --git a/addons/dialogic/Modules/Call/event_call.gd b/addons/dialogic/Modules/Call/event_call.gd index cd9cbaafa..52cb14fe6 100644 --- a/addons/dialogic/Modules/Call/event_call.gd +++ b/addons/dialogic/Modules/Call/event_call.gd @@ -137,7 +137,7 @@ func get_shortcode_parameters() -> Dictionary: ## EDITOR REPRESENTATION ################################################################################ -func build_event_editor(): +func build_event_editor() -> void: add_header_edit('autoload_name', ValueType.DYNAMIC_OPTIONS, {'left_text':'On autoload', 'empty_text':'Autoload', 'suggestions_func':get_autoload_suggestions, @@ -201,7 +201,7 @@ func update_argument_info() -> void: break -func check_arguments_and_update_warning(): +func check_arguments_and_update_warning() -> void: if not _current_method_arg_hints.has("info") or _current_method_arg_hints.info.is_empty(): ui_update_warning.emit() return diff --git a/addons/dialogic/Modules/Character/DefaultAnimations/bounce.gd b/addons/dialogic/Modules/Character/DefaultAnimations/bounce.gd index 2d006a540..c509be6cd 100644 --- a/addons/dialogic/Modules/Character/DefaultAnimations/bounce.gd +++ b/addons/dialogic/Modules/Character/DefaultAnimations/bounce.gd @@ -1,6 +1,6 @@ extends DialogicAnimation -func animate(): +func animate() -> void: var tween := (node.create_tween() as Tween) tween.set_ease(Tween.EASE_OUT) diff --git a/addons/dialogic/Modules/Character/DefaultAnimations/heartbeat.gd b/addons/dialogic/Modules/Character/DefaultAnimations/heartbeat.gd index f83a8ee80..e3a982dce 100644 --- a/addons/dialogic/Modules/Character/DefaultAnimations/heartbeat.gd +++ b/addons/dialogic/Modules/Character/DefaultAnimations/heartbeat.gd @@ -1,6 +1,6 @@ extends DialogicAnimation -func animate(): +func animate() -> void: var tween := (node.create_tween() as Tween) tween.tween_property(node, 'scale', Vector2(1,1)*1.2, time*0.5).set_trans(Tween.TRANS_ELASTIC).set_ease(Tween.EASE_OUT) tween.tween_property(node, 'scale', Vector2(1,1), time*0.5).set_trans(Tween.TRANS_BOUNCE).set_ease(Tween.EASE_OUT) diff --git a/addons/dialogic/Modules/Character/DefaultAnimations/shake_x.gd b/addons/dialogic/Modules/Character/DefaultAnimations/shake_x.gd index a3f366a22..91a053a32 100644 --- a/addons/dialogic/Modules/Character/DefaultAnimations/shake_x.gd +++ b/addons/dialogic/Modules/Character/DefaultAnimations/shake_x.gd @@ -1,6 +1,6 @@ extends DialogicAnimation -func animate(): +func animate() -> void: var tween := (node.create_tween() as Tween) tween.set_ease(Tween.EASE_IN_OUT).set_trans(Tween.TRANS_SINE) diff --git a/addons/dialogic/Modules/Character/DefaultAnimations/shake_y.gd b/addons/dialogic/Modules/Character/DefaultAnimations/shake_y.gd index 9fe3a9146..0107ed8a2 100644 --- a/addons/dialogic/Modules/Character/DefaultAnimations/shake_y.gd +++ b/addons/dialogic/Modules/Character/DefaultAnimations/shake_y.gd @@ -1,6 +1,6 @@ extends DialogicAnimation -func animate(): +func animate() -> void: var tween := (node.create_tween() as Tween) tween.set_ease(Tween.EASE_IN_OUT).set_trans(Tween.TRANS_SINE) diff --git a/addons/dialogic/Modules/Character/DefaultAnimations/tada.gd b/addons/dialogic/Modules/Character/DefaultAnimations/tada.gd index 38eef4a96..bc38560f6 100644 --- a/addons/dialogic/Modules/Character/DefaultAnimations/tada.gd +++ b/addons/dialogic/Modules/Character/DefaultAnimations/tada.gd @@ -1,6 +1,6 @@ extends DialogicAnimation -func animate(): +func animate() -> void: var tween := (node.create_tween() as Tween) tween.set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT) diff --git a/addons/dialogic/Modules/Character/event_position.gd b/addons/dialogic/Modules/Character/event_position.gd index f46ae9af4..5dd6a951c 100644 --- a/addons/dialogic/Modules/Character/event_position.gd +++ b/addons/dialogic/Modules/Character/event_position.gd @@ -80,7 +80,7 @@ func get_shortcode_parameters() -> Dictionary: ## EDITOR REPRESENTATION ################################################################################ -func build_event_editor(): +func build_event_editor() -> void: add_header_edit('action', ValueType.FIXED_OPTIONS, { 'options': [ { diff --git a/addons/dialogic/Modules/Character/node_portrait_container.gd b/addons/dialogic/Modules/Character/node_portrait_container.gd index 9a2307f36..50bbe0b44 100644 --- a/addons/dialogic/Modules/Character/node_portrait_container.gd +++ b/addons/dialogic/Modules/Character/node_portrait_container.gd @@ -70,7 +70,7 @@ var default_portrait_scene :String = DialogicUtil.get_module_path('Character').p var default_debug_character := load(DialogicUtil.get_module_path('Character').path_join("preview_character.tres")) -func _ready(): +func _ready() -> void: match mode: PositionModes.POSITION: add_to_group('dialogic_portrait_con_position') @@ -97,7 +97,7 @@ func _ready(): ## MAIN METHODS ################################################################################ -func update_portrait_transforms(): +func update_portrait_transforms() -> void: for child in get_children(): DialogicUtil.autoload().Portraits._update_portrait_transform(child) diff --git a/addons/dialogic/Modules/Choice/node_button_sound.gd b/addons/dialogic/Modules/Choice/node_button_sound.gd index e6d7e5217..ccbff4a2f 100644 --- a/addons/dialogic/Modules/Choice/node_button_sound.gd +++ b/addons/dialogic/Modules/Choice/node_button_sound.gd @@ -11,7 +11,7 @@ extends AudioStreamPlayer ## Sound to be played on focus. See [sound_pressed] for more. @export var sound_focus:AudioStream -func _ready(): +func _ready() -> void: add_to_group('dialogic_button_sound') _connect_all_buttons() @@ -21,7 +21,7 @@ func play_sound(sound) -> void: stream = sound play() -func _connect_all_buttons(): +func _connect_all_buttons() -> void: for child in get_parent().get_children(): if child is DialogicNode_ChoiceButton: child.button_up.connect(_on_pressed.bind(child.sound_pressed)) diff --git a/addons/dialogic/Modules/Choice/ui_choice_end.gd b/addons/dialogic/Modules/Choice/ui_choice_end.gd index 8bfb21873..f6e483733 100644 --- a/addons/dialogic/Modules/Choice/ui_choice_end.gd +++ b/addons/dialogic/Modules/Choice/ui_choice_end.gd @@ -3,7 +3,7 @@ extends HBoxContainer var parent_resource: DialogicChoiceEvent = null -func refresh(): +func refresh() -> void: $AddChoice.icon = get_theme_icon("Add", "EditorIcons") if parent_resource is DialogicChoiceEvent: diff --git a/addons/dialogic/Modules/Clear/event_clear.gd b/addons/dialogic/Modules/Clear/event_clear.gd index 818c1ba9b..10d6b9262 100644 --- a/addons/dialogic/Modules/Clear/event_clear.gd +++ b/addons/dialogic/Modules/Clear/event_clear.gd @@ -93,7 +93,7 @@ func get_shortcode_parameters() -> Dictionary: ## EDITOR REPRESENTATION ################################################################################ -func build_event_editor(): +func build_event_editor() -> void: add_header_label('Clear') add_body_edit('time', ValueType.NUMBER, {'left_text':'Time:'}) diff --git a/addons/dialogic/Modules/Comment/event_comment.gd b/addons/dialogic/Modules/Comment/event_comment.gd index d70a34ac5..f214497c6 100644 --- a/addons/dialogic/Modules/Comment/event_comment.gd +++ b/addons/dialogic/Modules/Comment/event_comment.gd @@ -54,7 +54,7 @@ func is_valid_event(string:String) -> bool: ## EDITOR REPRESENTATION ################################################################################ -func build_event_editor(): +func build_event_editor() -> void: add_header_edit('text', ValueType.SINGLELINE_TEXT, {'left_text':'#', 'autofocus':true}) diff --git a/addons/dialogic/Modules/Condition/event_condition.gd b/addons/dialogic/Modules/Condition/event_condition.gd index 3902a894d..99bdd4e82 100644 --- a/addons/dialogic/Modules/Condition/event_condition.gd +++ b/addons/dialogic/Modules/Condition/event_condition.gd @@ -103,7 +103,7 @@ func is_valid_event(string:String) -> bool: ## EDITOR REPRESENTATION ################################################################################ -func build_event_editor(): +func build_event_editor() -> void: add_header_edit('condition_type', ValueType.FIXED_OPTIONS, { 'options': [ { diff --git a/addons/dialogic/Modules/Condition/ui_condition_end.gd b/addons/dialogic/Modules/Condition/ui_condition_end.gd index 747955cef..b5200ce35 100644 --- a/addons/dialogic/Modules/Condition/ui_condition_end.gd +++ b/addons/dialogic/Modules/Condition/ui_condition_end.gd @@ -3,11 +3,11 @@ extends HBoxContainer var parent_resource = null -func _ready(): +func _ready() -> void: $AddElif.button_up.connect(add_elif) $AddElse.button_up.connect(add_else) -func refresh(): +func refresh() -> void: if parent_resource is DialogicConditionEvent: # hide add elif and add else button on ELSE event $AddElif.visible = parent_resource.condition_type != DialogicConditionEvent.ConditionTypes.ELSE @@ -28,7 +28,7 @@ func refresh(): else: hide() -func add_elif(): +func add_elif() -> void: var timeline = find_parent('VisualEditor') if timeline: var resource = DialogicConditionEvent.new() @@ -37,7 +37,7 @@ func add_elif(): timeline.indent_events() timeline.something_changed() -func add_else(): +func add_else() -> void: var timeline = find_parent('VisualEditor') if timeline: var resource = DialogicConditionEvent.new() diff --git a/addons/dialogic/Modules/DefaultLayoutParts/Base_TextBubble/text_bubble_base.gd b/addons/dialogic/Modules/DefaultLayoutParts/Base_TextBubble/text_bubble_base.gd index 39c0032e1..e7c49e488 100644 --- a/addons/dialogic/Modules/DefaultLayoutParts/Base_TextBubble/text_bubble_base.gd +++ b/addons/dialogic/Modules/DefaultLayoutParts/Base_TextBubble/text_bubble_base.gd @@ -10,7 +10,7 @@ var registered_characters: Dictionary = {} @export_range(1, 25, 1) var bubble_count : int = 2 -func _ready(): +func _ready() -> void: if Engine.is_editor_hint(): return diff --git a/addons/dialogic/Modules/DefaultLayoutParts/Layer_Textbubble/text_bubble.gd b/addons/dialogic/Modules/DefaultLayoutParts/Layer_Textbubble/text_bubble.gd index 1c3653c2d..ce69740cb 100644 --- a/addons/dialogic/Modules/DefaultLayoutParts/Layer_Textbubble/text_bubble.gd +++ b/addons/dialogic/Modules/DefaultLayoutParts/Layer_Textbubble/text_bubble.gd @@ -105,7 +105,7 @@ func close() -> void: set_process(false) -func _on_dialog_text_started_revealing_text(): +func _on_dialog_text_started_revealing_text() -> void: _resize_bubble(get_base_content_size(), true) diff --git a/addons/dialogic/Modules/End/event_end.gd b/addons/dialogic/Modules/End/event_end.gd index 0e6738365..b853119a7 100644 --- a/addons/dialogic/Modules/End/event_end.gd +++ b/addons/dialogic/Modules/End/event_end.gd @@ -38,7 +38,7 @@ func get_shortcode() -> String: #region EDITOR REPRESENTATION ################################################################################ -func build_event_editor(): +func build_event_editor() -> void: add_header_label('End Timeline') #endregion diff --git a/addons/dialogic/Modules/Glossary/event_glossary.gd b/addons/dialogic/Modules/Glossary/event_glossary.gd index a9881e5df..d8fce3ac2 100644 --- a/addons/dialogic/Modules/Glossary/event_glossary.gd +++ b/addons/dialogic/Modules/Glossary/event_glossary.gd @@ -38,5 +38,5 @@ func get_shortcode_parameters() -> Dictionary: ## EDITOR REPRESENTATION ################################################################################ -func build_event_editor(): +func build_event_editor() -> void: pass diff --git a/addons/dialogic/Modules/History/event_history.gd b/addons/dialogic/Modules/History/event_history.gd index 0b0297d7c..180d7f095 100644 --- a/addons/dialogic/Modules/History/event_history.gd +++ b/addons/dialogic/Modules/History/event_history.gd @@ -57,7 +57,7 @@ func get_shortcode_parameters() -> Dictionary: ## EDITOR REPRESENTATION ################################################################################ -func build_event_editor(): +func build_event_editor() -> void: add_header_edit('action', ValueType.FIXED_OPTIONS, { 'options': [ { diff --git a/addons/dialogic/Modules/Jump/event_jump.gd b/addons/dialogic/Modules/Jump/event_jump.gd index 1760147b0..f38781366 100644 --- a/addons/dialogic/Modules/Jump/event_jump.gd +++ b/addons/dialogic/Modules/Jump/event_jump.gd @@ -100,7 +100,7 @@ func get_shortcode_parameters() -> Dictionary: ## EDITOR REPRESENTATION ################################################################################ -func build_event_editor(): +func build_event_editor() -> void: add_header_edit('timeline_identifier', ValueType.DYNAMIC_OPTIONS, {'left_text':'Jump to', 'file_extension': '.dtl', 'mode' : 2, diff --git a/addons/dialogic/Modules/Jump/event_label.gd b/addons/dialogic/Modules/Jump/event_label.gd index 43b8c7a0b..ed76ce67b 100644 --- a/addons/dialogic/Modules/Jump/event_label.gd +++ b/addons/dialogic/Modules/Jump/event_label.gd @@ -93,7 +93,7 @@ func _get_property_original_translation(property_name:String) -> String: ## EDITOR REPRESENTATION ################################################################################ -func build_event_editor(): +func build_event_editor() -> void: add_header_edit('name', ValueType.SINGLELINE_TEXT, {'left_text':'Label', 'autofocus':true}) add_body_edit('display_name', ValueType.SINGLELINE_TEXT, {'left_text':'Display Name:'}) diff --git a/addons/dialogic/Modules/Jump/event_return.gd b/addons/dialogic/Modules/Jump/event_return.gd index 8071b2e04..4ef2ac960 100644 --- a/addons/dialogic/Modules/Jump/event_return.gd +++ b/addons/dialogic/Modules/Jump/event_return.gd @@ -53,7 +53,7 @@ func is_valid_event(string:String) -> bool: ## EDITOR REPRESENTATION ################################################################################ -func build_event_editor(): +func build_event_editor() -> void: add_header_label('Return') diff --git a/addons/dialogic/Modules/Save/event_save.gd b/addons/dialogic/Modules/Save/event_save.gd index 517fdc23e..804c4e0ff 100644 --- a/addons/dialogic/Modules/Save/event_save.gd +++ b/addons/dialogic/Modules/Save/event_save.gd @@ -61,5 +61,5 @@ func get_shortcode_parameters() -> Dictionary: ## EDITOR REPRESENTATION ################################################################################ -func build_event_editor(): +func build_event_editor() -> void: add_header_edit('slot_name', ValueType.SINGLELINE_TEXT, {'left_text':'Save to slot'}) diff --git a/addons/dialogic/Modules/Save/settings_save.gd b/addons/dialogic/Modules/Save/settings_save.gd index 9e07ba7f4..1c07f2513 100644 --- a/addons/dialogic/Modules/Save/settings_save.gd +++ b/addons/dialogic/Modules/Save/settings_save.gd @@ -8,7 +8,7 @@ func _get_priority() -> int: return 0 -func _refresh(): +func _refresh() -> void: %Autosave.button_pressed = ProjectSettings.get_setting('dialogic/save/autosave', false) %AutosaveMode.select(ProjectSettings.get_setting('dialogic/save/autosave_mode', 0)) %AutosaveDelay.value = ProjectSettings.get_setting('dialogic/save/autosave_delay', 60) diff --git a/addons/dialogic/Modules/Settings/event_setting.gd b/addons/dialogic/Modules/Settings/event_setting.gd index 1e711a7f9..fdde8d9a5 100644 --- a/addons/dialogic/Modules/Settings/event_setting.gd +++ b/addons/dialogic/Modules/Settings/event_setting.gd @@ -145,7 +145,7 @@ func is_valid_event(string:String) -> bool: ## EDITOR REPRESENTATION ################################################################################ -func build_event_editor(): +func build_event_editor() -> void: add_header_edit('mode', ValueType.FIXED_OPTIONS, { 'options': [{ 'label': 'Set', diff --git a/addons/dialogic/Modules/Signal/event_signal.gd b/addons/dialogic/Modules/Signal/event_signal.gd index a1afea8ba..2923f5890 100644 --- a/addons/dialogic/Modules/Signal/event_signal.gd +++ b/addons/dialogic/Modules/Signal/event_signal.gd @@ -65,7 +65,7 @@ func get_shortcode_parameters() -> Dictionary: ## EDITOR REPRESENTATION ################################################################################ -func build_event_editor(): +func build_event_editor() -> void: add_header_label("Emit dialogic signal with argument") add_header_label("(Dictionary in body)", 'argument_type == ArgumentTypes.DICTIONARY') add_header_edit('argument', ValueType.SINGLELINE_TEXT, {}, 'argument_type == ArgumentTypes.STRING') diff --git a/addons/dialogic/Modules/Style/event_style.gd b/addons/dialogic/Modules/Style/event_style.gd index adeae02ae..035603f6d 100644 --- a/addons/dialogic/Modules/Style/event_style.gd +++ b/addons/dialogic/Modules/Style/event_style.gd @@ -51,7 +51,7 @@ func get_shortcode_parameters() -> Dictionary: ## EDITOR REPRESENTATION ################################################################################ -func build_event_editor(): +func build_event_editor() -> void: add_header_edit('style_name', ValueType.DYNAMIC_OPTIONS, { 'left_text' :'Use style', 'placeholder' : 'Default', diff --git a/addons/dialogic/Modules/Style/node_style.gd b/addons/dialogic/Modules/Style/node_style.gd index 39ec38357..d53ffff0e 100644 --- a/addons/dialogic/Modules/Style/node_style.gd +++ b/addons/dialogic/Modules/Style/node_style.gd @@ -7,7 +7,7 @@ extends Control @export var layer_name: String = 'Default' -func _ready(): +func _ready() -> void: if layer_name.is_empty(): layer_name = name add_to_group('dialogic_style_layer') diff --git a/addons/dialogic/Modules/StyleEditor/Components/StyleItem.gd b/addons/dialogic/Modules/StyleEditor/Components/StyleItem.gd index 6468753c9..72684fc3b 100644 --- a/addons/dialogic/Modules/StyleEditor/Components/StyleItem.gd +++ b/addons/dialogic/Modules/StyleEditor/Components/StyleItem.gd @@ -54,11 +54,11 @@ func set_current(current:bool): %CurrentIcon.visible = current -func _on_mouse_entered(): +func _on_mouse_entered() -> void: %HoverBG.show() -func _on_mouse_exited(): +func _on_mouse_exited() -> void: %HoverBG.hide() @@ -72,10 +72,10 @@ func _on_gui_input(event): middle_clicked.emit() -func _on_focus_entered(): +func _on_focus_entered() -> void: $FocusFG.show() focused.emit() -func _on_focus_exited(): +func _on_focus_exited() -> void: $FocusFG.hide() diff --git a/addons/dialogic/Modules/StyleEditor/style_editor.gd b/addons/dialogic/Modules/StyleEditor/style_editor.gd index 4e6445c0e..698293be9 100644 --- a/addons/dialogic/Modules/StyleEditor/style_editor.gd +++ b/addons/dialogic/Modules/StyleEditor/style_editor.gd @@ -264,7 +264,7 @@ func add_style_undoable(file_path:String, style:DialogicStyle, inherits:Dialogic DialogicUtil.set_editor_setting('latest_layout_style', style.name) -func _on_duplicate_button_pressed(): +func _on_duplicate_button_pressed() -> void: if !%StyleList.is_anything_selected(): return find_parent('EditorView').godot_file_dialog( @@ -274,7 +274,7 @@ func _on_duplicate_button_pressed(): "Select folder for new style") -func _on_remove_button_pressed(): +func _on_remove_button_pressed() -> void: if !%StyleList.is_anything_selected(): return @@ -286,7 +286,7 @@ func _on_remove_button_pressed(): load_style_list() -func _on_edit_name_button_pressed(): +func _on_edit_name_button_pressed() -> void: %LayoutStyleName.grab_focus() %LayoutStyleName.select_all() @@ -295,7 +295,7 @@ func _on_layout_style_name_text_submitted(new_text:String) -> void: _on_layout_style_name_focus_exited() -func _on_layout_style_name_focus_exited(): +func _on_layout_style_name_focus_exited() -> void: var new_name :String= %LayoutStyleName.text.strip_edges() if new_name == current_style.name: return @@ -310,14 +310,14 @@ func _on_layout_style_name_focus_exited(): load_style_list() -func _on_make_default_button_pressed(): +func _on_make_default_button_pressed() -> void: default_style = current_style.resource_path save_style_list() load_style_list() -func _on_test_style_button_pressed(): +func _on_test_style_button_pressed() -> void: var dialogic_plugin := DialogicUtil.get_dialogic_plugin() # Save the current opened timeline diff --git a/addons/dialogic/Modules/StyleEditor/style_layer_editor.gd b/addons/dialogic/Modules/StyleEditor/style_layer_editor.gd index 12174474b..3f15caab2 100644 --- a/addons/dialogic/Modules/StyleEditor/style_layer_editor.gd +++ b/addons/dialogic/Modules/StyleEditor/style_layer_editor.gd @@ -136,7 +136,7 @@ func add_layer(scene_path:="", overrides:= {}): %LayerTree.get_root().get_child(-1).select(0) -func delete_layer(): +func delete_layer() -> void: if current_layer_idx == -1: return current_style.delete_layer(current_layer_idx) diff --git a/addons/dialogic/Modules/Text/event_text.gd b/addons/dialogic/Modules/Text/event_text.gd index db3627b11..d4925fb7b 100644 --- a/addons/dialogic/Modules/Text/event_text.gd +++ b/addons/dialogic/Modules/Text/event_text.gd @@ -359,7 +359,7 @@ func _enter_visual_editor(editor:DialogicEditor): editor.opened.connect(func(): ui_update_needed.emit()) -func build_event_editor(): +func build_event_editor() -> void: add_header_edit('character_identifier', ValueType.DYNAMIC_OPTIONS, {'file_extension' : '.dch', 'mode' : 2, @@ -464,7 +464,7 @@ func suggest_bbcode(text:CodeEdit): var text_effects := "" var text_effects_regex := RegEx.new() -func load_text_effects(): +func load_text_effects() -> void: if text_effects.is_empty(): for idx in DialogicUtil.get_indexers(): for effect in idx._get_text_effects(): diff --git a/addons/dialogic/Modules/Text/node_input.gd b/addons/dialogic/Modules/Text/node_input.gd index 3650431a1..a509e602b 100644 --- a/addons/dialogic/Modules/Text/node_input.gd +++ b/addons/dialogic/Modules/Text/node_input.gd @@ -5,7 +5,7 @@ extends Control ## specific region and avoiding conflicts with other UI elements. ## If no Input node is used, the input subsystem will handle mouse input instead. -func _ready(): +func _ready() -> void: add_to_group('dialogic_input') gui_input.connect(_on_gui_input) diff --git a/addons/dialogic/Modules/Text/node_name_label.gd b/addons/dialogic/Modules/Text/node_name_label.gd index 171e6208e..fbb95a239 100644 --- a/addons/dialogic/Modules/Text/node_name_label.gd +++ b/addons/dialogic/Modules/Text/node_name_label.gd @@ -7,7 +7,7 @@ class_name DialogicNode_NameLabel @export var name_label_root :Node = self @export var use_character_color := true -func _ready(): +func _ready() -> void: add_to_group('dialogic_name_label') if hide_when_empty: name_label_root.visible = false diff --git a/addons/dialogic/Modules/Text/node_next_indicator.gd b/addons/dialogic/Modules/Text/node_next_indicator.gd index 96b23f9a1..710704e5b 100644 --- a/addons/dialogic/Modules/Text/node_next_indicator.gd +++ b/addons/dialogic/Modules/Text/node_next_indicator.gd @@ -35,7 +35,7 @@ var texture_rect : TextureRect var tween: Tween -func _ready(): +func _ready() -> void: add_to_group('dialogic_next_indicator') # Creating TextureRect if missing @@ -55,7 +55,7 @@ func _ready(): visibility_changed.connect(_on_visibility_changed) -func _on_visibility_changed(): +func _on_visibility_changed() -> void: if visible: play_animation(animation, 1.0) diff --git a/addons/dialogic/Modules/Text/node_type_sound.gd b/addons/dialogic/Modules/Text/node_type_sound.gd index 17ab4bc1c..68f063f3a 100644 --- a/addons/dialogic/Modules/Text/node_type_sound.gd +++ b/addons/dialogic/Modules/Text/node_type_sound.gd @@ -30,7 +30,7 @@ var RNG := RandomNumberGenerator.new() var current_overwrite_data := {} -func _ready(): +func _ready() -> void: # add to necessary group add_to_group('dialogic_type_sounds') @@ -129,7 +129,7 @@ static func load_sounds_from_path(path:String) -> Array[AudioStream]: ############# USER INTERFACE ################################################### -func _get_configuration_warnings(): +func _get_configuration_warnings() -> PackedStringArray: if not get_parent() is DialogicNode_DialogText: return ["This should be the child of a DialogText node!"] return [] diff --git a/addons/dialogic/Modules/Text/subsystem_text.gd b/addons/dialogic/Modules/Text/subsystem_text.gd index 198a1de19..af15990fa 100644 --- a/addons/dialogic/Modules/Text/subsystem_text.gd +++ b/addons/dialogic/Modules/Text/subsystem_text.gd @@ -73,7 +73,7 @@ func load_game_state(load_flag:=LoadFlags.FULL_LOAD) -> void: update_name_label(character) -func post_install(): +func post_install() -> void: dialogic.Settings.connect_to_change('text_speed', _update_user_speed) collect_character_names() @@ -391,7 +391,7 @@ func parse_text_modifiers(text:String, type:int=TextTypes.DIALOG_TEXT) -> String #region HELPERS & OTHER STUFF #################################################################################################### -func _ready(): +func _ready() -> void: dialogic.event_handled.connect(hide_next_indicators) _autopauses = {} diff --git a/addons/dialogic/Modules/TextInput/node_text_input.gd b/addons/dialogic/Modules/TextInput/node_text_input.gd index d2e37e4ce..5dc80375b 100644 --- a/addons/dialogic/Modules/TextInput/node_text_input.gd +++ b/addons/dialogic/Modules/TextInput/node_text_input.gd @@ -15,7 +15,7 @@ extends Control var _allow_empty : bool = false -func _ready(): +func _ready() -> void: add_to_group('dialogic_text_input') if confirmation_button: get_node(confirmation_button).pressed.connect(_on_confirmation_button_pressed) diff --git a/addons/dialogic/Modules/Variable/event_variable.gd b/addons/dialogic/Modules/Variable/event_variable.gd index 3bdbc3d7e..201371665 100644 --- a/addons/dialogic/Modules/Variable/event_variable.gd +++ b/addons/dialogic/Modules/Variable/event_variable.gd @@ -228,7 +228,7 @@ func is_valid_event(string:String) -> bool: ## EDITOR REPRESENTATION ################################################################################ -func build_event_editor(): +func build_event_editor() -> void: add_header_edit('name', ValueType.DYNAMIC_OPTIONS, { 'left_text' : 'Set', 'suggestions_func' : get_var_suggestions, @@ -318,7 +318,7 @@ func get_value_suggestions(filter:String) -> Dictionary: return suggestions -func _on_variable_editor_pressed(): +func _on_variable_editor_pressed() -> void: var editor_manager := _editor_node.find_parent('EditorsManager') if editor_manager: editor_manager.open_editor(editor_manager.editors['VariablesEditor']['node'], true) diff --git a/addons/dialogic/Modules/Variable/variables_editor/variables_editor.gd b/addons/dialogic/Modules/Variable/variables_editor/variables_editor.gd index ad3bf91ff..38941a46b 100644 --- a/addons/dialogic/Modules/Variable/variables_editor/variables_editor.gd +++ b/addons/dialogic/Modules/Variable/variables_editor/variables_editor.gd @@ -23,12 +23,12 @@ func _open(argument:Variant = null): %Tree.load_info(ProjectSettings.get_setting('dialogic/variables', {})) -func _save(): +func _save() -> void: ProjectSettings.set_setting('dialogic/variables', %Tree.get_info()) ProjectSettings.save() -func _close(): +func _close() -> void: _save() @@ -47,7 +47,7 @@ func variable_renamed(old_name:String, new_name:String): %ReferenceInfo.show() -func _on_reference_manager_pressed(): +func _on_reference_manager_pressed() -> void: editors_manager.reference_manager.open() %ReferenceInfo.hide() diff --git a/addons/dialogic/Modules/Voice/event_voice.gd b/addons/dialogic/Modules/Voice/event_voice.gd index 98abc8b3c..e16c60670 100644 --- a/addons/dialogic/Modules/Voice/event_voice.gd +++ b/addons/dialogic/Modules/Voice/event_voice.gd @@ -66,7 +66,7 @@ func get_shortcode_parameters() -> Dictionary: ## EDITOR REPRESENTATION ################################################################################ -func build_event_editor(): +func build_event_editor() -> void: add_header_edit('file_path', ValueType.FILE, { 'left_text' : 'Set', 'right_text' : 'as the next voice audio', diff --git a/addons/dialogic/Modules/Wait/event_wait.gd b/addons/dialogic/Modules/Wait/event_wait.gd index acfe4299c..b37cc3cd5 100644 --- a/addons/dialogic/Modules/Wait/event_wait.gd +++ b/addons/dialogic/Modules/Wait/event_wait.gd @@ -65,7 +65,7 @@ func get_shortcode_parameters() -> Dictionary: ## EDITOR REPRESENTATION ################################################################################ -func build_event_editor(): +func build_event_editor() -> void: add_header_edit('time', ValueType.NUMBER, {'left_text':'Wait', 'autofocus':true, 'min':0}) add_header_label('seconds', 'time != 1') add_header_label('second', 'time == 1') diff --git a/addons/dialogic/Modules/WaitInput/event_wait_input.gd b/addons/dialogic/Modules/WaitInput/event_wait_input.gd index e1f13b5e8..07515d029 100644 --- a/addons/dialogic/Modules/WaitInput/event_wait_input.gd +++ b/addons/dialogic/Modules/WaitInput/event_wait_input.gd @@ -43,6 +43,6 @@ func get_shortcode_parameters() -> Dictionary: } -func build_event_editor(): +func build_event_editor() -> void: add_header_label('Wait for input') add_body_edit('hide_textbox', ValueType.BOOL, {'left_text':'Hide text box:'}) diff --git a/addons/dialogic/Resources/event.gd b/addons/dialogic/Resources/event.gd index fa1046a86..74949e04f 100644 --- a/addons/dialogic/Resources/event.gd +++ b/addons/dialogic/Resources/event.gd @@ -226,7 +226,7 @@ func _load_from_string(string:String) -> void: ## Assigns the custom defaults -func _load_custom_defaults(): +func _load_custom_defaults() -> void: for default_prop in DialogicUtil.get_custom_event_defaults(event_name): if default_prop in self: set(default_prop, DialogicUtil.get_custom_event_defaults(event_name)[default_prop]) diff --git a/addons/dialogic/plugin.gd b/addons/dialogic/plugin.gd index 7604d7094..0926fcda7 100644 --- a/addons/dialogic/plugin.gd +++ b/addons/dialogic/plugin.gd @@ -20,12 +20,12 @@ func _init() -> void: ################################################################################ ## Activation & Editor Setup -func _enable_plugin(): +func _enable_plugin() -> void: add_autoload_singleton(PLUGIN_NAME, PLUGIN_HANDLER_PATH) add_dialogic_default_action() -func _disable_plugin(): +func _disable_plugin() -> void: remove_autoload_singleton(PLUGIN_NAME) @@ -63,7 +63,7 @@ func _get_plugin_name() -> String: return PLUGIN_NAME -func _get_plugin_icon(): +func _get_plugin_icon() -> Texture2D: return load(PLUGIN_ICON_PATH) #endregion