Skip to content

Commit

Permalink
chore: storing version and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
StraToN committed Nov 21, 2022
1 parent a131efc commit 0377cab
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)


Expand Down
2 changes: 1 addition & 1 deletion addons/escoria-core/game/core-scripts/esc/commands/say.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions addons/escoria-core/game/core-scripts/esc_item.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")
Expand Down
20 changes: 10 additions & 10 deletions addons/escoria-core/game/esc_inputs_manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand All @@ -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(
Expand All @@ -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()
Expand All @@ -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(
Expand Down

0 comments on commit 0377cab

Please sign in to comment.