* Fix: disable ESCGame inputs until signal room_ready is emitted
* fix: add a new function to use in _input() to check for inputs
* Apply suggestions from code review
Co-authored-by: balloonpopper <5151242+balloonpopper@users.noreply.github.com>
Co-authored-by: Duncan Brown <duncan@prometheussoftware.ca>
This commit starts by introducing a new action, `ESC_UI_PRIMARY_ACTION`,
that is used to represent a "primary action" from an input device, such
as a left-click on a mouse or the press of the primary button on a
gamepad. Although this action is not added to `InputMap` by default in
`escoria-core`, `_unhandled_input()` in `esc_item.gd` is updated to look
for it.
The other portion of this commit is an update to
`addons/escoria-ui-simplemouse/game.gd` that adds a gamepad mapping to
the `InputMap` for both `ESC_UI_PRIMARY_ACTION` as well as another new
action `ESC_UI_CHANGE_VERB_ACTION`. These actions are mapped to X and Y
on an XBox controller, respectively.
Note that `game.gd` is also updated to implement `_process()` such that
moving `JOY_AXIS_0` and `JOY_AXIS_1` on "gamepad 0" will move the
cursor around on the screen as the mouse would.
Overall, this makes the game fairly playable with a gamepad, though
admittedly a mouse is still currently required to click the "New game"
button on the initial menu because `BaseButton::gui_input()` appears to
be hardcoded to check for mouse events exclusively:
godotengine/godot@a09814e/scene/gui/base_button.cpp#L55-L81
Fixesgodot-escoria/escoria-issues#48
Fix: tween was stopped_all before starting
Fix: reload locale from settings in ESCGame
Since main menu and pause menu are now loaded from ESCGame and not from escoria.gd, this must be done here.
Fix: small crash in load game
But save and load are broken at the moment...
Fix: check save and load after main menu changes
Required fixes
Fix: manage the game scene better in show and hide_menu
Enh: transition back in to the previous room if there was one
Fix a bug occurring where change_scene awaits forever for setup to end
Reworked change_scene and esc_room implementation to avoid yielding
Added a controller variable to allow new event run in events_manager
Don't empty the events queue if the running_event was interrupted
Fixed transitions and automatic transitions in change_scene
Added trace log level (for esc_compiler in particular)
Fixed various bugs in ESC scripts
Fix a bug where exit_scene happened multiple times where fast walking
Needed to clear the event queue
Fixes ready event was run because BYPASS_LAST_SCENE wrongly set
Inverted parameter "disable_automatic_transitions"
for change_scene, hide_menu, show_menu commands
Fix broken sched_event
Fixes as requested in PR
Events interruption should now work at all time (added interruption in room_selector scene)
Fixed missing test in game.gd for when the player is not set
Fixed some ESC scripts (worker filled sheet event is now blocking, room13 left door waits simple click, not use verb)
Fixes#300
Fix crash on loading game when the saved position was a float while teleport_pos command needs integers.
Fix pause menu missing in simplemouse-ui, causing a crash when calling pause menu.
Co-authored-by: StraToN <StraToN@users.noreply.github.com>