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 authored and GitHub committed 2021-10-22 09:17:03 +02:00
1 parent 3e07effe31
commit b3cd9abe21
8 files changed
+47 -32

No files matched your search

@@ -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",
[
@@ -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()
@@ -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
+24 -21
View File
@@ -58,33 +58,36 @@ func _exit_tree():
## BACKGROUND ##
func left_click_on_bg(position: Vector2) -> void:
escoria.do(
"walk",
[escoria.main.current_scene.player.global_id, position],
true
)
escoria.action_manager.clear_current_action()
verbs_menu.unselect_actions()
if escoria.main.current_scene.player:
escoria.do(
"walk",
[escoria.main.current_scene.player.global_id, position],
true
)
escoria.action_manager.clear_current_action()
verbs_menu.unselect_actions()
func right_click_on_bg(position: Vector2) -> void:
escoria.do(
"walk",
[escoria.main.current_scene.player.global_id, position],
true
)
escoria.action_manager.clear_current_action()
verbs_menu.unselect_actions()
if escoria.main.current_scene.player:
escoria.do(
"walk",
[escoria.main.current_scene.player.global_id, position],
true
)
escoria.action_manager.clear_current_action()
verbs_menu.unselect_actions()
func left_double_click_on_bg(position: Vector2) -> void:
escoria.do(
"walk",
[escoria.main.current_scene.player.global_id, position, true],
true
)
escoria.action_manager.clear_current_action()
verbs_menu.unselect_actions()
if escoria.main.current_scene.player:
escoria.do(
"walk",
[escoria.main.current_scene.player.global_id, position, true],
true
)
escoria.action_manager.clear_current_action()
verbs_menu.unselect_actions()
## ITEM FOCUS ##
+8 -7
View File
@@ -61,13 +61,14 @@ func right_click_on_bg(position: Vector2) -> void:
mousewheel_action(1)
func left_double_click_on_bg(position: Vector2) -> void:
escoria.do(
"walk",
[escoria.main.current_scene.player.global_id, position, true],
true
)
$CanvasLayer/ui/HBoxContainer/verbs_menu.set_by_name("walk")
$CanvasLayer/ui/HBoxContainer/verbs_menu.clear_tool_texture()
if escoria.main.current_scene.player:
escoria.do(
"walk",
[escoria.main.current_scene.player.global_id, position, true],
true
)
$CanvasLayer/ui/HBoxContainer/verbs_menu.set_by_name("walk")
$CanvasLayer/ui/HBoxContainer/verbs_menu.clear_tool_texture()
## ITEM/HOTSPOT FOCUS ##