From c0c391674d6bfc4797db1efa95f98e7190943a51 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Fri, 2 Aug 2024 00:42:14 +0300 Subject: [PATCH] [skip ci] Change instances of "yield" to "await" in comments --- src/Autoload/Tools.gd | 6 +++--- src/Tools/3DTools/3DShapeEdit.gd | 2 +- src/UI/Timeline/AnimationTimeline.gd | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Autoload/Tools.gd b/src/Autoload/Tools.gd index e47b8bd8a..94c10a7ef 100644 --- a/src/Autoload/Tools.gd +++ b/src/Autoload/Tools.gd @@ -351,7 +351,7 @@ func _ready() -> void: pixel_perfect = Global.config_cache.get_value("tools", "pixel_perfect", false) alpha_locked = Global.config_cache.get_value("tools", "alpha_locked", false) - # Yield is necessary for the color picker nodes to update their color values + # Await is necessary for the color picker nodes to update their color values await get_tree().process_frame var color_value: Color = Global.config_cache.get_value( _slots[MOUSE_BUTTON_LEFT].kname, "color", Color.BLACK @@ -365,7 +365,7 @@ func _ready() -> void: var layer: BaseLayer = Global.current_project.layers[Global.current_project.current_layer] var layer_type := layer.get_layer_type() - # Yield is necessary to hide irrelevant tools added by extensions + # Await is necessary to hide irrelevant tools added by extensions await get_tree().process_frame _show_relevant_tools(layer_type) @@ -380,7 +380,7 @@ func add_tool_button(t: Tool, insert_pos := -1) -> void: t.button_node = tool_button _tool_buttons.add_child(tool_button) if insert_pos > -1: - insert_pos = min(insert_pos, _tool_buttons.get_child_count() - 1) + insert_pos = mini(insert_pos, _tool_buttons.get_child_count() - 1) _tool_buttons.move_child(tool_button, insert_pos) tool_button.pressed.connect(_tool_buttons._on_Tool_pressed.bind(tool_button)) diff --git a/src/Tools/3DTools/3DShapeEdit.gd b/src/Tools/3DTools/3DShapeEdit.gd index bdde91bae..29d841614 100644 --- a/src/Tools/3DTools/3DShapeEdit.gd +++ b/src/Tools/3DTools/3DShapeEdit.gd @@ -233,7 +233,7 @@ func _cel_switched() -> void: _fill_object_option_button() sprite_changed_this_frame() - # two yields are required + # Two awaits are required await get_tree().process_frame await get_tree().process_frame _cel.selected = selected diff --git a/src/UI/Timeline/AnimationTimeline.gd b/src/UI/Timeline/AnimationTimeline.gd index 81a9cecca..fc943ed97 100644 --- a/src/UI/Timeline/AnimationTimeline.gd +++ b/src/UI/Timeline/AnimationTimeline.gd @@ -170,7 +170,7 @@ func _frame_scroll_changed(_value: float) -> void: func _on_LayerVBox_resized() -> void: frame_scroll_bar.offset_left = frame_scroll_container.position.x - # it doesn't update properly without yields (for the first time after pixelorama starts) + # It doesn't update properly without awaits (for the first time after Pixelorama starts) await get_tree().process_frame await get_tree().process_frame adjust_scroll_container() @@ -284,7 +284,7 @@ func add_frame() -> void: project.undo_redo.add_do_method(project.change_cel.bind(project.current_frame + 1)) project.undo_redo.add_undo_method(project.change_cel.bind(project.current_frame)) project.undo_redo.commit_action() - # it doesn't update properly without yields + # It doesn't update properly without awaits await get_tree().process_frame await get_tree().process_frame adjust_scroll_container() @@ -354,7 +354,7 @@ func delete_frames(indices: PackedInt32Array = []) -> void: project.undo_redo.add_do_method(Global.undo_or_redo.bind(false)) project.undo_redo.add_undo_method(Global.undo_or_redo.bind(true)) project.undo_redo.commit_action() - # it doesn't update properly without yields + # It doesn't update properly without awaits await get_tree().process_frame await get_tree().process_frame adjust_scroll_container()