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)
This commit is contained in:
Julian Murgia
2021-10-22 09:17:03 +02:00
committed by GitHub
parent 3e07effe31
commit b3cd9abe21
8 changed files with 47 additions and 32 deletions

View File

@@ -21,7 +21,7 @@ func configure() -> ESCCommandArgumentDescriptor:
# Validate wether the given arguments match the command descriptor
func validate(arguments: Array):
if not escoria.main.current_scene.camera_limits.size() < arguments[0]:
if escoria.main.current_scene.camera_limits.size() < arguments[0]:
escoria.logger.report_errors(
"camera_set_limits: invalid limits id",
[

View File

@@ -85,4 +85,7 @@ func _on_event_finished(return_code: int, event: ESCEvent) -> void:
func interrupt_running_event():
if _running_event == null:
return
for event in events_queue:
event.interrupt()
events_queue.clear()
_running_event.interrupt()

View File

@@ -26,7 +26,7 @@ export(PackedScene) var player_scene
export(Array, Rect2) var camera_limits: Array = [Rect2()] setget set_camera_limits
# The editor debug display mode
export(int) var editor_debug_mode = EditorRoomDebugDisplay.NONE setget set_editor_debug_mode
export(EditorRoomDebugDisplay) var editor_debug_mode = EditorRoomDebugDisplay.NONE setget set_editor_debug_mode
# The player scene instance