fix: keep stairs interaction read-only
This commit is contained in:
@@ -25,10 +25,7 @@ func _ready() -> void:
|
||||
_sync_enemy_views()
|
||||
hud.refresh(game_state)
|
||||
audio_library.set_ambience_context("exploration")
|
||||
var user_args := OS.get_cmdline_user_args()
|
||||
if "--capture-door" in user_args:
|
||||
submit_test_interact()
|
||||
if "--capture" in user_args or "--capture-door" in user_args:
|
||||
if "--capture" in OS.get_cmdline_user_args():
|
||||
_capture_visual_check()
|
||||
|
||||
func _capture_visual_check() -> void:
|
||||
@@ -78,6 +75,8 @@ func get_actor_cell_rect(actor_id: StringName) -> Rect2:
|
||||
return Rect2()
|
||||
|
||||
func _process_interact() -> Array[TurnResult]:
|
||||
if game_state.get_context_target() in [&"stairs", &"exit_reached"]:
|
||||
return _refresh_hud_for_context()
|
||||
var results := game_state.try_interact()
|
||||
_sync_map_renderer_visibility()
|
||||
player_view.refresh()
|
||||
@@ -87,6 +86,10 @@ func _process_interact() -> Array[TurnResult]:
|
||||
hud.refresh(game_state, results)
|
||||
return results
|
||||
|
||||
func _refresh_hud_for_context() -> Array[TurnResult]:
|
||||
hud.refresh(game_state)
|
||||
return []
|
||||
|
||||
func _process_action(direction: Vector2i) -> Array[TurnResult]:
|
||||
var results := game_state.try_player_action(direction)
|
||||
_sync_map_renderer_visibility()
|
||||
|
||||
Reference in New Issue
Block a user