Commit Graph

43 Commits

Author SHA1 Message Date
Julian Murgia
8a58aa7efc Fix: disable ESCGame inputs until signal room_ready is emitted (#582)
* 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>
2022-04-30 20:10:14 +02:00
Duncan Brown
f69b29da29 fix: eliminates intermittent flicker with UI; NO_UI shouldn't be allowed for :setup events 2022-04-30 20:06:13 +02:00
Balloonpopper
584b81a496 fix: Corrected wether to whether 2022-04-21 09:55:00 +02:00
StraToN
7a46908569 chore: storing version and changelog 2022-04-09 14:13:32 +00:00
StraToN
fda97352a0 chore: storing version and changelog 2022-04-08 19:20:45 +00:00
StraToN
431efd853a chore: storing version and changelog 2022-04-08 19:19:23 +00:00
Duncan Brown
6d98e7bdce fix: should now also prevent areas from spawning events; also removes a superfluous variable 2022-04-08 21:18:57 +02:00
Duncan Brown
82acf8374d feat: adds instant transitions with an object manager rework, along with
something missed from PR #487
2022-04-08 21:18:57 +02:00
bolinfest
d0d97ba9bf feat: add gamepad support to escoria-ui-simplemouse (#518)
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
2022-03-14 22:15:01 +01:00
Michael Bolin
7bf3e9f276 refactor: remove trailing whitespace from all .gd files
Not sure why these files were not included in
https://github.com/godot-escoria/escoria-demo-game/pull/494.

Created this diff by running the following on Linux:

```
find -name \*.gd | xargs sed -i -e "s/[[:space:]]\+$//g"
```
2022-03-07 22:01:59 +01:00
StraToN
58476828c6 chore: storing version and changelog 2022-03-07 16:28:18 +00:00
StraToN
19272ffeb2 chore: storing version and changelog 2022-03-07 08:44:59 +00:00
Michael Bolin
045cf9a05e Remove non-existent escoria.action_to_string() function.
Apparently this was accidentally introduced in
99dc1e0110. This commit
removes it and consolidates one clause into the existing
conditional check.
2022-02-19 09:08:24 -08:00
Duncan Brown
99dc1e0110 feat: refactor numerous areas and tokenize string literals where possible; also fixes some small bugs (#487)
Co-authored-by: Duncan Brown <duncan@bhs-consultants.com>
2022-02-04 17:10:40 +01:00
Julian Murgia
353b349d1b Set a default implementation for ESCGame._on_event_done() (#486) 2022-02-04 16:27:21 +01:00
Julian Murgia
2179b803e0 Implement custom data save in settings and savegames (#484) 2022-01-13 11:09:06 +01:00
Julian Murgia
b4d5e380e6 Fix: makes dialog players pausable by removing yields (#472) 2021-12-01 09:39:24 +01:00
Julian Murgia
b031d69cd9 Save and load game fixes (and some other small fixes) (#466) 2021-11-29 14:21:29 +01:00
Dennis Ploeger
47fe4df841 feat: Several fixes and optimizations (#467)
Co-authored-by: Dennis Ploeger <develop@dieploegers.de>
2021-11-27 20:10:16 +01:00
Julian Murgia
43f06e38c2 Adds default crash popup, if game.gd doesn't reimplement it (#449) 2021-11-18 21:41:27 +01:00
Julian Murgia
6393a7edd8 Adds a popup on crash, wait for it to close to quit the game (#447) 2021-11-18 20:52:54 +01:00
Dennis Ploeger
9068bb8e94 fix: Resets the current verb after the action has finished (#443)
Co-authored-by: Dennis Ploeger <develop@dieploegers.de>
2021-11-15 21:33:40 +01:00
Dennis Ploeger
b626973f11 fix: Fixed more input events (#442)
Co-authored-by: Dennis Ploeger <develop@dieploegers.de>
2021-11-15 10:34:56 +01:00
Julian Murgia
c86b802cbb Add show_menu and hide_menu ESC commands
Fixes godot-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
2021-11-11 22:20:58 +01:00
Dennis Ploeger
57ce7fbcae feat: Made dialogs pluggable (#424)
Co-authored-by: Dennis Ploeger <develop@dieploegers.de>
2021-10-27 08:34:13 +02:00
Dennis Ploeger
94d86d24d5 fix: Huge cleanup (#420)
Co-authored-by: Dennis Ploeger <develop@dieploegers.de>
2021-10-25 08:59:07 +02:00
Julian Murgia
b3cd9abe21 Fix a wrong validation check in camera_set_limits (#418)
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)
2021-10-22 09:17:03 +02:00
Dennis Ploeger
af26521d3d feat: Rewrote inventory handling basing on ESCItems (#417)
Co-authored-by: Dennis Ploeger <develop@dieploegers.de>
2021-10-21 21:56:25 +02:00
Julian Murgia
89da6924a3 Clean after change room: game scene is cleanly removed from prev room (#416) 2021-10-19 15:48:26 +02:00
Julian Murgia
4fd1d72993 Fix crashes in rooms 9 and 13 (#415) 2021-10-19 15:48:13 +02:00
Julian Murgia
00de7fcc4d Removed hardcoded "camera" name reference and manual tween node camera (#411)
Co-authored-by: StraToN <StraToN@users.noreply.github.com>
2021-10-07 08:22:27 +02:00
Julian Murgia
ae34094196 Enhancement: load game scene once to allow run scene directly (#406)
Co-authored-by: StraToN <StraToN@users.noreply.github.com>
2021-10-01 07:53:44 +02:00
Julian Murgia
527fe84d3c Changed dialog cursor (#398)
- some modifications in android exports presets
- commented out jump command in worker.esc as not implemented
2021-09-23 12:39:24 +02:00
Dennis Ploeger
60ea4d851b Issue 320 (#396) - Mobile fixes
Co-authored-by: Dennis Ploeger <develop@dieploegers.de>
Co-authored-by: dploeger <dploeger@users.noreply.github.com>
2021-09-23 08:32:08 +02:00
Julian Murgia
b4bf5b82d6 Event flags implementation (#382)
* Added event flags
* Added transition ESC command
* Also edited .gitignore to ignore .translation files
* docs: Automatic update of API docs

Co-authored-by: StraToN <StraToN@users.noreply.github.com>
2021-09-07 09:13:09 +02:00
Dennis Ploeger
c8958e7454 Issue 377 (#383)
* feat: Implements speech fixes #377

* docs: Automatic update of API docs

* chore: Updated speech translation.

Co-authored-by: Dennis Ploeger <develop@dieploegers.de>
Co-authored-by: dploeger <dploeger@users.noreply.github.com>
2021-09-06 08:52:16 +02:00
Dennis Ploeger
a639ad5f32 Issue 343 (#379)
Co-authored-by: Dennis Ploeger <develop@dieploegers.de>
Co-authored-by: dploeger <dploeger@users.noreply.github.com>
2021-08-28 22:29:04 +02:00
Julian Murgia
711cfe9888 Added a method to interrupt a running event in ESCEventManager. (#375)
Co-authored-by: StraToN <StraToN@users.noreply.github.com>
2021-08-27 08:16:12 +02:00
Julian Murgia
a00bbd4d4d Removed hardcoded access to node named "sprite" (#364) 2021-08-10 22:20:30 +02:00
Julian Murgia
cbb64df969 Removed hardcoded global_id "player" (#359)
* Removed hardcoded global_id "player"
Removed hardcoded node name "start_position"

* docs: Automatic update of API docs

Co-authored-by: StraToN <StraToN@users.noreply.github.com>
2021-08-08 12:10:46 +02:00
Julian Murgia
f2991c30c7 Added sound management in savegames and load games. (#337)
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>
2021-07-29 14:22:42 +02:00
Julian Murgia
2c8107964c Fix tooltip_node wrong references (#332)
* Created a signal room_ready in ESCMain to notify ESCTooltip that it is ready.
Fixes #302

* docs: Automatic update of API docs

Co-authored-by: StraToN <StraToN@users.noreply.github.com>
2021-07-29 07:53:44 +02:00
Julian Murgia
dc4cda82ab Moved UI scenes and resources to their own plugin. 2021-07-05 14:34:44 +02:00