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:
@@ -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
|
||||
|
||||
@@ -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 ##
|
||||
|
||||
@@ -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 ##
|
||||
|
||||
|
||||
@@ -39,6 +39,9 @@ say player "I don't think he'd like that."
|
||||
|
||||
####################################################################################################
|
||||
:give r5_filled_sheet
|
||||
set_hud_visible false
|
||||
accept_input SKIP
|
||||
|
||||
inventory_remove r5_filled_sheet
|
||||
say worker "Hey! That's perfect!"
|
||||
say worker "I can finally get away from here!"
|
||||
@@ -53,3 +56,8 @@ set_global r6_door_open true
|
||||
# Disappear!
|
||||
wait 1
|
||||
set_active worker false
|
||||
|
||||
set_hud_visible true
|
||||
accept_input ALL
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
:use
|
||||
:exit_scene
|
||||
set_sound_state _sound res://game/sfx/sounds/doorOpen_2.ogg false
|
||||
change_scene "res://game/rooms/room12/room12.tscn"
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ func _on_button_pressed():
|
||||
":debug",
|
||||
"change_scene %s" % options_paths[selected_id]
|
||||
])
|
||||
|
||||
escoria.event_manager.interrupt_running_event()
|
||||
escoria.event_manager.queue_event(script.events['debug'])
|
||||
|
||||
func _on_option_item_selected(index):
|
||||
|
||||
Reference in New Issue
Block a user