Skip to content

Commit

Permalink
Merge branch 'godot-escoria:develop' into rfc-gamepad-support
Browse files Browse the repository at this point in the history
  • Loading branch information
bolinfest authored Mar 8, 2022
2 parents 6454cb6 + 7aca986 commit 2a11e4a
Show file tree
Hide file tree
Showing 11 changed files with 329 additions and 101 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
## [4.0.0-alpha.123](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.123) (2022-03-08)


### Features

* New graphics for room 8 ([7a64c77](https://github.com/godot-escoria/escoria-demo-game/commit/7a64c7707fe8e5011d559fe2f71f458cde1a7d2e))



## [4.0.0-alpha.122](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.122) (2022-03-08)


### Features

* introduce escoria-ui-keyboard-9verbs to verify register_custom_input_handler() API ([5a77bd6](https://github.com/godot-escoria/escoria-demo-game/commit/5a77bd6fdc100461dc1eeb351299c0fc89d32b14))
* register_custom_input_handler() API ([14cf132](https://github.com/godot-escoria/escoria-demo-game/commit/14cf1327fe0b6e3c16c0df6628293b6197f66708))



## [4.0.0-alpha.121](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.121) (2022-03-07)


Expand Down
Binary file added game/rooms/room08/door.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 9 additions & 5 deletions game/rooms/room08/esc/button_puzzle.esc
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
:look
say player "That must be the command to open the door."
say player "That's the button to open the door."

:use
> [!r8_m_door_open]
#superpose_scene "res://game/rooms/room08/puzzle/10_buttons_puzzle.tscn"
# Load the puzzle
spawn puzzle "res://game/rooms/room08/puzzle/10_buttons_puzzle.tscn"

> [r8_m_door_open]
say player "The door is already open."

# Currently the button gets disabled when you beat the puzzle, so there's
# no button you can interract with. If you set it up so the button was
# still enabled, this code would provide feedback to the user if they
# attempted to "use" the already unlocked puzzle.
#> [r8_m_door_open]
# say player "The door is already open."
18 changes: 15 additions & 3 deletions game/rooms/room08/esc/button_reset_puzzle.esc
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
:look
say player "That must be the command to open the door."
say player "That's the button to relock the door."

:use
set_global r8_m_door_open false
set_state r8_m_door door_close
> [r8_m_door_open]
# If the door is unlocked, reset the puzzle.
# Set the door open to false so the room gets set up
# correctly if you exit and reenter
set_global r8_m_door_open false
# Play the door closing animation to "relock" the door
set_state r8_m_door door_close
# Reactivate the puzzle button so the player can redo
# the puzzle and unlock the door again
set_active r8_mini_puzzle_button true
stop
> [!r8_m_door_open]
# Don't reset the puzzle if the door is currently locked
say player "The puzzle doesn't need to be reset"
14 changes: 13 additions & 1 deletion game/rooms/room08/esc/middle_exit.esc
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
:look
say player "That's the door to room 9"

:exit_scene
change_scene "res://game/rooms/room09/room09.tscn"
> [r8_m_door_open]
# Only let the player into the next room if they've passed the puzzle
change_scene "res://game/rooms/room09/room09.tscn"

> [!r8_m_door_open]
# The door is always an exit, but trying to go through it won't change
# scenes if you haven't unlocked the puzzle.
say player "The door is locked"


15 changes: 15 additions & 0 deletions game/rooms/room08/esc/room08.esc
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
:setup

# This code will run only the first time you enter the room.
> [!room8_visited]
set_global room8_visited true
set_global r8_m_door_open false
# Activate locked puzzle button the first time you enter the room only.
# It will keep it's locked/unlocked state on future room entrances.
# It should already be active, this is a safety precaution.
set_active r8_mini_puzzle_button true

> [r8_m_door_open]
# If the door was previously opened, quickly play the open animation
# so you don't see a closed door when the room appears.
set_state r8_m_door door_open true
# Hide locked puzzle icon and make the button non-interactive as
# the puzzle was previously unlocked
set_active r8_mini_puzzle_button false


> [eq ESC_LAST_SCENE room7]
teleport player r8_l_exit
Expand Down
Binary file added game/rooms/room08/locked_button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions game/rooms/room08/puzzle/10_buttons_puzzle.gd
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func win():
escoria.main.current_scene.show()
escoria.globals_manager.set_global("r8_m_door_open", true)
escoria.object_manager.get_object("r8_m_door").set_state("door_open")
escoria.object_manager.get_object("r8_mini_puzzle_button").active = false


func _on_quit_pressed():
Expand Down
Loading

0 comments on commit 2a11e4a

Please sign in to comment.