From 37b0c6c0f166c280b4160b09fa25db4e4bed8ed1 Mon Sep 17 00:00:00 2001 From: Dennis Ploeger Date: Wed, 17 Nov 2021 22:27:57 +0100 Subject: [PATCH] Support fixes (#445) Co-authored-by: Dennis Ploeger --- .../game/core-scripts/esc/esc_action_manager.gd | 7 +++++-- addons/escoria-core/game/core-scripts/esc_room.gd | 6 ++++-- addons/escoria-ui-9verbs/game.gd | 6 ++++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/addons/escoria-core/game/core-scripts/esc/esc_action_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_action_manager.gd index 2ee8945f..e5be39c8 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_action_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_action_manager.gd @@ -92,6 +92,7 @@ func activate( if event_returned[0] == ESCExecution.RC_OK: escoria.action_manager\ .clear_current_action() + emit_signal("action_finished") return event_returned[0] elif combine_with.events.has(combine_with_event)\ and not combine_with.node.combine_is_one_way: @@ -137,8 +138,10 @@ func activate( escoria.logger.report_warnings( "ESCActionManager.activate: Invalid action on item", [ - "Trying to combine object %s with %s, "+ - "but %s is not in inventory." % [ + ( + "Trying to combine object %s with %s, "+ + "but %s is not in inventory." + ) % [ target.global_id, combine_with.global_id, combine_with.global_id diff --git a/addons/escoria-core/game/core-scripts/esc_room.gd b/addons/escoria-core/game/core-scripts/esc_room.gd index 6c0fce48..eb1f0b64 100644 --- a/addons/escoria-core/game/core-scripts/esc_room.gd +++ b/addons/escoria-core/game/core-scripts/esc_room.gd @@ -62,8 +62,10 @@ func _ready(): if camera_limits.empty(): camera_limits.push_back(Rect2()) if camera_limits.size() == 1 and camera_limits[0].has_no_area(): - camera_limits[0] = \ - Rect2(0, 0, $background.rect_size.x, $background.rect_size.y) + for child in get_children(): + if child is ESCBackground: + camera_limits[0] = \ + Rect2(0, 0, child.rect_size.x, child.rect_size.y) if Engine.is_editor_hint(): return diff --git a/addons/escoria-ui-9verbs/game.gd b/addons/escoria-ui-9verbs/game.gd index 7c1b3d90..f4c34daf 100644 --- a/addons/escoria-ui-9verbs/game.gd +++ b/addons/escoria-ui-9verbs/game.gd @@ -183,7 +183,8 @@ func mousewheel_action(_direction: int): func hide_ui(): $ui/Control.hide() verbs_menu.hide() - room_select.hide() + if ProjectSettings.get("escoria/debug/enable_room_selector") == true: + room_select.hide() inventory_ui.hide() tooltip.hide() @@ -191,7 +192,8 @@ func hide_ui(): func show_ui(): $ui/Control.show() verbs_menu.show() - room_select.show() + if ProjectSettings.get("escoria/debug/enable_room_selector") == true: + room_select.show() inventory_ui.show() tooltip.show()