From 44425a3f9201b10dfb67e4d141de46464af69252 Mon Sep 17 00:00:00 2001 From: StraToN Date: Wed, 11 May 2022 17:18:33 +0000 Subject: [PATCH] chore: storing version and changelog --- CHANGELOG.md | 21 +++++++++++++++++++ .../core-scripts/esc/esc_action_manager.gd | 4 ++-- .../core-scripts/esc/esc_event_manager.gd | 12 +++++------ .../game/core-scripts/esc/esc_room_manager.gd | 8 +++---- .../types/esc_command_argument_descriptor.gd | 2 +- 5 files changed, 34 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49652ca2..27a5e99e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,24 @@ +## [4.0.0-alpha.182](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.182) (2022-05-11) + + +### Features + +* changed approach for disabling input during scene transitions; this should be cleaner and also delays re-enabling of input until after transition in is finished (if there is one) ([954e014](https://github.com/godot-escoria/escoria-demo-game/commit/954e014cbf5eb09e8239cb77cf959da29b6ea2ff)) +* disallows user input during scene changes ([c9c7cd2](https://github.com/godot-escoria/escoria-demo-game/commit/c9c7cd2dfa426e4d6fa12c0d92075c2b5b217d77)) + + +### Bug Fixes + +* avoids being able to pause during transitions; also moves pausing request responsibility to UI; also fixes issue w/ trying to pause during intro and main menu ([aeffe09](https://github.com/godot-escoria/escoria-demo-game/commit/aeffe09e3429ecb6e28ac637397a6eb5e568a133)) +* avoids crashes in case of input when room is run directly and interrupted; may look at updating room manager in the future ([ff17854](https://github.com/godot-escoria/escoria-demo-game/commit/ff178541fca9ecc1694af5b6e675c600452c8ceb)) +* checks to make sure target_object after a walk to an object is the proper one in case action manager is already yielding and expecting a particular one; change to proper interrupt method name; clears out pending events ([9e247a9](https://github.com/godot-escoria/escoria-demo-game/commit/9e247a9218b2b08654ef92e060b591ff3759dcb6)) +* iterating on method outlined in ticket; blocks events/commands from being queued during scene changes, which should prevent stray/untimely events from being queued for an old room when in a new room ([acfb3d9](https://github.com/godot-escoria/escoria-demo-game/commit/acfb3d9ddd8cb47c13d2d221dfb5bc3689583215)) +* necessary guard in case 'run' hasn't been executed yet ([8594779](https://github.com/godot-escoria/escoria-demo-game/commit/85947794b92fc4ee4652e279ff2434cca1912e66)) +* repeating fix from another branch; these will be merged anyway ([64ac765](https://github.com/godot-escoria/escoria-demo-game/commit/64ac7654f4fd81648c257f23bccdd1e8c22027ed)) +* room breaks since it wasn't positioned correctly ([77ba581](https://github.com/godot-escoria/escoria-demo-game/commit/77ba581398b311a38ea14af29b87acd4cc248236)) + + + ## [4.0.0-alpha.181](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.181) (2022-05-02) 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 9d7f3bcb..5e482390 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 @@ -526,7 +526,7 @@ func perform_inputevent_on_object( # In case of an interrupted walk, we don't want to proceed. if context == null: return - + destination_position = context.target_position dont_interact = context.dont_interact_on_arrival @@ -657,7 +657,7 @@ func _walk_towards_object( escoria.logger.debug("Original walk context target does not match " \ + "yielded walk context. Likely interrutped walk.") return - + escoria.logger.info("Context arrived: %s" % context) # Confirm that reached item was the one user clicked in the first place. diff --git a/addons/escoria-core/game/core-scripts/esc/esc_event_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_event_manager.gd index 75cd7608..03b2a66f 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_event_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_event_manager.gd @@ -211,7 +211,7 @@ func queue_event(event: ESCEvent, force: bool = false) -> void: "Changing scenes. Won't queue event '%s'." % event.name ) return - + # Don't queue the same event more than once in a row. var last_event = _get_last_event_queued(CHANNEL_FRONT) @@ -287,7 +287,7 @@ func queue_background_event(channel_name: String, event: ESCEvent) -> void: func interrupt(exceptions: PoolStringArray = []) -> void: for channel_name in _running_events.keys(): if _running_events[channel_name] != null and not _running_events[channel_name].name in exceptions: - escoria.logger.debug("Interrupting running event %s in channel %s..." + escoria.logger.debug("Interrupting running event %s in channel %s..." % [_running_events[channel_name].name, channel_name]) _running_events[channel_name].interrupt() _channels_state[channel_name] = true @@ -297,11 +297,11 @@ func interrupt(exceptions: PoolStringArray = []) -> void: for event in events_queue[channel_name]: if event.name in exceptions: continue - - escoria.logger.debug("Interrupting queued event %s in channel %s..." + + escoria.logger.debug("Interrupting queued event %s in channel %s..." % [event.name, channel_name]) event.interrupt() - + events_queue[channel_name].clear() @@ -337,7 +337,7 @@ func set_changing_scene(p_is_changing_scene: bool) -> void: escoria.logger.trace("Setting _changing_scene to %s." % p_is_changing_scene) _changing_scene = p_is_changing_scene - + # If we're changing scenes, interrupt any (other) running events and purge # all event queues. if _changing_scene: diff --git a/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd index fde5d2e3..0e4f6017 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd @@ -328,7 +328,7 @@ func _perform_script_events(room: ESCRoom) -> void: # Hide main and pause menus escoria.game_scene.hide_main_menu() escoria.game_scene.unpause_game() - + # Maybe this is ok to put in set_scene_finish() above? But it might be a bit # confusing to not see the matching camera.current updates. new_player_camera.make_current() @@ -347,7 +347,7 @@ func _perform_script_events(room: ESCRoom) -> void: escoria.inputs_manager.hotspot_focused = "" var command_strings: PoolStringArray = [] - + command_strings.append("%s%s" % [ESCEvent.PREFIX, escoria.event_manager.EVENT_TRANSITION_IN]) if room.enabled_automatic_transitions \ @@ -365,9 +365,9 @@ func _perform_script_events(room: ESCRoom) -> void: ) ] ) - - command_strings.append("%s 0.1" % _wait.get_command_name()) + command_strings.append("%s 0.1" % _wait.get_command_name()) + command_strings.append("%s ALL" % _accept_input.get_command_name()) var script_transition_in = escoria.esc_compiler.compile(command_strings, get_class()) diff --git a/addons/escoria-core/game/core-scripts/esc/types/esc_command_argument_descriptor.gd b/addons/escoria-core/game/core-scripts/esc/types/esc_command_argument_descriptor.gd index 8d9b09d8..f10b071f 100644 --- a/addons/escoria-core/game/core-scripts/esc/types/esc_command_argument_descriptor.gd +++ b/addons/escoria-core/game/core-scripts/esc/types/esc_command_argument_descriptor.gd @@ -120,7 +120,7 @@ func validate(command: String, arguments: Array) -> bool: if arguments[index] == null: # No type checking for null values continue - + if has_varargs and index == arguments.size() - 1: # If we have varargs at the end, do not validate them. continue