From 0377cabce94164f472cb705afa390dea57c5c2ce Mon Sep 17 00:00:00 2001 From: StraToN Date: Mon, 21 Nov 2022 19:40:32 +0000 Subject: [PATCH] chore: storing version and changelog --- CHANGELOG.md | 4 ++++ .../game/core-scripts/esc/commands/say.gd | 2 +- .../game/core-scripts/esc_item.gd | 4 ++-- .../escoria-core/game/esc_inputs_manager.gd | 20 +++++++++---------- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3429457..844b758b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [4.0.0-alpha.231](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.231) (2022-11-21) + + + ## [4.0.0-alpha.230](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.230) (2022-11-13) diff --git a/addons/escoria-core/game/core-scripts/esc/commands/say.gd b/addons/escoria-core/game/core-scripts/esc/commands/say.gd index 5e1407e9..f8fc2629 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/say.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/say.gd @@ -102,7 +102,7 @@ func run(command_params: Array) -> int: ) escoria.current_state = escoria.GAME_STATE.DEFAULT return ESCExecution.RC_ERROR - + if not escoria.main.current_scene.player: escoria.logger.warn( self, diff --git a/addons/escoria-core/game/core-scripts/esc_item.gd b/addons/escoria-core/game/core-scripts/esc_item.gd index eeab2378..84a097ad 100644 --- a/addons/escoria-core/game/core-scripts/esc_item.gd +++ b/addons/escoria-core/game/core-scripts/esc_item.gd @@ -316,7 +316,7 @@ class HoverStackSorter: # # - _viewport: the viewport node the event entered # - event: the input event -# - _shape_idx is the child index of the clicked Shape2D. +# - _shape_idx is the child index of the clicked Shape2D. func _on_input_event(_viewport: Object, event: InputEvent, _shape_idx: int): if event is InputEventMouseMotion: var physics2d_dss: Physics2DDirectSpaceState = get_world_2d().direct_space_state @@ -326,7 +326,7 @@ func _on_input_event(_viewport: Object, event: InputEvent, _shape_idx: int): if c.collider.get("global_id") \ and escoria.action_manager.is_object_actionable(c.collider.global_id): colliding_nodes.push_back(c.collider) - + if colliding_nodes.empty(): return colliding_nodes.sort_custom(HoverStackSorter, "sort_ascending_z_index") diff --git a/addons/escoria-core/game/esc_inputs_manager.gd b/addons/escoria-core/game/esc_inputs_manager.gd index 6b0116c6..150e8912 100644 --- a/addons/escoria-core/game/esc_inputs_manager.gd +++ b/addons/escoria-core/game/esc_inputs_manager.gd @@ -364,7 +364,7 @@ func _on_mouse_entered_item(item: ESCItem) -> void: hotspot_focused = hover_stack.back().global_id escoria.main.current_scene.game.element_focused(hotspot_focused) return - + if not escoria.action_manager.is_object_actionable(item.global_id): escoria.logger.debug( self, @@ -412,7 +412,7 @@ func _on_mouse_exited_item(item: ESCItem) -> void: escoria.main.current_scene.game.element_focused(hotspot_focused) -# Function called when the item is set interactive, to re-trigger an input on +# Function called when the item is set interactive, to re-trigger an input on # underlying item. # # #### Parameters @@ -443,10 +443,10 @@ func _on_mouse_left_clicked_item(item: ESCItem, event: InputEvent) -> void: if item as ESCPlayer and not (item as ESCPlayer).selectable: escoria.logger.trace( self, - "Ignoring left click on player %s: Player not selectable." + "Ignoring left click on player %s: Player not selectable." % [item.global_id] ) - + # Get next object in hover stack and forward event to it if not hover_stack.empty(): var next_item = hover_stack.pop_back() @@ -456,14 +456,14 @@ func _on_mouse_left_clicked_item(item: ESCItem, event: InputEvent) -> void: _on_left_click_on_bg(event.position) return - # Clicked object can't be actioned and there is no other object behind + # Clicked object can't be actioned and there is no other object behind # We consider this click as a background click if not escoria.action_manager.is_object_actionable(item.global_id) \ and hover_stack.empty(): hotspot_focused = "" _on_left_click_on_bg(event.position) return - + # Finally, execute the action on the ESCItem hotspot_focused = item.global_id escoria.main.current_scene.game.left_click_on_item( @@ -487,10 +487,10 @@ func _on_mouse_left_double_clicked_item( if item as ESCPlayer and not (item as ESCPlayer).selectable: escoria.logger.trace( self, - "Ignoring double left click on player %s: Player not selectable." + "Ignoring double left click on player %s: Player not selectable." % [item.global_id] ) - + # Get next object in hover stack and forward event to it if not hover_stack.empty(): var next_item = hover_stack.pop_back() @@ -500,14 +500,14 @@ func _on_mouse_left_double_clicked_item( _on_double_left_click_on_bg(event.position) return - # Clicked object can't be actioned and there is no other object behind + # Clicked object can't be actioned and there is no other object behind # We consider this click as a background click if not escoria.action_manager.is_object_actionable(item.global_id) \ and hover_stack.empty(): hotspot_focused = "" _on_double_left_click_on_bg(event.position) return - + # Finally, execute the action on the ESCItem hotspot_focused = item.global_id escoria.main.current_scene.game.left_double_click_on_item(