Connect the spare-key story and add flashlight-dependent stair descent

This commit is contained in:
Codex
2026-10-30 14:59:20 +02:00
parent d1c1375395
commit b572e0bf50
40 changed files with 1485 additions and 676 deletions
+15 -1
View File
@@ -362,7 +362,7 @@ func _unhandled_key_input(event: InputEvent) -> void:
func continuation_chapter() -> int:
# Old profiles without the new conversation must hear it, not receive an
# invented memory. Existing discoveries and completed-call count stay intact.
if not facts.has("mail_request") and not facts.has("mail"): return 1
if not facts.has("key_letter") and not facts.has("key_custody"): return 1
return mini(completed+1,10)
func show_menu() -> void:
@@ -548,6 +548,11 @@ func advance() -> void:
next_time = events[0].at
kind = "dialogue"
if not busy.is_empty():
if busy.has("start_move") and not busy.get("moving",false):
var move_at: float = busy_start + voice_length(busy.request) + 0.12
if move_at < next_time:
next_time = move_at
kind = "move"
if not replied and reply_at < next_time:
next_time = reply_at
kind = "reply"
@@ -559,6 +564,12 @@ func advance() -> void:
soundscape.advance(elapsed, place)
match kind:
"heard": complete_line()
"move":
# Start at the first footsteps, after Katya has finished the instruction.
# Interruption later in the walk keeps this real intermediate location.
place = busy.start_move
busy.moving = true
soundscape.update_location(place)
"impact":
fired.impact = elapsed
strike()
@@ -617,6 +628,8 @@ func line_allowed(id: String) -> bool:
if rule.has("places") and place not in rule.places: return false
for key in rule.get("items",[]):
if not items.has(key): return false
for key in rule.get("missing",[]):
if items.has(key): return false
return true
func opening_for(number: int) -> Dictionary:
@@ -844,6 +857,7 @@ func refresh_commands() -> void:
if not done.has("question") and line_allowed(entry.question):
command_list.add_child(stage.chip("«"+str(story.lines[entry.question].text)+"»","question",func():choose_action("question")))
var names := {"look":"У входной двери", "keys_search":"Найти ключи", "keys_fast":"Ключи в куртке", "lamp_search":"Поискать фонарь", "lamp_fast":"Повернуть батарейку", "mail_hint":"Помочь с письмом", "read_mail":"Прочитать письмо", "safe":"Сейф · 0417", "front":"На площадку", "stairs":"Проверить лестницу", "side_try":"Боковая дверь", "side_open":"Ручку вверх и ключ", "inner":"Подальше от окон", "back":"Вернуться в квартиру", "neighbor":"Постучать соседке", "phone_test":"Проверить связь", "phone_shelf":"Телефон на полку", "speak_here":"Мам, я здесь", "speak_love":"Я люблю тебя"}
names.merge({"stairs_lit":"Спускаться с фонарём", "stairs_down":"Продолжить спуск", "return_flat":"Вернуться за фонарём", "neighbor":"Постучать соседям"},true)
for action in story.actions:
if command_allowed(action):
var id: String = action.id