diff --git a/asset/dialogue/item_description.dialogue b/asset/dialogue/item_description.dialogue index 76f098eb..777706f7 100644 --- a/asset/dialogue/item_description.dialogue +++ b/asset/dialogue/item_description.dialogue @@ -220,6 +220,7 @@ show[ID:prop_药方_详情] skip[ID:prop_小蝉人偶_详情] 一只小鞋子[#texture=c02/小鞋子1.png][ID:prop_单只小鞋子] 这只小鞋子曾经属于一个裹了小脚的女孩。{br}鞋不成双,祸事难防。[ID:prop_单只小鞋子_说明] +#show[ID:prop_单只小鞋子_详情] skip[ID:prop_单只小鞋子_详情] # c03 邀请信[#texture=c03/邀请信.png][#inspect=c03/ux_邀请信.png][ID:prop_邀请信] @@ -481,6 +482,8 @@ skip[ID:prop_沾血的老虎钳_详情] 我记得...{br}捂眼静心,或许有用。[ID:c04_鬼打墙_捂眼] # 除晦游戏 好吵...不要吵了[ID:c04_除晦游戏_开始] +不要…不要再吵了[ID:c04_除晦游戏_二阶段] +眼不见,心自静?自欺欺人![ID:c04_除晦游戏_结束] => END ~ Notes_c05 diff --git a/manager/scene/scene_manager.gd b/manager/scene/scene_manager.gd index f7a44ab3..1bb071fc 100644 --- a/manager/scene/scene_manager.gd +++ b/manager/scene/scene_manager.gd @@ -245,6 +245,13 @@ func enable_important_item(prop_key: String, display_inspector = true) -> void: if prop_hud: print("[prop] enable_important_item prop:", prop_key) prop_hud.enable_important_item(prop_key, display_inspector) + # 以下处理逻辑位于 prop_hud 中 + # if play_action: + # var inspector = get_inspector() as PropInspector + # if inspector.is_inspecting(): + # await inspector.quit_and_hidden + # # 获得重要物品后,如果在检阅,则在检阅完成后摸一下包 + # lock_player(2.3, 28) else: printerr("enable_important_item PropHud node not found") diff --git a/scene/character/player_animation_config.gd b/scene/character/player_animation_config.gd index d4e7a0bf..4e3b6897 100644 --- a/scene/character/player_animation_config.gd +++ b/scene/character/player_animation_config.gd @@ -62,6 +62,8 @@ var ANIMATION_CONFIG = { 25: [&"", Vector2.ONE, Vector2(0, -50.0), &"", &"c04_吕萍_捂眼呼吸"], 26: [&"", Vector2.ONE, Vector2(0, -50.0), &"", &"c04_吕萍_捂眼放下"], 27: [&"", Vector2.ONE, Vector2(0, -50.0), &"", &"c04_吕萍_捂眼走"], + # 获得重要物品后,摸一下包 + 28: [&"", Vector2.ONE, Vector2(0, -50.0), &"", &"c00_吕萍_摸包"], }, "吕萍爬行": { diff --git a/scene/ux/prop_hud.gd b/scene/ux/prop_hud.gd index f95f3956..cd022320 100644 --- a/scene/ux/prop_hud.gd +++ b/scene/ux/prop_hud.gd @@ -618,7 +618,7 @@ func inspect_item(prop_key: String, display_obtained := true, as_important_item elif display_mode == "skip": inspector.pop_prop_inspection(prop_key, texture, true, describe_content) # 检阅详情后增加记笔记动作 - inspector.quit_and_hidden.connect(_play_action_note, CONNECT_ONE_SHOT) + inspector.quit_and_hidden.connect(_play_action_touch_bag, CONNECT_ONE_SHOT) else: printerr("ImportantPropItem %s invalid display_mode:" % prop_key, display_mode) else: @@ -631,15 +631,19 @@ func _post_display_detail(texture, content) -> void: var inspector = SceneManager.get_inspector() as PropInspector inspector.pop_standard_inspection(texture, null, content, false, wide) # 检阅详情后增加记笔记动作 - inspector.quit_and_hidden.connect(_play_action_note, CONNECT_ONE_SHOT) + inspector.quit_and_hidden.connect(_play_action_touch_bag, CONNECT_ONE_SHOT) + # 写字声 var note_sfx = preload("uid://cxeb1gsys78cb") -func _play_action_note() -> void: + +func _play_action_touch_bag() -> void: # 显示通知的同时,玩家动作 SceneManager.pop_notification("ui_notify_important_item_update") - SceneManager.lock_player(3.0, 16, true) + # 获得重要物品后,如果在检阅,则在检阅完成后摸一下包 + SceneManager.lock_player(2.5, 28, true) + # SceneManager.lock_player(3.0, 16, true) AudioManager.play_sfx(note_sfx) diff --git a/scene/ux/prop_inspector.gd b/scene/ux/prop_inspector.gd index e971346e..f209b5b9 100644 --- a/scene/ux/prop_inspector.gd +++ b/scene/ux/prop_inspector.gd @@ -1,12 +1,7 @@ @tool class_name PropInspector extends CanvasLayer -enum { - STATUS_HIDDEN, - STATUS_INSPECTING_PROP, - STATUS_INSPECTING_COVER, - STATUS_INSPECTING_NOTES -} +enum { STATUS_HIDDEN, STATUS_INSPECTING_PROP, STATUS_INSPECTING_COVER, STATUS_INSPECTING_NOTES } signal hiding_tween_started signal quit_and_hidden @@ -20,7 +15,6 @@ signal quit_and_hidden @onready var tip_label = %TipLabel as Label @onready var inspector_balloon = %InspectorBalloon as InspectorBalloon - var tip_cover = "Q: " + tr("ui_退出") + " " + "E: " + tr("ui_阅读") var tip_notes = "Q: " + tr("ui_退出") + " " + "E: " + tr("ui_收起") var texture_cover: Texture2D @@ -44,11 +38,17 @@ func _ready() -> void: inspector_balloon.quitted.connect(_on_inspector_balloon_quitted) +func is_inspecting() -> bool: + return status != STATUS_HIDDEN + + func _on_inspector_balloon_quitted(_is_manually: bool): _hide() + var hiding_tween: Tween + func _hide(): if status == STATUS_HIDDEN: return @@ -68,6 +68,7 @@ func _hide(): # 在状态设置后发送信号 hiding_tween_started.emit() + func _post_hide(): scroll_container.mouse_filter = Control.MOUSE_FILTER_IGNORE locking = false @@ -143,10 +144,7 @@ var locking = false: func pop_prop_inspection( - prop_key: String, - cover_texture: Texture2D, - display_obtained: bool, - describe_content: String + prop_key: String, cover_texture: Texture2D, display_obtained: bool, describe_content: String ): if not cover_texture: push_error("PropInspector: cover_texture is not set")