Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c19e2301b | ||
|
|
88d1344def | ||
|
|
abf3d51636 | ||
|
|
2b7db78e8f | ||
|
|
c538536265 | ||
|
|
65b2a57449 | ||
|
|
399ed3ad53 | ||
|
|
2ce70ac708 | ||
|
|
469d856f1c |
No files matched your search
@@ -30,12 +30,13 @@ const TABLE_MANIFEST := {
|
||||
"feats": "feats.tres", # FeatTable 规则改写型特性(定义表 Rule 4 豁免——TreasureItemTable 先例;空表合法态=主时间线零扰动)
|
||||
"forge": "forge.tres", # ForgeTable——两根类型轴默认值+六路线行族;攻防所有权切分唯一数据面
|
||||
"battle_layout": "battle_layout.tres", # BattleLayoutTable——战斗屏分区几何与明细带高度单行
|
||||
"camp_scene_layout": "camp_scene_layout.tres", # CampSceneLayoutTable——营地场景 10 层贴图/命中矩形与门洞缺口单行
|
||||
}
|
||||
|
||||
var combat: ConfigDomainCombat # 战斗编排域七表(board_gen/variation/status_effects/enemy/skill/hero/settlement)
|
||||
var run: ConfigDomainRun # 冒险 runner 域七表(level/difficulty/level_gen_params/reward/adventure/action_economy/shop)
|
||||
var crossrun: ConfigDomainCrossrun # 跨局元进度域五表(meta/meta_tree/treasure_items/feats/forge)
|
||||
var presentation: ConfigDomainPresentation # 表现层布局域一表(battle_layout)
|
||||
var presentation: ConfigDomainPresentation # 表现层布局域两表(battle_layout/camp_scene_layout)
|
||||
|
||||
var is_ready := false
|
||||
var _diagnostics: Array[Dictionary] = [] # {severity, category, message}
|
||||
@@ -149,6 +150,9 @@ func _assign_loaded(loaded: Dictionary) -> void:
|
||||
crossrun.feats = loaded.get("feats")
|
||||
crossrun.forge = loaded.get("forge")
|
||||
presentation.battle_layout = loaded.get("battle_layout")
|
||||
presentation.camp_scene_layout = loaded.get("camp_scene_layout")
|
||||
for problem: String in presentation.camp_scene_layout.validate():
|
||||
_fatal("camp_scene_layout", problem) # 布局几何红线(命中区越画面/相交/侵顶栏)=数据致命
|
||||
# resolver 协作件注入三表(resolve 委托承载——resolver 文件与键零搬移)
|
||||
combat.board_gen._resolver = _resolver
|
||||
combat.enemy._resolver = _resolver
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
## 表现层布局域容器(D2 域容器——config_db 表持有按域收敛):战斗屏布局一表类型化持有。
|
||||
## 表现层布局域容器(D2 域容器——config_db 表持有按域收敛):战斗屏与营地场景布局两表类型化持有。
|
||||
## 零方法零行为——纯持有结构;「经 ConfigDB 单点读取」=经其持有的容器与表对象(架构 :88 定稿注记)。
|
||||
class_name ConfigDomainPresentation
|
||||
extends Resource
|
||||
|
||||
var battle_layout: BattleLayoutTable
|
||||
var camp_scene_layout: CampSceneLayoutTable
|
||||
@@ -0,0 +1,13 @@
|
||||
## 营地场景单层规格(camp_scene_layout.tres 行件):层键+贴图矩形+命中矩形+命中键。
|
||||
## z 序=表内数组序(视图子节点序同源派生);坐标一律终稿画布 1280×800 像素坐标。
|
||||
class_name CampSceneLayerSpec
|
||||
extends Resource
|
||||
|
||||
@export var key: StringName = &"" # 层键(对齐 UiKit.TEX_CAMP_* 常量后缀)
|
||||
@export var texture_rect: Rect2 = Rect2() # 贴图矩形(1:1 像素贴图落位)
|
||||
@export var hotspot: Rect2 = Rect2() # 命中矩形(零矩形=不可点层——bg/wall/tent)
|
||||
@export var hotspot_key: StringName = &"" # object_pressed 载荷键(可点层必填)
|
||||
|
||||
|
||||
func is_clickable() -> bool:
|
||||
return hotspot.size.x > 0.0 and hotspot.size.y > 0.0
|
||||
@@ -0,0 +1 @@
|
||||
uid://bll8d0s1nmarf
|
||||
@@ -0,0 +1,67 @@
|
||||
## 营地场景布局表 schema(camp_scene_layout.tres):10 层贴图矩形/命中矩形/门洞缺口/围墙带包络/顶栏禁区。
|
||||
## 坐标数值唯一事实源=数据行本表——视图、探针、单测一律读表取值,禁另写坐标字面量。
|
||||
class_name CampSceneLayoutTable
|
||||
extends Resource
|
||||
|
||||
@export var canvas := Vector2(1280, 800) # 终稿画布(工程档同幅面)
|
||||
@export var hud_band_h := 48 # 顶栏禁区高度(命中不侵)
|
||||
@export var gate_gap := Vector2i(520, 760) # 门洞缺口 x 范围(透出背景层小路,禁填死)
|
||||
@export var wall_band := Rect2(0, 240, 1280, 70) # 围墙带包络(门柱顶 240—桩底 310;围墙贴图须落在其内)
|
||||
@export var layers: Array[CampSceneLayerSpec] = []
|
||||
|
||||
|
||||
## 加载期 fail-fast 校验(ConfigDB 装载即查,问题非空=数据致命)。
|
||||
## 校验面按件拆分:层身份与贴图矩形/命中区边界/命中区互斥/围墙带包络。
|
||||
func validate() -> Array[String]:
|
||||
var problems: Array[String] = []
|
||||
var clickables: Array[CampSceneLayerSpec] = _collect_clickables(problems)
|
||||
_check_hotspot_bounds(clickables, problems)
|
||||
_check_hotspot_disjoint(clickables, problems)
|
||||
_check_wall_band(problems)
|
||||
return problems
|
||||
|
||||
|
||||
func _collect_clickables(problems: Array[String]) -> Array[CampSceneLayerSpec]:
|
||||
var seen: Dictionary[StringName, bool] = {}
|
||||
var clickables: Array[CampSceneLayerSpec] = []
|
||||
for layer in layers:
|
||||
if layer.key == &"":
|
||||
problems.append("层键为空")
|
||||
continue
|
||||
if seen.has(layer.key):
|
||||
problems.append("层键重复: %s" % layer.key)
|
||||
seen[layer.key] = true
|
||||
if _out_of_canvas(layer.texture_rect):
|
||||
problems.append("贴图矩形越画面: %s %s" % [layer.key, layer.texture_rect])
|
||||
if layer.is_clickable():
|
||||
if layer.hotspot_key == &"":
|
||||
problems.append("可点层缺命中键: %s" % layer.key)
|
||||
clickables.append(layer)
|
||||
elif layer.hotspot_key != &"":
|
||||
problems.append("不可点层带命中键: %s" % layer.key)
|
||||
return clickables
|
||||
|
||||
|
||||
func _check_hotspot_bounds(clickables: Array[CampSceneLayerSpec], problems: Array[String]) -> void:
|
||||
for h in clickables:
|
||||
if h.hotspot.position.x < 0.0 or h.hotspot.position.y < hud_band_h \
|
||||
or _out_of_canvas(h.hotspot):
|
||||
problems.append("命中区越画面或侵顶栏禁区: %s %s" % [h.key, h.hotspot])
|
||||
|
||||
|
||||
func _check_hotspot_disjoint(clickables: Array[CampSceneLayerSpec], problems: Array[String]) -> void:
|
||||
for i in clickables.size():
|
||||
for j in range(i + 1, clickables.size()):
|
||||
if clickables[i].hotspot.intersects(clickables[j].hotspot):
|
||||
problems.append("命中区相交: %s × %s" % [clickables[i].key, clickables[j].key])
|
||||
|
||||
|
||||
func _check_wall_band(problems: Array[String]) -> void:
|
||||
for layer in layers:
|
||||
if layer.key == &"wall" and not wall_band.encloses(layer.texture_rect):
|
||||
problems.append("围墙贴图越围墙带包络: %s" % layer.texture_rect)
|
||||
|
||||
|
||||
func _out_of_canvas(rect: Rect2) -> bool:
|
||||
return rect.position.x < 0.0 or rect.position.y < 0.0 \
|
||||
or rect.end.x > canvas.x or rect.end.y > canvas.y
|
||||
@@ -0,0 +1 @@
|
||||
uid://c6p8wyvcc5upp
|
||||
@@ -0,0 +1,82 @@
|
||||
[gd_resource type="Resource" script_class="CampSceneLayoutTable" load_steps=13 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://data/schemas/camp_scene_layout_table.gd" id="1"]
|
||||
[ext_resource type="Script" path="res://data/schemas/camp_scene_layer_spec.gd" id="2"]
|
||||
|
||||
[sub_resource type="Resource" id="1"]
|
||||
script = ExtResource("2")
|
||||
key = &"bg"
|
||||
texture_rect = Rect2(0, 0, 1280, 800)
|
||||
hotspot = Rect2(0, 0, 0, 0)
|
||||
hotspot_key = &""
|
||||
|
||||
[sub_resource type="Resource" id="2"]
|
||||
script = ExtResource("2")
|
||||
key = &"wall"
|
||||
texture_rect = Rect2(0, 261, 1280, 49)
|
||||
hotspot = Rect2(0, 0, 0, 0)
|
||||
hotspot_key = &""
|
||||
|
||||
[sub_resource type="Resource" id="3"]
|
||||
script = ExtResource("2")
|
||||
key = &"board"
|
||||
texture_rect = Rect2(845, 268, 130, 121)
|
||||
hotspot = Rect2(845, 268, 130, 140)
|
||||
hotspot_key = &"board"
|
||||
|
||||
[sub_resource type="Resource" id="4"]
|
||||
script = ExtResource("2")
|
||||
key = &"gate"
|
||||
texture_rect = Rect2(520, 250, 240, 211)
|
||||
hotspot = Rect2(520, 250, 240, 220)
|
||||
hotspot_key = &"gate"
|
||||
|
||||
[sub_resource type="Resource" id="5"]
|
||||
script = ExtResource("2")
|
||||
key = &"dummy"
|
||||
texture_rect = Rect2(340, 520, 120, 180)
|
||||
hotspot = Rect2(340, 520, 120, 180)
|
||||
hotspot_key = &"dummy"
|
||||
|
||||
[sub_resource type="Resource" id="6"]
|
||||
script = ExtResource("2")
|
||||
key = &"forge"
|
||||
texture_rect = Rect2(40, 467, 240, 193)
|
||||
hotspot = Rect2(40, 420, 240, 240)
|
||||
hotspot_key = &"forge"
|
||||
|
||||
[sub_resource type="Resource" id="7"]
|
||||
script = ExtResource("2")
|
||||
key = &"tent"
|
||||
texture_rect = Rect2(982, 520, 251, 170)
|
||||
hotspot = Rect2(0, 0, 0, 0)
|
||||
hotspot_key = &""
|
||||
|
||||
[sub_resource type="Resource" id="8"]
|
||||
script = ExtResource("2")
|
||||
key = &"chest"
|
||||
texture_rect = Rect2(1097, 700, 106, 90)
|
||||
hotspot = Rect2(1085, 700, 130, 90)
|
||||
hotspot_key = &"chest"
|
||||
|
||||
[sub_resource type="Resource" id="9"]
|
||||
script = ExtResource("2")
|
||||
key = &"notebook"
|
||||
texture_rect = Rect2(818, 704, 100, 66)
|
||||
hotspot = Rect2(818, 690, 100, 80)
|
||||
hotspot_key = &"notebook"
|
||||
|
||||
[sub_resource type="Resource" id="10"]
|
||||
script = ExtResource("2")
|
||||
key = &"campfire"
|
||||
texture_rect = Rect2(560, 571, 160, 149)
|
||||
hotspot = Rect2(560, 640, 160, 80)
|
||||
hotspot_key = &"campfire"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1")
|
||||
canvas = Vector2(1280, 800)
|
||||
hud_band_h = 48
|
||||
gate_gap = Vector2i(520, 760)
|
||||
wall_band = Rect2(0, 240, 1280, 70)
|
||||
layers = [SubResource("1"), SubResource("2"), SubResource("3"), SubResource("4"), SubResource("5"), SubResource("6"), SubResource("7"), SubResource("8"), SubResource("9"), SubResource("10")]
|
||||
@@ -7,7 +7,7 @@ extends RefCounted
|
||||
## 三束按域收拢(u21——同 u20 形;views=视图句柄/getters=查询 Callable 活引用/flow=编排 Callable):
|
||||
## 原 12 参长签名收 4 参——字段即原构造参数逐一同名迁移,键面=消费方改址合同。
|
||||
var db
|
||||
var views: Dictionary = {} # {camp_overlay, shop_overlay, toast, start_overlay, logger} # type-hint: ignore(三束异构混载——视图句柄/查询 Callable/编排 Callable)
|
||||
var views: Dictionary = {} # {camp_scene, forge_view, treasure_view, tree_view, codex_view, shop_overlay, toast, start_overlay, save_select_overlay, logger, refresh_bus} # type-hint: ignore(三束异构混载——视图句柄/刷新单口/查询 Callable/编排 Callable;卡④ T3 营地域改挂)
|
||||
var getters: Dictionary = {} # {meta_get, save_get, runner_get} # type-hint: ignore(同上——Callable 束)
|
||||
var flow: Dictionary = {} # {open_modal, close_modal, refresh_presentations} # type-hint: ignore(同上——Callable 束)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ extends RefCounted
|
||||
var db
|
||||
var _meta_get: Callable # () → 元进度账本现值(组合根 lambda——探针 isolate_save 换注面)
|
||||
var _save_get: Callable # () → 存档承载现值(同上——营地 recent 摘要读数面)
|
||||
var camp_overlay: CampOverlay
|
||||
var views: Dictionary = {} # {camp_scene, forge_view, treasure_view, tree_view, codex_view, shop_overlay, toast, start_overlay, save_select_overlay, logger, refresh_bus} # type-hint: ignore(三束异构混载——视图句柄/单口件;营地域句柄经 ctx.views 取用——组合根 ui.modals.camp 子容器同源)
|
||||
var shop_overlay: ShopOverlay
|
||||
var toast: ToastStack
|
||||
var start_overlay: Control # 开始层互斥面(开合仿设置面先例——非模态且树序在后,规范 2.3)
|
||||
@@ -23,7 +23,7 @@ func _init(ctx: CampFlowContext) -> void:
|
||||
db = ctx.db
|
||||
_meta_get = ctx.getters.meta_get
|
||||
_save_get = ctx.getters.save_get
|
||||
camp_overlay = ctx.views.camp_overlay
|
||||
views = ctx.views # 营地域五目标+刷新单口+关层收闭面(卡④ T3——CampOverlay 退役后投影目标改线)
|
||||
shop_overlay = ctx.views.shop_overlay
|
||||
toast = ctx.views.toast
|
||||
start_overlay = ctx.views.start_overlay
|
||||
@@ -34,21 +34,54 @@ func _init(ctx: CampFlowContext) -> void:
|
||||
_refresh_presentations = ctx.flow.refresh_presentations
|
||||
|
||||
|
||||
# 打开营地(主菜单入口——开合与开始层互斥仿设置面先例:开始覆盖层非模态且树序在后,
|
||||
# 规范 2.3 遮挡纪律;打开时先刷条件解锁——达标未解锁就地入账)
|
||||
# 打开营地场景根(进档落点——卡④ T3 改挂:开层=交互式场景图,四子界面经场景点选进)
|
||||
func open_camp() -> void:
|
||||
var meta = _meta_get.call()
|
||||
if meta == null:
|
||||
return
|
||||
meta.refresh_treasure_unlocks() # 条件解锁刷新
|
||||
start_overlay.visible = false
|
||||
_open_modal.call(camp_overlay) # 模态栈单口(登记层开合一律走栈)
|
||||
camp_overlay.open_camp(camp_data())
|
||||
_open_modal.call(views.camp_scene) # 模态栈单口(场景根开——选档层被栈遮挡挂起)
|
||||
views.refresh_bus.refresh(camp_data()) # 进档动线尾显式刷新一闸(卡⑤ 契约 5 时机②——HUD 读数重读)
|
||||
_refresh_presentations.call()
|
||||
|
||||
|
||||
# ---- 营地四子界面开层(场景点选路由分派——组合根 _on_camp_object_pressed;数据投喂=快照投影)----
|
||||
|
||||
|
||||
func open_camp_forge() -> void:
|
||||
_open_modal.call(views.forge_view)
|
||||
views.forge_view.open_camp(camp_data())
|
||||
|
||||
|
||||
func open_camp_treasure() -> void:
|
||||
_open_modal.call(views.treasure_view)
|
||||
views.treasure_view.open_camp(camp_data())
|
||||
|
||||
|
||||
func open_camp_tree() -> void:
|
||||
_open_modal.call(views.tree_view)
|
||||
views.tree_view.open_camp(camp_data())
|
||||
|
||||
|
||||
func open_camp_codex() -> void:
|
||||
_open_modal.call(views.codex_view)
|
||||
views.codex_view.open_camp(camp_data())
|
||||
|
||||
|
||||
# 子界面返回钮(视图只发 closed——关层归本口;场景根留底复现,开始层不动)
|
||||
func on_camp_sub_closed(view: Control) -> void:
|
||||
_close_modal.call(view)
|
||||
_refresh_presentations.call()
|
||||
|
||||
|
||||
# 关闭整个营地(关层收闭——卡④ T3:营地层与选档层同收+开始层恢复,禁只关营地留下选档回闪;
|
||||
# 触发面=篝火/ESC 回主菜单动线,卡④ T4 接线)
|
||||
func on_camp_closed() -> void:
|
||||
_close_modal.call(camp_overlay) # 模态栈单口
|
||||
for v: Control in [views.camp_scene, views.forge_view, views.treasure_view, views.tree_view, views.codex_view]:
|
||||
if v.visible:
|
||||
_close_modal.call(v)
|
||||
_close_modal.call(views.save_select_overlay)
|
||||
start_overlay.visible = true
|
||||
_refresh_presentations.call() # 关闭后刷新顶栏(工坊解锁可能变了余额侧读数面)
|
||||
|
||||
@@ -79,7 +112,7 @@ func on_camp_buy(attr: String) -> void:
|
||||
if not meta.buy_treasure_unlock(attr):
|
||||
toast.show_toast("购买被拒(余额不足或不可购买)", "warn")
|
||||
return
|
||||
camp_overlay.refresh_camp(camp_data())
|
||||
views.refresh_bus.refresh(camp_data())
|
||||
_refresh_presentations.call()
|
||||
return
|
||||
# Y 刷新升级行购买(双入口之一——树上 ks_refresh 同账;
|
||||
@@ -87,7 +120,7 @@ func on_camp_buy(attr: String) -> void:
|
||||
if not meta.buy_attune_refresh():
|
||||
toast.show_toast("购买被拒", "warn")
|
||||
return
|
||||
camp_overlay.refresh_camp(camp_data())
|
||||
views.refresh_bus.refresh(camp_data())
|
||||
_refresh_presentations.call()
|
||||
|
||||
|
||||
@@ -99,7 +132,7 @@ func on_camp_attune_toggle(item_id: String) -> void:
|
||||
if not meta.toggle_attunement(item_id):
|
||||
toast.show_toast("同调位已满——先卸下再装配", "warn")
|
||||
return
|
||||
camp_overlay.refresh_camp(camp_data())
|
||||
views.refresh_bus.refresh(camp_data())
|
||||
|
||||
|
||||
# 天赋树购买(写口唯一归 MetaProgression.tree_buy/tree_buy_fork;Fork 节点购=激活侧)
|
||||
@@ -111,7 +144,7 @@ func on_camp_tree_buy(node_id: String) -> void:
|
||||
if not ok:
|
||||
toast.show_toast("购买被拒——前置/行门槛/余额不足", "warn")
|
||||
return
|
||||
camp_overlay.refresh_camp(camp_data())
|
||||
views.refresh_bus.refresh(camp_data())
|
||||
_refresh_presentations.call()
|
||||
|
||||
|
||||
@@ -123,7 +156,7 @@ func on_camp_fork_toggle(group: String, side: String) -> void:
|
||||
if not meta.tree_toggle_fork(group, side):
|
||||
toast.show_toast("切换被拒——未激活组请先购买", "warn")
|
||||
return
|
||||
camp_overlay.refresh_camp(camp_data())
|
||||
views.refresh_bus.refresh(camp_data())
|
||||
_refresh_presentations.call()
|
||||
|
||||
|
||||
@@ -136,7 +169,7 @@ func on_camp_forge_buy(route_id: String) -> void:
|
||||
if not meta.forge_buy_level(route_id):
|
||||
toast.show_toast("锻造被拒——钥石不足或路线不可锻造", "warn")
|
||||
return
|
||||
camp_overlay.refresh_camp(camp_data())
|
||||
views.refresh_bus.refresh(camp_data())
|
||||
_refresh_presentations.call()
|
||||
|
||||
|
||||
@@ -148,7 +181,7 @@ func on_camp_forge_unlock(route_id: String) -> void:
|
||||
if not meta.forge_buy_unlock(route_id):
|
||||
toast.show_toast("解锁被拒——钥石不足或已解锁", "warn")
|
||||
return
|
||||
camp_overlay.refresh_camp(camp_data())
|
||||
views.refresh_bus.refresh(camp_data())
|
||||
_refresh_presentations.call()
|
||||
|
||||
|
||||
@@ -162,7 +195,7 @@ func on_camp_forge_select(route_id: String) -> void:
|
||||
if not ok:
|
||||
toast.show_toast("切换被拒——路线未解锁", "warn")
|
||||
return
|
||||
camp_overlay.refresh_camp(camp_data())
|
||||
views.refresh_bus.refresh(camp_data())
|
||||
_refresh_presentations.call()
|
||||
|
||||
|
||||
|
||||
@@ -123,19 +123,37 @@ func _start_adventure_from_menu() -> void:
|
||||
|
||||
|
||||
# 确认弹窗分派(卡③ 契约 3):按 _confirm_consumer 路由——"delete_slot"=卡③ 删档确认
|
||||
#(确认才删、取消只关窗——裁决 3)。"new_adventure" 消费方已随卡② 主菜单确认链摘除退役
|
||||
#(mn6/V5——主菜单零确认残留),分派机制保留(卡④ 到位接入第三消费方不返工)。
|
||||
#(确认才删、取消只关窗——裁决 3)。"gate"/"gate_new"=卡④ 大门两分支消费方(有/无断点),
|
||||
# "campfire_leave"=篝火二次确认(卡④ T4 接入——分派机制扩展第三/第四消费方)。
|
||||
func _on_confirm_accepted() -> void:
|
||||
ui.modals.flow.close(ui.modals.confirm_dialog) # 模态栈单口
|
||||
match _confirm_consumer:
|
||||
"delete_slot":
|
||||
save_manager.slots.delete_slot(_confirm_consumer_slot)
|
||||
ui.modals.save_select_overlay.open_save_select(HudPresenter.save_select_data(save_manager)) # 就地刷新(该槽回空态)
|
||||
"gate":
|
||||
_camp_pres.on_camp_closed() # 冒险发起后营地场景屏隐藏(选档层同收——卡④ T4 关层收闭)
|
||||
_resume_from_menu() # 继续上一段冒险(现役续玩编排同源——卡④ 契约 4)
|
||||
"gate_new":
|
||||
_camp_pres.on_camp_closed()
|
||||
_start_adventure() # 开始新冒险(现役开局编排同源)
|
||||
"campfire_leave":
|
||||
_camp_pres.on_camp_closed() # 篝火确认离场=营地与选档层同收+开始层恢复(回主菜单)
|
||||
_confirm_consumer = ""
|
||||
|
||||
|
||||
# 次确认分派(三钮形态中钮——大门「开始新冒险」出口;卡④ T4)
|
||||
func _on_confirm_secondary() -> void:
|
||||
ui.modals.flow.close(ui.modals.confirm_dialog) # 模态栈单口
|
||||
match _confirm_consumer:
|
||||
"gate":
|
||||
_camp_pres.on_camp_closed()
|
||||
_start_adventure()
|
||||
_confirm_consumer = ""
|
||||
|
||||
|
||||
func _on_confirm_declined() -> void:
|
||||
ui.modals.flow.close(ui.modals.confirm_dialog) # 只关窗(取消无状态变更——裁决 3:取消不删);关侧恢复归 ModalFlow
|
||||
ui.modals.flow.close(ui.modals.confirm_dialog) # 只关窗(取消无状态变更——裁决 3:取消不删/卡④:退回营地);关侧恢复归 ModalFlow
|
||||
_confirm_consumer = ""
|
||||
|
||||
|
||||
@@ -500,12 +518,35 @@ func _sync_status_entry() -> void:
|
||||
MainOverlayFlow._sync_status_entry(self)
|
||||
|
||||
|
||||
# ---- 探针缝保缝(click/ui_probe 营地段直呼组合根面;实现归 camp_shop_presenter.gd)----
|
||||
# ---- 探针缝保缝(click/ui_probe 营地段直呼组合根面;实现归 camp_shop_presenter.gd / main_overlay_flow.gd)----
|
||||
|
||||
func _on_camp_closed() -> void:
|
||||
MainOverlayFlow._on_camp_closed(self)
|
||||
|
||||
|
||||
func _on_camp_object_pressed(key: StringName) -> void:
|
||||
MainOverlayFlow._on_camp_object_pressed(self, key) # 场景点选路由(卡④ T3——薄委托,实现归覆盖层流程承接件)
|
||||
|
||||
|
||||
# Esc 输入入口(产品码首个键盘入口——卡⑤ T1 契约 9 接线定稿:事件驱动 _unhandled_input、
|
||||
# KEY_ESCAPE 键值判定配 physical_keycode、pressed 且非 echo、禁 Input 单例轮询、不挂 ui_cancel)
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if event is InputEventKey and event.pressed and not event.echo and (event.keycode == KEY_ESCAPE or event.physical_keycode == KEY_ESCAPE):
|
||||
MainEscFlow.on_esc_input(self)
|
||||
|
||||
|
||||
func _on_esc_return() -> void:
|
||||
MainEscFlow._on_return_to_menu(self)
|
||||
|
||||
|
||||
func _on_esc_settings() -> void:
|
||||
MainEscFlow._on_settings(self)
|
||||
|
||||
|
||||
func _on_esc_quit() -> void:
|
||||
MainEscFlow._on_quit(self)
|
||||
|
||||
|
||||
func _camp_data() -> Dictionary:
|
||||
return MainOverlayFlow._camp_data(self)
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
## 组合根 Esc 流程承接件(产品码首个键盘输入入口——main._unhandled_input 同名薄委托落地):
|
||||
## Esc 四态路由(契约 9 判据单点=ModalStack 登记册现开集合,禁手枚名单)+三出口动线。
|
||||
## 静态承接件零成员态(仿 main_overlay_flow 形态——main 侧留同名薄委托,探针 main.X 路径零改动)。
|
||||
class_name MainEscFlow
|
||||
extends RefCounted
|
||||
|
||||
|
||||
## 营地语境判据(Q1 甲——场景根 visible;子界面开态抑制由契约 9① 现开集合承载,不并入本谓词)
|
||||
static func is_camp_context(root: Variant) -> bool:
|
||||
return root.ui.modals.camp.scene != null and root.ui.modals.camp.scene.visible
|
||||
|
||||
|
||||
## Esc 优先序(camp.md v2.3 定稿 2026-11-01 用户裁——有功能窗开着→先关最上层窗,覆盖卡⑤ 契约 9①
|
||||
## 的 Q1 甲无反馈;设置开在浮窗之上仍无反馈=契约 3 保留):
|
||||
## ①功能窗开着→close 最上层窗→①'设置开在浮窗之上→无反馈→②浮窗开→close(Q2 同键单义)→
|
||||
## ③营地语境→open→④非营地→无反馈
|
||||
static func on_esc_input(root: Variant) -> void:
|
||||
var esc: Control = root.ui.modals.camp.esc_overlay
|
||||
var window := _topmost_camp_window(root)
|
||||
if window != null:
|
||||
root.ui.modals.flow.close(window) # ① 先关最上层功能窗(v2.3 定稿)
|
||||
return
|
||||
if root.ui.modals.settings_overlay.visible:
|
||||
return # ①' 设置开在浮窗之上 → 无反馈(浮窗不隔层关闭——契约 3)
|
||||
if esc.visible:
|
||||
root.ui.modals.flow.close(esc) # ② 再按 Esc 关窗
|
||||
return
|
||||
if is_camp_context(root):
|
||||
root.ui.modals.flow.open(esc) # ③ 营地语境唤起
|
||||
# ④ 非营地语境 → 无反馈
|
||||
|
||||
|
||||
# 五功能窗现开查询(camp.md v2.3 五窗互斥单开——模态栈深恒 1,至多一窗在开;生涯页入窗集)
|
||||
static func _topmost_camp_window(root: Variant) -> Control:
|
||||
for w: Control in [root.ui.modals.camp.forge, root.ui.modals.camp.treasure, root.ui.modals.camp.tree,
|
||||
root.ui.modals.camp.codex, root.ui.modals.career_overlay]:
|
||||
if w != null and w.visible:
|
||||
return w
|
||||
return null
|
||||
|
||||
|
||||
|
||||
## 返回主菜单动线(契约 4):首步 close 浮窗(缺此步浮窗残留主菜单上方)→营地与选档层同收+开始层恢复
|
||||
static func _on_return_to_menu(root: Variant) -> void:
|
||||
root.ui.modals.flow.close(root.ui.modals.camp.esc_overlay)
|
||||
root._camp_pres.on_camp_closed() # 关层收闭单口(卡④ T3——营地层与选档层同收+开始层恢复)
|
||||
|
||||
|
||||
## 设置出口(浮窗登记在设置层之下——open 只隐上方层,浮窗由树序遮挡非属性隐藏;关后重现=栈语义)
|
||||
static func _on_settings(root: Variant) -> void:
|
||||
root.ui.modals.flow.open(root.ui.modals.settings_overlay)
|
||||
|
||||
|
||||
## 退出出口(_quit_game 原样复用——settings_store.save_settings+quit,零语义副作用)
|
||||
static func _on_quit(root: Variant) -> void:
|
||||
root._quit_game()
|
||||
@@ -0,0 +1 @@
|
||||
uid://caa868un7dnt4
|
||||
@@ -10,7 +10,11 @@ static func _open_settings(root: Variant) -> void:
|
||||
|
||||
static func _on_settings_closed(root: Variant) -> void:
|
||||
root.ui.modals.flow.close(root.ui.modals.settings_overlay) # 模态栈单口
|
||||
root.ui.screens.start_overlay.visible = true
|
||||
# 语境分支(卡⑤ 契约 3——谓词=camp_esc_overlay.visible,谁开的设置谁收):
|
||||
# 营地浮窗路径关设置回浮窗不回主菜单(栈语义:浮窗登记在下、由树序遮挡非属性隐藏);
|
||||
# 菜单路径保留开始层恢复硬副作用。
|
||||
if not root.ui.modals.camp.esc_overlay.visible:
|
||||
root.ui.screens.start_overlay.visible = true
|
||||
|
||||
|
||||
# ---- 局内状态面板·只读(入口角标在两屏装配段;开合与数据喂入归组合根)----
|
||||
@@ -40,7 +44,43 @@ static func _open_career(root: Variant) -> void:
|
||||
|
||||
static func _on_career_closed(root: Variant) -> void:
|
||||
root.ui.modals.flow.close(root.ui.modals.career_overlay) # 模态栈单口
|
||||
root.ui.screens.start_overlay.visible = true
|
||||
if not root.ui.modals.camp.scene.visible: # 营地语境关生涯不回开始层(笔记本入口——卡④ T3;栈已复现场景根)
|
||||
root.ui.screens.start_overlay.visible = true
|
||||
|
||||
|
||||
# ---- 营地场景点选路由(卡④ T3/T4——场景根 object_pressed 组合根分派)----
|
||||
# 大门两分支(裁决 5,Q5 甲):点大门永远先出确认不直接进冒险——有断点=三出口弹窗
|
||||
#(继续上一段冒险/开始新冒险/取消),无断点=是否开始新冒险(是/否);cancelled 恒=无变更退回营地。
|
||||
# 篝火回主菜单必须二次确认(camp.md v2.2 裁定);确认后营地层与选档层同收+开始层恢复(关层收闭)。
|
||||
|
||||
|
||||
static func _on_camp_object_pressed(root: Variant, key: StringName) -> void:
|
||||
match key:
|
||||
&"forge":
|
||||
root._camp_pres.open_camp_forge()
|
||||
&"chest":
|
||||
root._camp_pres.open_camp_treasure()
|
||||
&"dummy":
|
||||
root._camp_pres.open_camp_tree()
|
||||
&"board":
|
||||
root._camp_pres.open_camp_codex()
|
||||
&"notebook":
|
||||
_open_career(root) # 生涯页入口改挂帐篷旁笔记本(CareerOverlay 本体零改——卡④ T3)
|
||||
&"gate":
|
||||
_open_gate_confirm(root)
|
||||
&"campfire":
|
||||
root._confirm_consumer = "campfire_leave"
|
||||
root.ui.modals.confirm_dialog.open("确定离开营地回到主菜单?", "离开", "留下")
|
||||
|
||||
|
||||
static func _open_gate_confirm(root: Variant) -> void:
|
||||
if root.save_manager.has_breakpoint():
|
||||
root._confirm_consumer = "gate"
|
||||
root.ui.modals.confirm_dialog.open_three("有未完成的冒险——继续上一段冒险,还是开始新冒险?",
|
||||
"继续上一段冒险", "开始新冒险", "取消")
|
||||
return
|
||||
root._confirm_consumer = "gate_new"
|
||||
root.ui.modals.confirm_dialog.open("是否开始新冒险?", "是", "否")
|
||||
|
||||
|
||||
# 生涯页快照投影 —— 承接体见 HudPresenter.career_data(开层调用点直接改引)
|
||||
@@ -65,7 +105,7 @@ static func _on_save_select_closed(root: Variant) -> void:
|
||||
|
||||
|
||||
|
||||
# 空槽新档链(Q3 裁乙暂行落点=现役 CampOverlay;卡④ 重立卡后改挂场景图):卡① 创建=激活=白板落盘,
|
||||
# 空槽新档链(卡④ T3 换代:落点=营地场景根——CampOverlay 随四柜台拆解退役):卡① 创建=激活=白板落盘,
|
||||
# 落点开层。动线序(禁先关后开):先落点开层(开始层保持隐藏),选档层被模态栈遮挡隐藏、不关闭。
|
||||
static func _on_save_select_new(root: Variant, slot: int) -> void:
|
||||
root.save_manager.slots.create_slot(slot)
|
||||
@@ -73,7 +113,7 @@ static func _on_save_select_new(root: Variant, slot: int) -> void:
|
||||
|
||||
|
||||
|
||||
# 有档槽进档链(契约 8 进档即激活):卡① 激活+读盘(兜底/拒读链按槽成立)→暂行落点 CampOverlay。
|
||||
# 有档槽进档链(契约 8 进档即激活):卡① 激活+读盘(兜底/拒读链按槽成立)→落点=营地场景根(卡④ T3)。
|
||||
static func _on_save_select_load(root: Variant, slot: int) -> void:
|
||||
root.save_manager.slots.activate_slot(slot)
|
||||
root._camp_pres.open_camp()
|
||||
|
||||
@@ -83,7 +83,7 @@ static func _build_battle_wiring(root: Variant) -> void:
|
||||
|
||||
static func _build_overlays(root: Variant) -> void:
|
||||
# 模态覆盖层(登记序 = 树序 = z 遮挡序:图例 < 明细回看 < 节点 < 关卡画面 < 三选一 < 终局
|
||||
# < 商店 < 营地 < 设置 < 状态面板(只读) < 生涯页(只读) < 确认弹窗 < 调试浮窗;
|
||||
# < 商店 < 营地场景根 < 四子界面 < 设置 < 状态面板(只读) < 生涯页(只读) < 确认弹窗 < 调试浮窗;
|
||||
# 关卡画面住冒险屏壳(树序在模态之下)——登记序仍夹在节点层与三选一层之间,遮挡语义零改动)
|
||||
var overlays: Dictionary[Variant, Variant] = UiAssembler.build_overlays(root, root.db)
|
||||
root.ui.modals.legend_overlay = overlays.legend_overlay
|
||||
@@ -92,8 +92,34 @@ static func _build_overlays(root: Variant) -> void:
|
||||
root.ui.modals.shop_overlay = overlays.shop_overlay
|
||||
root.ui.screens.camp_screen = CampScreenScene.instantiate()
|
||||
root.add_child(root.ui.screens.camp_screen)
|
||||
root.ui.modals.camp_overlay = root.ui.screens.camp_screen.camp_overlay
|
||||
# 营地屏壳插位(夹商店层与设置层之间)由 LAYER_CONTRACT 营地槽统一落位——禁散落 move_child
|
||||
# 营地场景根装配(布局表经 ConfigDB 单点注入——视图禁自载表路径;CampOverlay 随四柜台拆解退役)
|
||||
var camp_layout: CampSceneLayoutTable = root.db.presentation.camp_scene_layout
|
||||
root.ui.screens.camp_screen.camp_scene.setup_layers(camp_layout)
|
||||
root.ui.screens.camp_screen.camp_scene.bind_hotspots(camp_layout)
|
||||
root.ui.modals.camp.scene = root.ui.screens.camp_screen.camp_scene
|
||||
# 营地四子界面(独立全屏页——场景根留底形态;句柄落 ui.modals.camp 子容器——禁平铺回 ui_modals)
|
||||
var forge := ForgeView.new()
|
||||
root.add_child(forge)
|
||||
root.ui.modals.camp.forge = forge
|
||||
var treasure := TreasureView.new()
|
||||
root.add_child(treasure)
|
||||
root.ui.modals.camp.treasure = treasure
|
||||
var tree_view := TreeView.new()
|
||||
root.add_child(tree_view)
|
||||
root.ui.modals.camp.tree = tree_view
|
||||
var codex := CodexView.new()
|
||||
root.add_child(codex)
|
||||
root.ui.modals.camp.codex = codex
|
||||
# Esc 浮窗(卡⑤——登记于设置层之前的模态;三钮意图经 MainEscFlow 路由)
|
||||
var esc_overlay := CampEscOverlay.new()
|
||||
esc_overlay.setup_buttons()
|
||||
esc_overlay.bind_signals()
|
||||
root.add_child(esc_overlay)
|
||||
root.ui.modals.camp.esc_overlay = esc_overlay
|
||||
# 营地顶栏 HUD 栏(卡⑤——钥石余额常驻;挂卡④场景根顶栏预留位+入刷新单口目标册)
|
||||
var hud_band := CampHudBand.new()
|
||||
root.ui.modals.camp.scene.set_hud_band(hud_band)
|
||||
# 屏壳/子界面插位由 LAYER_CONTRACT 槽统一落位——禁散落 move_child
|
||||
root.ui.modals.legend_overlay.closed.connect(root.ui.modals.flow.close.bind(root.ui.modals.legend_overlay))
|
||||
root.ui.modals.node_overlay.continue_pressed.connect(root._on_node_continue)
|
||||
root.ui.modals.level_screen.route_chosen.connect(root._on_route_chosen)
|
||||
@@ -158,9 +184,18 @@ static func _build_menu_wiring(root: Variant) -> void:
|
||||
root.ui.screens.debug_badge.pressed.connect(root._on_debug_badge_pressed)
|
||||
# 营地/商店投影(本体在 camp_shop_presenter.gd;本类只接线、探针缝保缝转发;
|
||||
# 购买写调用唯一经 MetaProgression/LevelRunner core 单口——组合根 lambda 现值注入)
|
||||
# 营地刷新单口(各写口尾→现开界面+场景根 HUD 一闸完成——卡④ T3;卡⑤ HUD band 随卡⑤挂册)
|
||||
var camp_bus := CampRefreshBus.new()
|
||||
camp_bus.bind_targets([root.ui.modals.camp.forge, root.ui.modals.camp.treasure,
|
||||
root.ui.modals.camp.tree, root.ui.modals.camp.codex,
|
||||
root.ui.screens.camp_screen.camp_scene.hud_band] as Array[Control])
|
||||
root._camp_pres = CampShopPresenter.new(CampFlowContext.new(root.db,
|
||||
{"camp_overlay": root.ui.modals.camp_overlay, "shop_overlay": root.ui.modals.shop_overlay,
|
||||
"toast": root.ui.battle.board_zone.toast, "start_overlay": root.ui.screens.start_overlay, "logger": root.logger},
|
||||
{"camp_scene": root.ui.modals.camp.scene, "forge_view": root.ui.modals.camp.forge,
|
||||
"treasure_view": root.ui.modals.camp.treasure, "tree_view": root.ui.modals.camp.tree,
|
||||
"codex_view": root.ui.modals.camp.codex, "shop_overlay": root.ui.modals.shop_overlay,
|
||||
"toast": root.ui.battle.board_zone.toast, "start_overlay": root.ui.screens.start_overlay,
|
||||
"save_select_overlay": root.ui.modals.save_select_overlay, "logger": root.logger,
|
||||
"refresh_bus": camp_bus},
|
||||
{"meta_get": func() -> Variant: return root.meta, "save_get": func() -> Variant: return root.save_manager,
|
||||
"runner_get": func() -> Variant: return root.run_scope.runner},
|
||||
{"open_modal": root.ui.modals.flow.open, "close_modal": root.ui.modals.flow.close,
|
||||
@@ -168,14 +203,19 @@ static func _build_menu_wiring(root: Variant) -> void:
|
||||
root.ui.modals.shop_overlay.buy_requested.connect(root._camp_pres.on_shop_buy)
|
||||
root.ui.modals.shop_overlay.refresh_requested.connect(root._camp_pres.on_shop_refresh) # MC-1
|
||||
root.ui.modals.shop_overlay.leave_pressed.connect(root._camp_pres.on_shop_leave)
|
||||
root.ui.modals.camp_overlay.buy_requested.connect(root._camp_pres.on_camp_buy)
|
||||
root.ui.modals.camp_overlay.attune_toggled.connect(root._camp_pres.on_camp_attune_toggle)
|
||||
root.ui.modals.camp_overlay.tree_buy_requested.connect(root._camp_pres.on_camp_tree_buy)
|
||||
root.ui.modals.camp_overlay.tree_fork_toggled.connect(root._camp_pres.on_camp_fork_toggle)
|
||||
root.ui.modals.camp_overlay.forge_buy_requested.connect(root._camp_pres.on_camp_forge_buy) # 锻造三意图(写口唯一归 MetaProgression)
|
||||
root.ui.modals.camp_overlay.forge_unlock_requested.connect(root._camp_pres.on_camp_forge_unlock)
|
||||
root.ui.modals.camp_overlay.forge_select_requested.connect(root._camp_pres.on_camp_forge_select)
|
||||
root.ui.modals.camp_overlay.closed.connect(root._camp_pres.on_camp_closed)
|
||||
# 营地信号接线(CampOverlay 退役——四子界面意图信号+场景点选组合根路由+closed 经 bind 携视图)
|
||||
root.ui.modals.camp.forge.forge_buy_requested.connect(root._camp_pres.on_camp_forge_buy)
|
||||
root.ui.modals.camp.forge.forge_unlock_requested.connect(root._camp_pres.on_camp_forge_unlock)
|
||||
root.ui.modals.camp.forge.forge_select_requested.connect(root._camp_pres.on_camp_forge_select)
|
||||
root.ui.modals.camp.treasure.buy_requested.connect(root._camp_pres.on_camp_buy)
|
||||
root.ui.modals.camp.treasure.attune_toggled.connect(root._camp_pres.on_camp_attune_toggle)
|
||||
root.ui.modals.camp.tree.tree_buy_requested.connect(root._camp_pres.on_camp_tree_buy)
|
||||
root.ui.modals.camp.tree.tree_fork_toggled.connect(root._camp_pres.on_camp_fork_toggle)
|
||||
root.ui.modals.camp.forge.closed.connect(root._camp_pres.on_camp_sub_closed.bind(root.ui.modals.camp.forge))
|
||||
root.ui.modals.camp.treasure.closed.connect(root._camp_pres.on_camp_sub_closed.bind(root.ui.modals.camp.treasure))
|
||||
root.ui.modals.camp.tree.closed.connect(root._camp_pres.on_camp_sub_closed.bind(root.ui.modals.camp.tree))
|
||||
root.ui.modals.camp.codex.closed.connect(root._camp_pres.on_camp_sub_closed.bind(root.ui.modals.camp.codex))
|
||||
root.ui.modals.camp.scene.object_pressed.connect(root._on_camp_object_pressed)
|
||||
root.ui.screens.menu_screen.settingsbtn.pressed.connect(root._open_settings) # 最小设置面入口
|
||||
root.ui.screens.menu_screen.quitbtn.pressed.connect(root._quit_game) # 退出游戏提级一级菜单
|
||||
|
||||
@@ -194,7 +234,12 @@ static func _build_debug_and_resolvers(root: Variant) -> void:
|
||||
# 消费方编排(卡③ 契约 3/sl8——禁双常驻静态接线):open 前设 _confirm_consumer,
|
||||
# confirmed/cancelled 后按该状态量分派;分派面可容纳后续消费方(卡④ 到位直接接入不返工)
|
||||
root.ui.modals.confirm_dialog.confirmed.connect(root._on_confirm_accepted)
|
||||
root.ui.modals.confirm_dialog.secondary_confirmed.connect(root._on_confirm_secondary) # 三钮次确认(卡④ 大门「开始新冒险」出口)
|
||||
root.ui.modals.confirm_dialog.cancelled.connect(root._on_confirm_declined)
|
||||
# Esc 浮窗三出口接线(卡⑤——意图信号经薄委托归 MainEscFlow 动线;输入入口=main._unhandled_input)
|
||||
root.ui.modals.camp.esc_overlay.return_requested.connect(root._on_esc_return)
|
||||
root.ui.modals.camp.esc_overlay.settings_requested.connect(root._on_esc_settings)
|
||||
root.ui.modals.camp.esc_overlay.quit_requested.connect(root._on_esc_quit)
|
||||
|
||||
# 调试浮窗(主菜单三散件收一:随机种子/数值调整/批量模拟/两层调试入口;
|
||||
# 全局可开浮窗:调试会话恒开=启动即开〔_ready〕+两屏角标再开+当局数据只读区块;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
class_name CampScreen
|
||||
extends Control
|
||||
# 营地屏壳(营地覆盖层的屏壳容器)。
|
||||
# 营地覆盖层视图原样构建(CampOverlay 类视图继续代码构建、零 .tscn 化改造——契约 2);
|
||||
# 购买/开合接线归组合根经 CampShopPresenter(信号连接只在组合根)。
|
||||
# 可独立实例化(F6/headless 挂载)——V2 探针断言载体。
|
||||
# 营地屏壳(营地场景根的屏壳容器)。
|
||||
# 场景图视图代码构建(CampSceneView 继续代码构建、零 .tscn 化改造);布局表经组合根注入
|
||||
# (main_ui_build 装配段 setup_layers/bind_hotspots——视图禁自载表路径);购买/开合接线归组合根经
|
||||
# CampShopPresenter(信号连接只在组合根)。可独立实例化(F6/headless 挂载)——V2 探针断言载体。
|
||||
|
||||
var camp_overlay: CampOverlay # 营地覆盖层(原 build_overlays 营地段迁入——main 组合根句柄指向本屏成员)
|
||||
var camp_scene: CampSceneView # 营地场景图(交互式营地场景根——main 组合根句柄指向本屏成员)
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
mouse_filter = Control.MOUSE_FILTER_IGNORE # 屏壳=纯容器(ui_input 实证:全屏 STOP 壳会吃掉下层模态鼠标输入)
|
||||
camp_overlay = CampOverlay.new()
|
||||
add_child(camp_overlay)
|
||||
camp_scene = CampSceneView.new()
|
||||
add_child(camp_scene)
|
||||
@@ -0,0 +1,12 @@
|
||||
## 营地交互域模态句柄子容器:持营地域全部模态句柄(终态六枚=营地场景根+锻造/秘宝/天赋树/图鉴四子界面+Esc 浮窗)。
|
||||
## RefCounted 不挂树;随 UiModals._init 构造(与 flow 同拍)。Esc 浮窗枚随卡⑤落——禁空占位凑结构。
|
||||
## 新营地句柄禁平铺回 ui_modals:营地域句柄寻址一律 ui.modals.camp.X 二层(模态句柄册分域纪律——全量分家另立批)。
|
||||
class_name UiCampModals
|
||||
extends RefCounted
|
||||
|
||||
var scene: CampSceneView # 营地场景根(交互式营地场景图——camp_screen 屏壳成员住宿)
|
||||
var forge: ForgeView # 锻造工坊子界面
|
||||
var treasure: TreasureView # 秘宝匣子界面
|
||||
var tree: TreeView # 天赋树子界面
|
||||
var codex: CodexView # 奖励格图鉴子界面(占位挂起态)
|
||||
var esc_overlay: CampEscOverlay # Esc 浮窗(卡⑤——终态六枚落满)
|
||||
@@ -0,0 +1 @@
|
||||
uid://goaqtequmh8s
|
||||
@@ -1,4 +1,4 @@
|
||||
## 模态层域句柄册:十三个模态覆盖层句柄+模态栈编排(ModalFlow——登记/开合/输入锁谓词)的注册面域容器。
|
||||
## 模态层域句柄册:十二个平铺模态句柄+营地交互域子容器(camp)+模态栈编排(ModalFlow——登记/开合/输入锁谓词)的注册面域容器。
|
||||
## RefCounted 不挂树;模态登记唯一口=register_layer(anchors 撑满宿主+排入 ModalStack)。
|
||||
## flow 随容器构造即建(装配早期注入点经 root.ui.modals.flow.* 取 Callable——晚于 flow 建立时点)。
|
||||
class_name UiModals
|
||||
@@ -11,7 +11,7 @@ var level_screen: LevelMapScreen
|
||||
var curio_overlay: CurioPickOverlay
|
||||
var end_overlay: BattleEndOverlay
|
||||
var shop_overlay: ShopOverlay
|
||||
var camp_overlay: CampOverlay
|
||||
var camp: UiCampModals
|
||||
var settings_overlay: SettingsOverlay
|
||||
var status_panel: StatusPanel
|
||||
var career_overlay: CareerOverlay
|
||||
@@ -22,6 +22,7 @@ var debug_overlay: DebugOverlay
|
||||
|
||||
func _init() -> void:
|
||||
flow = ModalFlow.new() # 查询/钩子 Callable 由 _build_modal_flow 注入(注入时点不变——注入值面向已在座实例)
|
||||
camp = UiCampModals.new() # 营地域句柄子容器(分域纪律——营地域句柄禁平铺回本册)
|
||||
|
||||
|
||||
func register_layer(m: Control, tags: Array = []) -> void:
|
||||
|
||||
@@ -22,7 +22,12 @@ const LAYER_CONTRACT: Array[Dictionary] = [
|
||||
{"key": "curio_overlay", "kind": "modal", "tags": []},
|
||||
{"key": "end_overlay", "kind": "modal", "tags": []},
|
||||
{"key": "shop_overlay", "kind": "modal", "tags": []},
|
||||
{"key": "camp_overlay", "kind": "modal", "tags": [], "shell": "camp_screen"},
|
||||
{"key": "camp_scene", "kind": "modal", "tags": [], "shell": "camp_screen"}, # 营地场景根(交互式场景图——卡④)
|
||||
{"key": "forge_view", "kind": "modal", "tags": []}, # 营地四子界面(独立全屏页——场景根留底形态,卡④ T3)
|
||||
{"key": "treasure_view", "kind": "modal", "tags": []},
|
||||
{"key": "tree_view", "kind": "modal", "tags": []},
|
||||
{"key": "codex_view", "kind": "modal", "tags": []},
|
||||
{"key": "camp_esc_overlay", "kind": "modal", "tags": []}, # Esc 浮窗(卡⑤——登记于营地层与设置层之间,契约 3 栈语义正解)
|
||||
{"key": "settings_overlay", "kind": "modal", "tags": []},
|
||||
{"key": "status_panel", "kind": "modal", "tags": []},
|
||||
{"key": "career_overlay", "kind": "modal", "tags": []},
|
||||
@@ -58,7 +63,12 @@ func node(key: String) -> Node:
|
||||
"end_overlay": return modals.end_overlay
|
||||
"shop_overlay": return modals.shop_overlay
|
||||
"camp_screen": return screens.camp_screen
|
||||
"camp_overlay": return modals.camp_overlay
|
||||
"camp_scene": return modals.camp.scene
|
||||
"forge_view": return modals.camp.forge
|
||||
"treasure_view": return modals.camp.treasure
|
||||
"tree_view": return modals.camp.tree
|
||||
"codex_view": return modals.camp.codex
|
||||
"camp_esc_overlay": return modals.camp.esc_overlay
|
||||
"settings_overlay": return modals.settings_overlay
|
||||
"status_panel": return modals.status_panel
|
||||
"career_overlay": return modals.career_overlay
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
## Esc 浮窗视图(营地语境 Esc 唤起):返回主菜单/设置/退出游戏三钮(裁决 9——三项且仅三项)。
|
||||
## 壳=UiKit.modal_shell(居中模态壳,ui_kit 工厂单点);退出钮=UiKit.danger_button;零新素材零新色值。
|
||||
## Q2 再按 Esc 关窗=组合根 Esc 路由直呼 flow.close(本视图无自关通路);三钮 pressed 外发意图不内含动线。
|
||||
## 零动效(契约 6——直开直关,子树零 AnimationPlayer、源码零动效令牌)。
|
||||
class_name CampEscOverlay
|
||||
extends Control
|
||||
|
||||
signal return_requested ## 返回主菜单意图(动线归 MainEscFlow._on_return_to_menu——首步 close 浮窗)
|
||||
signal settings_requested ## 设置意图(开设置层——浮窗登记在其下,栈语义关后重现)
|
||||
signal quit_requested ## 退出游戏意图(_quit_game 原样复用)
|
||||
|
||||
var _return_btn: Button
|
||||
var _settings_btn: Button
|
||||
var _quit_btn: Button
|
||||
|
||||
|
||||
func setup_buttons() -> void:
|
||||
var box: VBoxContainer = UiKit.modal_shell(self, Color(UiKit.DIM, 0.55), Vector2(360, 0), 12,
|
||||
UiKit.panel_skinned(Vector4(14, 12, 14, 12))).box
|
||||
_return_btn = UiKit.button("返回主菜单")
|
||||
box.add_child(_return_btn)
|
||||
_settings_btn = UiKit.button("设置")
|
||||
box.add_child(_settings_btn)
|
||||
_quit_btn = UiKit.danger_button("退出游戏")
|
||||
box.add_child(_quit_btn)
|
||||
visible = false # 登记模态初始隐(开合走栈——模态纪律)
|
||||
|
||||
|
||||
func bind_signals() -> void:
|
||||
_return_btn.pressed.connect(func() -> void: return_requested.emit())
|
||||
_settings_btn.pressed.connect(func() -> void: settings_requested.emit())
|
||||
_quit_btn.pressed.connect(func() -> void: quit_requested.emit())
|
||||
@@ -0,0 +1 @@
|
||||
uid://col25elh1utw5
|
||||
@@ -0,0 +1,27 @@
|
||||
## 营地顶栏小 HUD 栏(裁决 10——钥石余额常驻,最小集形态):承载 UiKit.keystone_badge(工厂单点)。
|
||||
## 读数只经 camp_data() 投影单口(禁第二账本、禁视图自算);刷新挂卡④ CampRefreshBus 单口
|
||||
## (bus 目标册成员——显式触发才变,禁 _ready 自刷/自持第二入口,契约 5);载体=PRESET_TOP_WIDE 48px 浮层。
|
||||
class_name CampHudBand
|
||||
extends Control
|
||||
|
||||
var _badge: PanelContainer
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
set_anchors_preset(Control.PRESET_TOP_WIDE)
|
||||
custom_minimum_size = Vector2(0, 48) # 高 48px 浮层覆盖、不挤压画面(camp.md §顶栏)
|
||||
mouse_filter = Control.MOUSE_FILTER_IGNORE # HUD 栏不挡场景命中区(浮层覆盖语义)
|
||||
_badge = UiKit.keystone_badge("钥石 0")
|
||||
_badge.set_anchors_preset(Control.PRESET_CENTER_RIGHT)
|
||||
_badge.position = Vector2(-160, 8) # 顶栏右位次(UiKit 现行件域内——代拍板 3)
|
||||
add_child(_badge)
|
||||
|
||||
|
||||
## 余额写入(格式串=既有消费面同款「钥石 %d」——badge 工厂约定单点,禁第二格式串)
|
||||
func set_balance(v: int) -> void:
|
||||
_badge.value_label.text = "钥石 %d" % v
|
||||
|
||||
|
||||
## 刷新单口落点(CampRefreshBus 目标册成员——显式触发才变,契约 5 刷新时机①②③同一闸)
|
||||
func refresh_camp(camp_data: Dictionary) -> void:
|
||||
set_balance(int(camp_data.get("balance", 0)))
|
||||
@@ -0,0 +1 @@
|
||||
uid://by6ugjfdicgud
|
||||
@@ -1,655 +0,0 @@
|
||||
## VERTICAL SLICE - NOT FOR PRODUCTION
|
||||
## 营地覆盖层:树淬炼/锻造工坊/秘宝匣/奖励格图鉴四柜台只读投影,购买与切换意图经信号外发。
|
||||
## 柜台锁定态(钥匙未点亮)开/关零副作用——零写档零报错、锁定行纯文案无可交互购买路径。
|
||||
## 开合与开始层互斥归组合根承接(打开前隐藏开始层)。
|
||||
## 内部状态件(u1 子域拆件——契约 9 职责轴):_TreeState=树淬炼柜台内容容器(单一变化原因=树行板结构);
|
||||
## _ForgeState=锻造工坊与秘宝匣两柜台行板与锁定门(钥匙门同构);_AttuneState=同调装配段节点与钮册;
|
||||
## _SideState=Y 刷新升级行与最近冒险账面。探针直读冻结成员(_balance_label/_tree_buy_btns/
|
||||
## _tree_fork_btns/_workshop_holder/_workshop_rows)住宿主不进状态件。
|
||||
class_name CampOverlay
|
||||
extends Control
|
||||
|
||||
signal buy_requested(attr: String)
|
||||
signal closed
|
||||
signal attune_toggled(item_id: String) ## 同调装配切换意图(写口唯一归 MetaProgression.toggle_attunement)
|
||||
signal tree_buy_requested(node_id: String) ## 天赋树购买意图(写口唯一归 MetaProgression.tree_buy)
|
||||
signal tree_fork_toggled(group: String, side: String) ## 双态切换意图(一节点双态——零币切态)
|
||||
signal forge_buy_requested(route_id: String) ## 锻造路线购买意图(写口唯一归 MetaProgression.forge_buy_level)
|
||||
signal forge_unlock_requested(route_id: String) ## 锻造路线解锁意图(写口唯一归 MetaProgression.forge_buy_unlock)
|
||||
signal forge_select_requested(route_id: String) ## 锻造路线选中意图(写口唯一归 MetaProgression.forge_select)
|
||||
|
||||
# 方向稿取色(柜台头带深棕/行板暖米;双色墨=亮板配深墨)——值单点收 UiKit
|
||||
const HEADER_BAND_COL := UiKit.CAMP_HEADER_BAND
|
||||
const ROW_PLATE_COL := UiKit.CAMP_ROW_PLATE
|
||||
|
||||
|
||||
class _TreeState extends RefCounted:
|
||||
var _tree_holder: VBoxContainer # 树淬炼柜台内容(主界面——脊柱两行+钥匙/socket 行板+Fork 双态钮)
|
||||
|
||||
|
||||
class _ForgeState extends RefCounted:
|
||||
var _forge_lock_l: Label # 锻造工坊柜台锁定态行(钥匙未点亮)
|
||||
var _forge_workbench: VBoxContainer # 锻造工坊工作间(钥匙点亮后展开——两区六路线行板)
|
||||
var _forge_zone_weapon: VBoxContainer # 武器锻造区行板容器(三路线)
|
||||
var _forge_zone_armor: VBoxContainer # 护甲锻造区行板容器(三路线)
|
||||
var _forge_rows: Array[Dictionary] = [] # [{route_id, name_l, lvl_l, status_l, buy_btn, unlock_btn, select_btn, next_price, unlock_price}](open/refresh 重建;探针消费)
|
||||
var _ws_scroll: ScrollContainer # 秘宝匣柜台内容容器(钥匙点亮后可见)
|
||||
var _ws_lock_l: Label # 秘宝匣柜台锁定态行
|
||||
|
||||
|
||||
class _AttuneState extends RefCounted:
|
||||
var _attune_header_l: Label # 同调装配段(Slots 点亮呈现)
|
||||
var _attune_btns: Array[Dictionary] = [] # [{item_id, btn}]——装配/卸下切换钮(满位禁选随刷)
|
||||
var _attune_nodes: Array[Control] = [] # 段内节点册(open_camp 重建时定向清理,不扰工坊六行)
|
||||
|
||||
|
||||
class _SideState extends RefCounted:
|
||||
var _refresh_l: Label # Y 刷新升级行(双入口之一——树上 ks_refresh 同账)
|
||||
var _refresh_btn: Button
|
||||
var _recent_list: Label # 最近冒险(逐行拼接 label——只读账面,随 open_camp 重建)
|
||||
|
||||
|
||||
var _balance_label: Label # 探针直读冻结(S17①——住宿主)
|
||||
var _tree_buy_btns: Array[Dictionary] = [] # [{node_id, btn}]——树购买/解锁钮登记面(open/refresh 重建时刷新;探针消费;住宿主)
|
||||
var _tree_fork_btns: Array[Dictionary] = [] # [{group, side, btn}]——Fork 双态切换钮登记面(探针消费;住宿主)
|
||||
var _workshop_holder: VBoxContainer # 秘宝匣柜台行板(六行+同调装配段+Y 升级行;探针直读冻结——住宿主)
|
||||
var _workshop_rows: Array[Dictionary] = [] # [{item_id, progress_l, status_l}](探针消费;住宿主)
|
||||
var _tree := _TreeState.new()
|
||||
var _forge := _ForgeState.new()
|
||||
var _attune := _AttuneState.new()
|
||||
var _side := _SideState.new()
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
# 底=不透明暖亮档(半透 dim 会透出底下棋盘/战斗提示条,故须实底;demo #v-camp=bg-bright 实底,
|
||||
# 遮蔽语义由组合根输入锁兜底)
|
||||
var dim := UiKit._modal_dim(self, UiKit.BG_BRIGHT)
|
||||
# 石纹弱质感+暗角(demo .tilebg 0.14/.vignette;缺位不挂即回退平色)
|
||||
var bd := UiKit.backdrop_tile()
|
||||
if bd != null:
|
||||
dim.add_child(bd)
|
||||
dim.add_child(UiKit.vignette_rect())
|
||||
|
||||
var root := MarginContainer.new()
|
||||
root.set_anchors_preset(Control.PRESET_FULL_RECT)
|
||||
root.add_theme_constant_override("margin_left", 16)
|
||||
root.add_theme_constant_override("margin_right", 16)
|
||||
root.add_theme_constant_override("margin_top", 12)
|
||||
root.add_theme_constant_override("margin_bottom", 12)
|
||||
dim.add_child(root)
|
||||
var col := VBoxContainer.new()
|
||||
col.add_theme_constant_override("separation", 8)
|
||||
root.add_child(col)
|
||||
|
||||
# ── 顶栏:左铭牌(标题+副题)/ 右钥石徽 ──
|
||||
_build_top_bar(col)
|
||||
|
||||
# ── 四柜台并排(程序占位重排)──
|
||||
# 宽度不足横向滚动(四柜 300 min 宽 > 窄窗可用宽时横滚兜底;纵向撑满余高)
|
||||
var camp_scroll := ScrollContainer.new()
|
||||
camp_scroll.size_flags_vertical = Control.SIZE_EXPAND_FILL
|
||||
camp_scroll.horizontal_scroll_mode = ScrollContainer.SCROLL_MODE_AUTO
|
||||
camp_scroll.vertical_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED
|
||||
col.add_child(camp_scroll)
|
||||
var mid := HBoxContainer.new()
|
||||
mid.add_theme_constant_override("separation", 14)
|
||||
mid.size_flags_vertical = Control.SIZE_EXPAND_FILL
|
||||
camp_scroll.add_child(mid)
|
||||
_build_tree_counter(mid)
|
||||
_build_forge_counter(mid)
|
||||
_build_workshop_counter(mid)
|
||||
_build_atlas_counter(mid)
|
||||
_build_bottom_bar(col)
|
||||
visible = false
|
||||
|
||||
|
||||
## 顶栏域:铭牌(标题+副题)+钥石徽章
|
||||
func _build_top_bar(col: VBoxContainer) -> void:
|
||||
var top := HBoxContainer.new()
|
||||
top.add_theme_constant_override("separation", 10)
|
||||
col.add_child(top)
|
||||
var plaque := PanelContainer.new()
|
||||
plaque.add_theme_stylebox_override("panel",
|
||||
UiKit.panel_flat(UiKit.PANEL_DATA, UiKit.PANEL_BORDER,UiKit.RADIUS_OBJECT, 1, Vector4(14, 8, 14, 8)))
|
||||
top.add_child(plaque)
|
||||
var plaque_col := VBoxContainer.new()
|
||||
plaque.add_child(plaque_col)
|
||||
var title := UiKit.label("营地 · 天赋树",UiKit.FS_TITLE, true, UiKit.INK_TITLE)
|
||||
plaque_col.add_child(title)
|
||||
var sub := UiKit.label("营地本身即树——钥石逐节点点亮,属性/规则/工作间都在树上",UiKit.FS_HINT, false, UiKit.STONE_DEEP) # STONE 对铭牌板 3.59:1 越带,换灰石深化 5.98:1
|
||||
plaque_col.add_child(sub)
|
||||
var spacer := Control.new()
|
||||
spacer.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
top.add_child(spacer)
|
||||
# 钥石徽章烛光黄底+深墨字(demo ②)。UiKit.keystone_badge 工厂单点
|
||||
var badge := UiKit.keystone_badge("钥石 0")
|
||||
top.add_child(badge)
|
||||
_balance_label = badge.value_label
|
||||
|
||||
|
||||
## 柜一·树淬炼(树脊柱界面形态=主界面:一线一节点行板内升级+Fork 双态切换钮)
|
||||
func _build_tree_counter(mid: HBoxContainer) -> void:
|
||||
_tree._tree_holder = VBoxContainer.new()
|
||||
_tree._tree_holder.add_theme_constant_override("separation", 6)
|
||||
var tree_scroll := ScrollContainer.new()
|
||||
tree_scroll.custom_minimum_size = Vector2(300, 336)
|
||||
tree_scroll.size_flags_vertical = Control.SIZE_EXPAND_FILL
|
||||
tree_scroll.horizontal_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED
|
||||
tree_scroll.add_child(_tree._tree_holder)
|
||||
var tree_panel := _counter_panel("天赋树 · 淬炼", "", tree_scroll, 300)
|
||||
tree_panel.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
tree_panel.size_flags_vertical = Control.SIZE_FILL # 四栏等高:任一栏长高时四栏同步拉伸
|
||||
mid.add_child(tree_panel)
|
||||
|
||||
|
||||
## 柜二·锻造工坊(钥匙门——forge_workshop 点亮前锁定态;点亮=工作间两区六路线行板)
|
||||
func _build_forge_counter(mid: HBoxContainer) -> void:
|
||||
_forge._forge_lock_l = UiKit.label("🔒 锻造工坊未开放\n\n点亮树上「锻造工坊」钥匙节点后展开工作间。\n(钥匙免费、无前置——树上直接点亮)",UiKit.FS_HINT, false, UiKit.STONE_DEEP)
|
||||
_forge._forge_lock_l.size_flags_vertical = Control.SIZE_SHRINK_CENTER # 锁文在等高栏内垂直居中
|
||||
_forge._forge_lock_l.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
_forge._forge_lock_l.custom_minimum_size = Vector2(280, 0)
|
||||
_forge._forge_workbench = VBoxContainer.new()
|
||||
_forge._forge_workbench.add_theme_constant_override("separation", 6)
|
||||
_forge._forge_workbench.visible = false # 默认锁定态(钥匙门未判前零行板——门开才建)
|
||||
_forge._forge_zone_weapon = VBoxContainer.new()
|
||||
_forge._forge_zone_weapon.add_theme_constant_override("separation", 4)
|
||||
_forge._forge_zone_armor = VBoxContainer.new()
|
||||
_forge._forge_zone_armor.add_theme_constant_override("separation", 4)
|
||||
var wb_wh := UiKit.label("── 武器锻造区 ──",UiKit.FS_HINT, true, UiKit.GOLD_INK) # 同款深金墨(对柜台板 5.21:1)
|
||||
_forge._forge_workbench.add_child(wb_wh)
|
||||
_forge._forge_workbench.add_child(_forge._forge_zone_weapon)
|
||||
var wb_ah := UiKit.label("── 护甲锻造区 ──",UiKit.FS_HINT, true, UiKit.GOLD_INK)
|
||||
_forge._forge_workbench.add_child(wb_ah)
|
||||
_forge._forge_workbench.add_child(_forge._forge_zone_armor)
|
||||
var forge_holder := VBoxContainer.new()
|
||||
forge_holder.add_theme_constant_override("separation", 6)
|
||||
forge_holder.custom_minimum_size = Vector2(0, 336) # 四栏等高(与树/秘宝匣 scroll 336 min 对齐——锁定态仅锁文也撑住栏高)
|
||||
forge_holder.add_child(_forge._forge_lock_l)
|
||||
forge_holder.add_child(_forge._forge_workbench)
|
||||
var forge_panel := _counter_panel("锻造工坊", UiKit.TEX_ICON_FORGE, forge_holder, 300)
|
||||
forge_panel.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
forge_panel.size_flags_vertical = Control.SIZE_FILL # 四栏等高:任一栏长高时四栏同步拉伸
|
||||
mid.add_child(forge_panel)
|
||||
|
||||
|
||||
## 柜三·秘宝匣(钥匙门——ks_workshop 点亮前锁定态;点亮=现工坊内容整体迁入:六行+同调装配段+Y 升级行)
|
||||
func _build_workshop_counter(mid: HBoxContainer) -> void:
|
||||
_forge._ws_lock_l = UiKit.label("🔒 秘宝匣未开放\n\n点亮树上「秘宝匣」钥匙节点后展开。\n(前置=脊柱生命第 1 级)",UiKit.FS_HINT, false, UiKit.STONE_DEEP)
|
||||
_forge._ws_lock_l.size_flags_vertical = Control.SIZE_SHRINK_CENTER # 锁文在等高栏内垂直居中
|
||||
_forge._ws_lock_l.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
_forge._ws_lock_l.custom_minimum_size = Vector2(280, 0)
|
||||
_forge._ws_scroll = ScrollContainer.new()
|
||||
_forge._ws_scroll.custom_minimum_size = Vector2(300, 336)
|
||||
_forge._ws_scroll.size_flags_vertical = Control.SIZE_EXPAND_FILL
|
||||
_forge._ws_scroll.horizontal_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED
|
||||
_workshop_holder = VBoxContainer.new()
|
||||
_workshop_holder.add_theme_constant_override("separation", 6)
|
||||
_forge._ws_scroll.add_child(_workshop_holder)
|
||||
var ws_holder := VBoxContainer.new()
|
||||
ws_holder.add_theme_constant_override("separation", 6)
|
||||
ws_holder.custom_minimum_size = Vector2(0, 336) # 四栏等高(锁定态 scroll 隐、仅锁文也撑住栏高)
|
||||
ws_holder.add_child(_forge._ws_lock_l)
|
||||
ws_holder.add_child(_forge._ws_scroll)
|
||||
var ws_panel := _counter_panel("秘宝匣", UiKit.TEX_ICON_WORKSHOP, ws_holder, 300)
|
||||
ws_panel.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
ws_panel.size_flags_vertical = Control.SIZE_FILL # 四栏等高:任一栏长高时四栏同步拉伸
|
||||
mid.add_child(ws_panel)
|
||||
|
||||
|
||||
## 柜四·奖励格图鉴(常开独立位——结构位预留,内容排 Alpha)
|
||||
func _build_atlas_counter(mid: HBoxContainer) -> void:
|
||||
var atlas_holder := VBoxContainer.new()
|
||||
atlas_holder.custom_minimum_size = Vector2(0, 336) # 四栏等高(图鉴仅锁文也撑住栏高)
|
||||
var atlas_panel := _counter_panel("奖励格图鉴", UiKit.TEX_ICON_ATLAS, atlas_holder, 300)
|
||||
atlas_panel.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
atlas_panel.size_flags_vertical = Control.SIZE_FILL # 四栏等高:任一栏长高时四栏同步拉伸
|
||||
mid.add_child(atlas_panel)
|
||||
var lock_l := UiKit.label(" —— 柜台结构位预留:内容排 Alpha(地图战斗资源差异化批)",UiKit.FS_HINT, false, UiKit.STONE_DEEP)
|
||||
lock_l.size_flags_vertical = Control.SIZE_SHRINK_CENTER # 锁文在等高栏内垂直居中
|
||||
lock_l.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
lock_l.custom_minimum_size = Vector2(280, 0)
|
||||
atlas_holder.add_child(lock_l)
|
||||
|
||||
|
||||
## 底栏域:关闭钮(左)/ 操作注记(右)+ 最近冒险条带
|
||||
func _build_bottom_bar(col: VBoxContainer) -> void:
|
||||
var close_btn := UiKit.button("关闭营地(回开始界面)")
|
||||
close_btn.pressed.connect(_emit_closed)
|
||||
var bottom := HBoxContainer.new()
|
||||
bottom.add_theme_constant_override("separation", 10)
|
||||
bottom.add_child(close_btn)
|
||||
var spacer2 := Control.new()
|
||||
spacer2.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
bottom.add_child(spacer2)
|
||||
var caption := UiKit.label("树上点亮 · 工作间随钥匙展开 · 图鉴常开",UiKit.FS_HINT, false, UiKit.WARM_SOFT)
|
||||
bottom.add_child(caption)
|
||||
col.add_child(bottom)
|
||||
_side._recent_list = UiKit.label("",UiKit.FS_HINT, false, UiKit.WARM_SOFT)
|
||||
_side._recent_list.clip_text = true
|
||||
_side._recent_list.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
|
||||
col.add_child(_side._recent_list)
|
||||
|
||||
|
||||
# 柜台列面板(方向稿同构):PanelContainer 米板身 + 头带深棕(图标+标题暖白)
|
||||
func _counter_panel(title_text: String, icon_path: String, holder: Control, min_w: int) -> PanelContainer:
|
||||
var panel := PanelContainer.new()
|
||||
panel.custom_minimum_size = Vector2(min_w, 0)
|
||||
panel.add_theme_stylebox_override("panel",
|
||||
UiKit.panel_flat(UiKit.PANEL_DATA, UiKit.PANEL_BORDER,UiKit.RADIUS_OBJECT, 1, Vector4(10, 10, 10, 10)))
|
||||
var vbox := VBoxContainer.new()
|
||||
vbox.add_theme_constant_override("separation", 8)
|
||||
panel.add_child(vbox)
|
||||
var band := PanelContainer.new()
|
||||
band.add_theme_stylebox_override("panel", UiKit.panel_flat(HEADER_BAND_COL, UiKit.PANEL_BORDER,UiKit.RADIUS_OBJECT, 1, Vector4(10, 5, 10, 5)))
|
||||
vbox.add_child(band)
|
||||
var head := HBoxContainer.new()
|
||||
head.add_theme_constant_override("separation", 6)
|
||||
band.add_child(head)
|
||||
if icon_path != "":
|
||||
var ic := UiKit.icon_rect(icon_path, 32) # 柜台头带 64 源 0.5×;缺位 null → 纯文本回退
|
||||
if ic != null:
|
||||
head.add_child(ic)
|
||||
var l := UiKit.label(title_text,UiKit.FS_BODY, true, UiKit.WARM)
|
||||
head.add_child(l)
|
||||
vbox.add_child(holder)
|
||||
return panel
|
||||
|
||||
|
||||
# ---- 柜台行构建(open_camp 重建;行结构仿 ShopOverlay 商品卡——亮板双色墨制)----
|
||||
|
||||
# 天赋树段重建(树淬炼柜台主界面:脉分组行板:节点名/等级/价/购买钮 + Fork 双态切换钮;
|
||||
# 树数据 = 组合根 _camp_data().tree 投影 [{node_id, display_name, vein, kind, level, price, can_buy,
|
||||
# currency}...] + fork_groups [{group, node_id, active_side, owned, can_buy, price, sides:[{side, display_name, effects}]}])
|
||||
func _rebuild_tree(data: Dictionary) -> void:
|
||||
for c in _tree._tree_holder.get_children():
|
||||
c.queue_free()
|
||||
_tree_buy_btns.clear()
|
||||
_tree_fork_btns.clear()
|
||||
var tree: Array[Variant] = data.get("tree", []) as Array
|
||||
var forks: Array[Variant] = data.get("fork_groups", []) as Array
|
||||
var vein_names := {"spine": "·脊柱淬炼·", "forge": "·锻造脉·", "keystone": "·钥石脉·", "attune": "·同调脉·"}
|
||||
var last_vein := ""
|
||||
for row in tree:
|
||||
var vein := String(row.get("vein", ""))
|
||||
if vein != last_vein:
|
||||
last_vein = vein
|
||||
var vh := UiKit.label(String(vein_names.get(vein, vein)),UiKit.FS_HINT, true, UiKit.GOLD_INK) # GOLD_DEEP 对柜台板 2.67:1 越带,换深金墨 5.21:1
|
||||
_tree._tree_holder.add_child(vh)
|
||||
if String(row.get("kind", "")) == "fork":
|
||||
continue # Fork 行去行板化——由 fork_groups 段承载双态切换钮
|
||||
_tree._tree_holder.add_child(_tree_row_line(row))
|
||||
for fg in forks:
|
||||
_tree._tree_holder.add_child(_tree_fork_line(fg))
|
||||
|
||||
|
||||
## 树行板构建域:节点名(含门槛标记)+购买钮(追加序与锚句随段整体搬迁)
|
||||
func _tree_row_line(row: Dictionary) -> HBoxContainer:
|
||||
var hb := HBoxContainer.new()
|
||||
hb.add_theme_constant_override("separation", 6)
|
||||
var lvl := int(row.get("level", 0))
|
||||
var cap := int(row.get("cap", 1))
|
||||
var name_l := UiKit.label("%s Lv%d/%d" % [String(row.get("display_name", "")), lvl, cap], 13, false, UiKit.INK_LABEL)
|
||||
name_l.custom_minimum_size = Vector2(150, 0)
|
||||
name_l.clip_text = true
|
||||
var gate := String(row.get("gate_text", ""))
|
||||
if gate != "":
|
||||
name_l.text += " 🔒" # 等级阈值前置未达标标记(R1 机制位——悬停看门槛;达标后随 refresh 消失)
|
||||
name_l.tooltip_text = "等级门槛:%s" % gate
|
||||
hb.add_child(name_l)
|
||||
var btn := UiKit.button("购买 %d 钥石" % int(row.get("price", 0)), 0.0) # 柜台行板紧凑钮豁免宽度基准
|
||||
btn.pressed.connect(func(): tree_buy_requested.emit(String(row.get("node_id", ""))))
|
||||
btn.disabled = not bool(row.get("can_buy", false))
|
||||
hb.add_child(btn)
|
||||
_tree_buy_btns.append({"node_id": String(row.get("node_id", "")), "btn": btn})
|
||||
return hb
|
||||
|
||||
|
||||
## Fork 双态行板构建域:组状态文案+解锁钮或双态切换钮
|
||||
func _tree_fork_line(fg: Dictionary) -> HBoxContainer:
|
||||
var group := String(fg.get("group", ""))
|
||||
var active := String(fg.get("active_side", ""))
|
||||
var owned := bool(fg.get("owned", false))
|
||||
var fb := HBoxContainer.new()
|
||||
fb.add_theme_constant_override("separation", 6)
|
||||
var state_txt := "未解锁"
|
||||
if owned:
|
||||
state_txt = "激活:%s" % active
|
||||
var gl := UiKit.label("%s[%s]" % [String(fg.get("display_name", group)), state_txt], 13, false, UiKit.INK_LABEL)
|
||||
fb.add_child(gl)
|
||||
if not owned:
|
||||
var bb := UiKit.button("解锁 %d 钥石" % int(fg.get("price", 0)), 0.0) # 行板紧凑钮豁免
|
||||
bb.pressed.connect(func(): tree_buy_requested.emit(String(fg.get("node_id", ""))))
|
||||
bb.disabled = not bool(fg.get("can_buy", false))
|
||||
fb.add_child(bb)
|
||||
_tree_buy_btns.append({"node_id": String(fg.get("node_id", "")), "btn": bb})
|
||||
else:
|
||||
for side_row in (fg.get("sides", []) as Array):
|
||||
var sd := String(side_row.get("side", ""))
|
||||
var sb := UiKit.button(String(side_row.get("display_name", sd)), 0.0) # 行板紧凑钮豁免
|
||||
sb.pressed.connect(func(): tree_fork_toggled.emit(group, sd))
|
||||
fb.add_child(sb)
|
||||
_tree_fork_btns.append({"group": group, "side": sd, "btn": sb})
|
||||
return fb
|
||||
|
||||
|
||||
# 工作间钥匙门(锻造工坊/秘宝匣柜台锁定态切换:节点点亮=展开、未点亮=锁定行;
|
||||
# 图鉴常开无门槛。判据读树投影行 level——零核心访问,纯视图)
|
||||
func _refresh_key_gates(data: Dictionary) -> void:
|
||||
var lvl_by_id := {}
|
||||
for row in (data.get("tree", []) as Array):
|
||||
lvl_by_id[String(row.get("node_id", ""))] = int(row.get("level", 0))
|
||||
var forge_open := int(lvl_by_id.get("forge_workshop", 0)) >= 1
|
||||
var ws_open := int(lvl_by_id.get("ks_workshop", 0)) >= 1
|
||||
_forge._forge_lock_l.visible = not forge_open
|
||||
_forge._forge_workbench.visible = forge_open
|
||||
_forge._ws_lock_l.visible = not ws_open
|
||||
_forge._ws_scroll.visible = ws_open
|
||||
|
||||
|
||||
# 锻造工坊行板重建(两区六路线;open_camp/refresh_camp 调用。行结构仿秘宝匣行板:
|
||||
# 件名+等级+解锁态+购买/解锁/选中钮。UI 只发意图信号〔契约 9——零核心写调用、零 MetaProgression
|
||||
# 持有〕;钮禁用=常态防线(余额/未解锁/满级/已选中),兜底拒绝可见归 presenter pattern 1)
|
||||
func _rebuild_forge(data: Dictionary) -> void:
|
||||
for zone in [_forge._forge_zone_weapon, _forge._forge_zone_armor]:
|
||||
for c in zone.get_children():
|
||||
c.queue_free()
|
||||
_forge._forge_rows.clear()
|
||||
if not _forge._forge_workbench.visible:
|
||||
return # 锁定态(钥匙未点亮):零行板零购买路径——占位纪律延续
|
||||
var bal := int(data.get("balance", 0))
|
||||
for row in data.get("forge", []):
|
||||
var kind := String(row.get("kind", ""))
|
||||
var zone: VBoxContainer = _forge._forge_zone_weapon if kind == "weapon" else _forge._forge_zone_armor
|
||||
var card := _forge_route_card(row, bal)
|
||||
zone.add_child(card["card"])
|
||||
_forge._forge_rows.append(card)
|
||||
|
||||
|
||||
## 锻造行板构建域:单路线卡(件名+等级+状态+购买/解锁/选中钮——并联双通道呈现面)
|
||||
func _forge_route_card(row: Dictionary, bal: int) -> Dictionary:
|
||||
var d := _forge_route_scalars(row)
|
||||
var card := PanelContainer.new()
|
||||
card.add_theme_stylebox_override("panel", UiKit.panel_flat(ROW_PLATE_COL, UiKit.PANEL_BORDER, UiKit.RADIUS_OBJECT, 1, Vector4(10, 4, 10, 4)))
|
||||
var line := HBoxContainer.new()
|
||||
line.add_theme_constant_override("separation", 6)
|
||||
card.add_child(line)
|
||||
var name_l := UiKit.label(String(row.get("display_name", "")), UiKit.FS_HINT, true, UiKit.INK)
|
||||
name_l.custom_minimum_size = Vector2(104, 0)
|
||||
name_l.clip_text = true
|
||||
name_l.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
|
||||
line.add_child(name_l)
|
||||
var lvl_l := UiKit.label("Lv%d/%d" % [d["lvl"], d["cap_v"]], 13, false, UiKit.INK_LABEL)
|
||||
lvl_l.custom_minimum_size = Vector2(44, 0)
|
||||
line.add_child(lvl_l)
|
||||
var status_l := UiKit.label(_forge_status_text(d, row), UiKit.FS_HINT, false, UiKit.STONE_DEEP)
|
||||
status_l.clip_text = true
|
||||
status_l.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
|
||||
status_l.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
line.add_child(status_l)
|
||||
var btns := _forge_route_buttons(d, row, bal, line)
|
||||
return {"card": card, "route_id": d["rid"], "name_l": name_l, "lvl_l": lvl_l, "status_l": status_l,
|
||||
"buy_btn": btns["buy_btn"], "unlock_btn": btns["unlock_btn"], "select_btn": btns["select_btn"],
|
||||
"next_price": d["next_price"], "unlock_price": d["unlock_price"]}
|
||||
|
||||
|
||||
## 锻造行标量束:路线 id/解锁态/初始持有/等级/cap/几何价/解锁价一次取数
|
||||
func _forge_route_scalars(row: Dictionary) -> Dictionary:
|
||||
return {
|
||||
"rid": String(row.get("route_id", "")),
|
||||
"unlocked": bool(row.get("unlocked", false)),
|
||||
"initial": bool(row.get("initial_owned", false)),
|
||||
"lvl": int(row.get("level", 0)),
|
||||
"cap_v": int(row.get("cap", 0)),
|
||||
"next_price": int(row.get("next_price", 0)),
|
||||
"unlock_price": int(row.get("unlock_price", 0)),
|
||||
}
|
||||
|
||||
|
||||
## 状态文案域(并联双通道:练满前一档 or 一次性解锁价直购;已满级态)
|
||||
func _forge_status_text(d: Dictionary, row: Dictionary) -> String:
|
||||
var st_text := "已解锁"
|
||||
if not d["unlocked"]:
|
||||
if d["initial"]:
|
||||
st_text = "未解锁"
|
||||
else:
|
||||
st_text = "未解锁 · 练满%s 或 %d 钥石直购" % [String(row.get("prereq_name", "")), d["unlock_price"]]
|
||||
elif d["lvl"] >= d["cap_v"]:
|
||||
st_text = "已满级"
|
||||
return st_text
|
||||
|
||||
|
||||
## 三钮域:购买(已解锁未满级——余额不足禁用)/解锁(待解锁非初始——余额不足禁用)/选中(已解锁——当前=禁用态标记)
|
||||
func _forge_route_buttons(d: Dictionary, row: Dictionary, bal: int, line: HBoxContainer) -> Dictionary:
|
||||
var buy_btn: Button = null
|
||||
if d["unlocked"] and d["lvl"] < d["cap_v"]:
|
||||
buy_btn = UiKit.button("锻造 %d" % d["next_price"], 0.0) # 行板紧凑钮豁免
|
||||
buy_btn.pressed.connect(forge_buy_requested.emit.bind(d["rid"]))
|
||||
buy_btn.disabled = bal < d["next_price"]
|
||||
line.add_child(buy_btn)
|
||||
var unlock_btn: Button = null
|
||||
if not d["unlocked"] and not d["initial"]:
|
||||
unlock_btn = UiKit.button("解锁 %d" % d["unlock_price"], 0.0) # 行板紧凑钮豁免
|
||||
unlock_btn.pressed.connect(forge_unlock_requested.emit.bind(d["rid"]))
|
||||
unlock_btn.disabled = bal < d["unlock_price"]
|
||||
line.add_child(unlock_btn)
|
||||
var select_btn: Button = null
|
||||
if d["unlocked"]:
|
||||
var sel := bool(row.get("selected", false))
|
||||
select_btn = UiKit.button("当前" if sel else "选中", 0.0) # 行板紧凑钮豁免
|
||||
select_btn.pressed.connect(forge_select_requested.emit.bind(d["rid"]))
|
||||
select_btn.disabled = sel
|
||||
line.add_child(select_btn)
|
||||
return {"buy_btn": buy_btn, "unlock_btn": unlock_btn, "select_btn": select_btn}
|
||||
|
||||
|
||||
# 打开营地(全量重建四柜台行 + 同调装配段 + 最近冒险;树段与钥匙门随 refresh_camp 重建——
|
||||
# 数据 = 组合根 _camp_data() 投影)
|
||||
func open_camp(data: Dictionary) -> void:
|
||||
_rebuild_workshop(data) # 段尾链 _rebuild_attune(同调装配段+Y 升级行随秘宝匣柜台内容)
|
||||
_rebuild_forge(data) # 锻造工坊两区六路线行板
|
||||
_rebuild_recent(data)
|
||||
refresh_camp(data)
|
||||
visible = true
|
||||
|
||||
|
||||
# 状态重刷(购买后调用——余额/树行板/钥匙门/工坊状态就地重建或改文案;树行板随刷重建=按钮
|
||||
# 禁用态与门槛/cap 同步,12 行重建开销可忽略)
|
||||
func refresh_camp(data: Dictionary) -> void:
|
||||
var balance := int(data.get("balance", 0))
|
||||
_balance_label.text = "钥石 %d" % balance
|
||||
_rebuild_tree(data)
|
||||
_refresh_key_gates(data)
|
||||
_rebuild_forge(data) # 行板随刷重建(购买/解锁/选中后等级/价/禁用态同步)
|
||||
_refresh_workshop_rows(data, balance)
|
||||
_refresh_attune_segment(data, balance)
|
||||
|
||||
|
||||
## 秘宝匣行板刷新域:进度列(解锁混合制三形态)与状态色(亮板双色墨制)与购买钮余额联动
|
||||
func _refresh_workshop_rows(data: Dictionary, balance: int) -> void:
|
||||
var ws_by_id := {}
|
||||
for row in data.get("workshop", []):
|
||||
ws_by_id[String(row.get("item_id", ""))] = row
|
||||
for card in _workshop_rows:
|
||||
var row: Dictionary[Variant, Variant] = ws_by_id.get(String(card.item_id), {})
|
||||
if row.is_empty():
|
||||
continue
|
||||
var unlocked := bool(row.get("unlocked", false))
|
||||
card.progress_l.text = _workshop_progress_text(row, unlocked)
|
||||
# 状态色用亮板双色墨制(深墨族替代暖白族——亮板上暖白不可读)
|
||||
var st_text := "未解锁"
|
||||
var st_col: Color = UiKit.STONE_DEEP
|
||||
if unlocked:
|
||||
st_text = "已解锁"
|
||||
st_col = UiKit.GOLD_INK # GOLD_DEEP 对行板 3.00:1 越带,换深金墨 5.84:1
|
||||
card.status_l.text = st_text
|
||||
card.status_l.add_theme_color_override("font_color", st_col)
|
||||
card.status_l.tooltip_text = st_text # 截断兜底(状态列 EXPAND_FILL 吸余宽——悬停看全文)
|
||||
# 购买钮余额联动(禁用态=余额不足,常态防线;pattern 1 兜底拒绝可见归 presenter)
|
||||
if card.get("buy_btn") != null:
|
||||
card.buy_btn.disabled = balance < int(card.get("price", 0))
|
||||
|
||||
|
||||
## 进度列文案域(解锁混合制三形态:钥石购买价/条件进度拼接/已入手)
|
||||
func _workshop_progress_text(row: Dictionary, unlocked: bool) -> String:
|
||||
if unlocked:
|
||||
return "已入手"
|
||||
var mode := String(row.get("mode", ""))
|
||||
if mode == "keystone":
|
||||
return "钥石 %d" % int(row.get("price", 0))
|
||||
if mode == "condition":
|
||||
var parts: Array[String] = []
|
||||
for req_v in (row.get("reqs", []) as Array):
|
||||
var req: Dictionary[Variant, Variant] = req_v as Dictionary
|
||||
var lbl := String(UiKit.TREASURE_REQ_LABELS.get(String(req.get("key", "")), "条件"))
|
||||
parts.append("%s %d/%d" % [lbl, int(req.get("progress", 0)), int(req.get("threshold", 0))])
|
||||
return "、".join(parts)
|
||||
return ""
|
||||
|
||||
|
||||
## 同调装配段刷新域(Slots 点亮/满位禁选/Y 升级行余额联动——就地刷)
|
||||
func _refresh_attune_segment(data: Dictionary, balance: int) -> void:
|
||||
var att: Dictionary[Variant, Variant] = data.get("attune", {})
|
||||
if _attune._attune_header_l != null:
|
||||
var slots_n := int(att.get("slots", 0))
|
||||
var eq: Array[Variant] = att.get("equipped", [])
|
||||
_attune._attune_header_l.text = "── 同调装配 Slots %d/%d ──" % [eq.size(), slots_n]
|
||||
var eq_set := {}
|
||||
for v in eq:
|
||||
eq_set[String(v)] = true
|
||||
for card2 in _attune._attune_btns:
|
||||
var on: bool = eq_set.has(String(card2.item_id))
|
||||
card2.btn.text = "卸下" if on else "装配"
|
||||
# 满位禁选+未解锁禁装(已装件恒可卸下;unlocked 快照随 rebuild 刷新)
|
||||
card2.btn.disabled = (not on and eq.size() >= slots_n) or (not on and not bool(card2.get("unlocked", false)))
|
||||
if _side._refresh_l != null:
|
||||
var rf: Dictionary[Variant, Variant] = att.get("refresh", {})
|
||||
_side._refresh_l.text = "三选一刷新 +%d 次/冒险 · Lv%d" % [int(rf.get("charges", 0)), int(rf.get("level", 0))]
|
||||
_side._refresh_btn.text = "已满级" if bool(rf.get("maxed", false)) else "升级 %d 钥石" % int(rf.get("price", 0))
|
||||
_side._refresh_btn.disabled = bool(rf.get("maxed", false)) or balance < int(rf.get("price", 0))
|
||||
|
||||
|
||||
func _rebuild_workshop(data: Dictionary) -> void:
|
||||
_workshop_rows.clear()
|
||||
for child in _workshop_holder.get_children():
|
||||
child.queue_free()
|
||||
_attune._attune_nodes.clear()
|
||||
_attune._attune_btns.clear()
|
||||
_attune._attune_header_l = null
|
||||
_side._refresh_l = null
|
||||
_side._refresh_btn = null
|
||||
for row in data.get("workshop", []):
|
||||
var card := _workshop_card(row)
|
||||
_workshop_holder.add_child(card["card"])
|
||||
_workshop_rows.append(card)
|
||||
_rebuild_attune(data)
|
||||
|
||||
|
||||
## 秘宝匣行板构建域:件名(分档后缀+效果摘要悬停)+进度列+状态列+钥石购买钮(购买件未解锁在列)
|
||||
func _workshop_card(row: Dictionary) -> Dictionary:
|
||||
var card := PanelContainer.new()
|
||||
card.add_theme_stylebox_override("panel", UiKit.panel_flat(ROW_PLATE_COL, UiKit.PANEL_BORDER,UiKit.RADIUS_OBJECT, 1, Vector4(10, 4, 10, 4)))
|
||||
var line := HBoxContainer.new()
|
||||
line.add_theme_constant_override("separation", 12)
|
||||
card.add_child(line)
|
||||
var tier_name := String(UiKit.TREASURE_TIER_LABELS.get(String(row.get("tier", "")), ""))
|
||||
var name_l := UiKit.label(String(row.get("display_name", "")) + ("·" + tier_name if tier_name != "" else ""),UiKit.FS_HINT, true, UiKit.INK)
|
||||
name_l.custom_minimum_size = Vector2(132, 0)
|
||||
name_l.clip_text = true
|
||||
name_l.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
|
||||
name_l.tooltip_text = String(row.get("desc", "")) # 件效果摘要悬停可见(分档呈现契约——槽位档位=名后缀)
|
||||
line.add_child(name_l)
|
||||
var progress_l := UiKit.label("",UiKit.FS_HINT, false, UiKit.STONE_DEEP) # 同行价格墨同案
|
||||
progress_l.custom_minimum_size = Vector2(150, 0)
|
||||
progress_l.clip_text = true # 营地溢出修——文字全宽不撑柜
|
||||
progress_l.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
|
||||
line.add_child(progress_l)
|
||||
# 状态色用亮板双色墨制(深墨族替代暖白族)——色随刷新态条件赋值,非机械两行式
|
||||
var status_l := UiKit.label("",UiKit.FS_HINT, true, UiKit.STONE_DEEP)
|
||||
status_l.clip_text = true # 同上——「已解锁 · 能力封存中」不撑柜(余宽吸收者)
|
||||
status_l.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
|
||||
status_l.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
line.add_child(status_l)
|
||||
# 钥石购买钮(购买件且未解锁时在列;写口唯一=buy_treasure_unlock,
|
||||
# 经 buy_requested(item_id) 信号走 presenter 分支;禁用态=余额不足)
|
||||
var buy_btn: Button = null
|
||||
if not bool(row.get("unlocked", false)) and String(row.get("mode", "")) == "keystone":
|
||||
buy_btn = UiKit.button("购买 %d" % int(row.get("price", 0)), 0.0) # 行板紧凑钮豁免
|
||||
buy_btn.pressed.connect(_emit_buy_requested.bind(String(row.get("item_id", ""))))
|
||||
line.add_child(buy_btn)
|
||||
return {"item_id": String(row.get("item_id", "")), "progress_l": progress_l, "status_l": status_l, "buy_btn": buy_btn, "price": int(row.get("price", 0)), "unlocked": bool(row.get("unlocked", false)), "card": card}
|
||||
|
||||
|
||||
# 同调装配段重建(秘宝匣柜台尾部段;Slots 点亮+
|
||||
# 九件行板+Y 升级行,程序占位面)
|
||||
func _rebuild_attune(data: Dictionary) -> void:
|
||||
var att: Dictionary[Variant, Variant] = data.get("attune", {})
|
||||
_attune._attune_header_l = UiKit.label("",UiKit.FS_HINT, true, UiKit.INK)
|
||||
_workshop_holder.add_child(_attune._attune_header_l)
|
||||
_attune._attune_nodes.append(_attune._attune_header_l)
|
||||
for row in att.get("items", []):
|
||||
var line := _attune_item_line(row)
|
||||
_workshop_holder.add_child(line)
|
||||
_attune._attune_nodes.append(line)
|
||||
_refresh_attune_tail(att)
|
||||
|
||||
|
||||
## 同调件行板构建域:件名+形态+档位+装配切换钮(未解锁禁装——toggle 写口同守卫)
|
||||
func _attune_item_line(row: Dictionary) -> HBoxContainer:
|
||||
var iid := String(row.get("item_id", ""))
|
||||
var line := HBoxContainer.new()
|
||||
line.add_theme_constant_override("separation", 6)
|
||||
var name_l := UiKit.label(String(row.get("display_name", "")),UiKit.FS_HINT, true, UiKit.INK)
|
||||
name_l.custom_minimum_size = Vector2(96, 0)
|
||||
name_l.clip_text = true
|
||||
name_l.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
|
||||
line.add_child(name_l)
|
||||
var form_l := UiKit.label("被动" if String(row.get("form", "")) == "passive" else "主动·充能",UiKit.FS_CAPTION, false, UiKit.STONE_DEEP)
|
||||
form_l.custom_minimum_size = Vector2(58, 0)
|
||||
line.add_child(form_l)
|
||||
# 档位标签(槽位档位显示:件档=普通/优秀/稀有,装入须件档≤格档契约 2 的呈现半边)
|
||||
var tier_l := UiKit.label(String(UiKit.TREASURE_TIER_LABELS.get(String(row.get("tier", "")), "—")),UiKit.FS_CAPTION, false, UiKit.STONE_DEEP)
|
||||
tier_l.custom_minimum_size = Vector2(36, 0)
|
||||
line.add_child(tier_l)
|
||||
var btn := UiKit.button("装配", 0.0) # 行板紧凑钮豁免
|
||||
btn.pressed.connect(attune_toggled.emit.bind(iid))
|
||||
btn.disabled = not bool(row.get("unlocked", false)) # 未解锁禁装(解锁为装配前置——toggle 写口同守卫)
|
||||
line.add_child(btn)
|
||||
_attune._attune_btns.append({"item_id": iid, "btn": btn, "unlocked": bool(row.get("unlocked", false)), "equipped": bool(row.get("equipped", false))})
|
||||
return line
|
||||
|
||||
|
||||
## Y 升级尾行构建域(双入口之一——树上 ks_refresh 同账)
|
||||
func _refresh_attune_tail(att: Dictionary) -> void:
|
||||
var refresh_line := HBoxContainer.new()
|
||||
refresh_line.add_theme_constant_override("separation", 6)
|
||||
_side._refresh_l = UiKit.label("",UiKit.FS_CAPTION, false, UiKit.STONE_DEEP)
|
||||
refresh_line.add_child(_side._refresh_l)
|
||||
_side._refresh_btn = UiKit.button("升级", 0.0) # 行板紧凑钮豁免
|
||||
_side._refresh_btn.pressed.connect(_emit_buy_requested.bind("attune_refresh"))
|
||||
refresh_line.add_child(_side._refresh_btn)
|
||||
_workshop_holder.add_child(refresh_line)
|
||||
_attune._attune_nodes.append(refresh_line)
|
||||
|
||||
|
||||
func _rebuild_recent(data: Dictionary) -> void:
|
||||
var lines: Array[String] = []
|
||||
var recent: Array[Variant] = data.get("recent", [])
|
||||
if recent.is_empty():
|
||||
lines.append(" 最近冒险:(暂无记录——完成或结束一次冒险后入账)")
|
||||
for s in recent:
|
||||
var verdict := "失败"
|
||||
if String(s.get("result", "")) == "completed":
|
||||
verdict = "完成"
|
||||
elif String(s.get("result", "")) == "abandoned":
|
||||
verdict = "放弃"
|
||||
lines.append("最近冒险:%s · 完成 %d 关 · 钥石 +%d · 种子 %d" % [verdict,
|
||||
int(s.get("levels_cleared", 0)), int(s.get("keystone_total", 0)), int(s.get("master_seed", 0))])
|
||||
_side._recent_list.text = " | ".join(lines)
|
||||
|
||||
|
||||
func _emit_closed() -> void:
|
||||
closed.emit()
|
||||
|
||||
|
||||
func _emit_buy_requested(attr: String) -> void:
|
||||
buy_requested.emit(attr)
|
||||
@@ -1 +0,0 @@
|
||||
uid://dvg2wmjh87p8a
|
||||
@@ -0,0 +1,17 @@
|
||||
## 营地刷新单口:各写口尾→现开界面刷新+场景根 HUD 刷新一闸完成(卡⑤ HUD 同口挂接)。
|
||||
## 非 autoload、非信号广播——组合根单点推送(组合根建件绑册,presenter 经 context 持引用;
|
||||
## 卡④ 契约 4:写口语义零改,只改路由形态)。
|
||||
class_name CampRefreshBus
|
||||
extends RefCounted
|
||||
|
||||
var _targets: Array[Control] = [] # 可刷面册(四子界面+卡⑤ HUD 栏——均带 refresh_camp(data))
|
||||
|
||||
|
||||
func bind_targets(targets: Array[Control]) -> void:
|
||||
_targets = targets
|
||||
|
||||
|
||||
func refresh(camp_data: Dictionary) -> void:
|
||||
for t in _targets:
|
||||
if t != null and t.visible and t.has_method("refresh_camp"):
|
||||
t.refresh_camp(camp_data) # 现开界面就地重刷(未开的零开销——留底形态下场景根恒开)
|
||||
@@ -0,0 +1 @@
|
||||
uid://cdfmyxf87n6f6
|
||||
@@ -0,0 +1,309 @@
|
||||
## 营地场景图视图(交互式营地):10 层贴图铺底+七物件命中区+点选反馈四态+顶栏预留位。
|
||||
## 布局唯一事实源 = db.presentation.camp_scene_layout(构造注入,本视图禁自载表路径);
|
||||
## 子节点序 = 表内数组序 = z 序(Control 根+TextureRect 层——禁 CanvasLayer/z_index/Sprite2D)。
|
||||
## 输入单点:根 _gui_input 集中命中判定(层节点全 IGNORE),点击只发 object_pressed 信号,路由归组合根。
|
||||
## 零核心写调用:视图不读 MetaProgression,禁用态由组合根经 set_feedback_state 推送。
|
||||
class_name CampSceneView
|
||||
extends Control
|
||||
|
||||
signal object_pressed(key: StringName) ## 命中区点击确认(press+release 同区且非禁用;组合根路由开界面/动线)
|
||||
|
||||
## 名牌文案(camp.md §场景构成绑定表——七可点件按界面名逐字)
|
||||
const _HOTSPOT_NAMES := {
|
||||
&"gate": "冒险", &"forge": "锻造工坊", &"chest": "秘宝匣", &"dummy": "天赋树",
|
||||
&"board": "奖励格图鉴", &"notebook": "生涯记录", &"campfire": "离开营地",
|
||||
}
|
||||
## 层键→纹理路径(单点 = UiKit.TEX_CAMP_*,本表只引用不自写路径;缺位 load_tex→null→程序化占位)
|
||||
const _TEX_BY_KEY := {
|
||||
&"bg": UiKit.TEX_CAMP_BG, &"wall": UiKit.TEX_CAMP_WALL, &"board": UiKit.TEX_CAMP_BOARD,
|
||||
&"gate": UiKit.TEX_CAMP_GATE, &"dummy": UiKit.TEX_CAMP_DUMMY, &"forge": UiKit.TEX_CAMP_FORGE,
|
||||
&"tent": UiKit.TEX_CAMP_TENT, &"chest": UiKit.TEX_CAMP_CHEST,
|
||||
&"notebook": UiKit.TEX_CAMP_NOTEBOOK, &"campfire": UiKit.TEX_CAMP_CAMPFIRE,
|
||||
}
|
||||
## 禁用态去饱和着色器(modulate 只能调明度——降明度+去饱和走 canvas_item shader,零新素材)
|
||||
const _DESAT_SHADER_SRC := "
|
||||
shader_type canvas_item;
|
||||
uniform float strength : hint_range(0.0, 1.0) = 1.0;
|
||||
void fragment() {
|
||||
vec4 tex = texture(TEXTURE, UV);
|
||||
float g = dot(tex.rgb, vec3(0.299, 0.587, 0.114));
|
||||
tex.rgb = mix(tex.rgb, vec3(g) * 0.72, strength);
|
||||
COLOR = tex * COLOR;
|
||||
}
|
||||
"
|
||||
|
||||
enum FeedbackState { NORMAL, HOVER, PRESSED, DISABLED } ## 点选反馈四态(camp.md §点选反馈)
|
||||
|
||||
var _layout: CampSceneLayoutTable # 布局表(坐标唯一事实源)
|
||||
var _layer_nodes: Dictionary[StringName, Control] = {} # 层键→TextureRect/ColorRect 占位(子节点序=z 序)
|
||||
var _hotspot_rects: Dictionary[StringName, Rect2] = {} # 命中键→Rect2(视图局部坐标=表坐标)
|
||||
var _hotspot_layer: Dictionary[StringName, StringName] = {} # 命中键→层键
|
||||
var _base_states: Dictionary[StringName, int] = {} # 命中键→FeedbackState 值(持久基态——组合根置 DISABLED/NORMAL)
|
||||
var _outline: Panel # 悬停轮廓亮边
|
||||
var _name_label: Label # 物件名牌(下方 8px 居中,画面内钳制)
|
||||
var _hover_key := &"" # 当前悬停命中键(&""=无)
|
||||
var _press_key := &"" # 当前按住命中键
|
||||
var _float_tween: Tween # 悬停浮动补间(逐级整像素吸附,禁 _process 逐帧移 UI)
|
||||
var _desat_mat: ShaderMaterial # 禁用态共享材质(strength 恒 1,材质挂/摘承载开关)
|
||||
var _hud_slot: Control # 顶栏预留位(卡⑤ set_hud_band 填值)
|
||||
var hud_band: Control # 顶栏 HUD 栏句柄(卡⑤ CampHudBand——装配后 bus 目标册取用面)
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
visible = false # 登记模态初始隐(开合走栈——模态纪律;boot 态场景根不得盖菜单)
|
||||
|
||||
|
||||
func setup_layers(layout: CampSceneLayoutTable) -> void:
|
||||
if layout == null:
|
||||
push_error("[CampSceneView] 布局表缺位——组合根须注入 db.presentation.camp_scene_layout")
|
||||
return
|
||||
_layout = layout
|
||||
mouse_filter = Control.MOUSE_FILTER_STOP # 场景图=营地语境主交互面(模态层在兄弟位先截事件)
|
||||
_build_desat_material()
|
||||
for spec in layout.layers:
|
||||
var node: Control = _build_layer_node(spec)
|
||||
add_child(node)
|
||||
_layer_nodes[spec.key] = node
|
||||
_build_outline()
|
||||
_build_name_label()
|
||||
_build_hud_slot(layout)
|
||||
mouse_exited.connect(_on_mouse_exited) # 悬出根控件=清 hover/press(防态悬挂)
|
||||
|
||||
|
||||
func bind_hotspots(layout: CampSceneLayoutTable) -> void:
|
||||
if layout == null:
|
||||
return
|
||||
for spec in layout.layers:
|
||||
if spec.is_clickable():
|
||||
_hotspot_rects[spec.hotspot_key] = spec.hotspot
|
||||
_hotspot_layer[spec.hotspot_key] = spec.key
|
||||
_base_states[spec.hotspot_key] = FeedbackState.NORMAL
|
||||
|
||||
|
||||
func get_hotspot_rect(key: StringName) -> Rect2:
|
||||
var rect: Rect2 = _hotspot_rects.get(key, Rect2())
|
||||
return rect
|
||||
|
||||
|
||||
func set_feedback_state(key: StringName, state: FeedbackState) -> void:
|
||||
if not _base_states.has(key):
|
||||
return
|
||||
_base_states[key] = state # 持久基态只收 NORMAL/DISABLED;HOVER/PRESSED 为视图内瞬态
|
||||
_apply_state(key, _base_state(key))
|
||||
|
||||
|
||||
func set_hud_band(band: Control) -> void:
|
||||
if _hud_slot != null:
|
||||
_hud_slot.add_child(band)
|
||||
hud_band = band
|
||||
|
||||
|
||||
func _gui_input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseMotion:
|
||||
_handle_motion(event as InputEventMouseMotion)
|
||||
elif event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT:
|
||||
_handle_button(event as InputEventMouseButton)
|
||||
accept_event()
|
||||
|
||||
|
||||
func _handle_motion(event: InputEventMouseMotion) -> void:
|
||||
var key: StringName = _topmost_hotspot_at(event.position)
|
||||
if key != _hover_key:
|
||||
if _hover_key != &"":
|
||||
_apply_state(_hover_key, _base_state(_hover_key))
|
||||
_hover_key = key
|
||||
if key != &"":
|
||||
_apply_state(key, FeedbackState.HOVER)
|
||||
if _press_key != &"" and key != _press_key:
|
||||
_apply_state(_press_key, _base_state(_press_key)) # 按住拖出=取消按压
|
||||
_press_key = &""
|
||||
|
||||
|
||||
func _handle_button(event: InputEventMouseButton) -> void:
|
||||
var hit: StringName = _topmost_hotspot_at(event.position)
|
||||
if event.pressed:
|
||||
if hit != &"":
|
||||
_press_key = hit
|
||||
_apply_state(hit, FeedbackState.PRESSED)
|
||||
return
|
||||
if _press_key == &"":
|
||||
return
|
||||
if hit == _press_key and not _is_disabled(_press_key):
|
||||
object_pressed.emit(_press_key)
|
||||
_apply_state(_press_key, _base_state(_press_key))
|
||||
_press_key = &""
|
||||
|
||||
|
||||
func _build_layer_node(spec: CampSceneLayerSpec) -> Control:
|
||||
var node: Control = null
|
||||
var tex: Texture2D = UiKit.load_tex(_TEX_BY_KEY.get(spec.key, ""))
|
||||
if tex != null:
|
||||
var tr := TextureRect.new()
|
||||
tr.texture = tex
|
||||
tr.stretch_mode = TextureRect.STRETCH_SCALE
|
||||
node = tr
|
||||
else:
|
||||
var ph := ColorRect.new() # 程序化占位(素材缺位=冷检出半同步态,结构在位冒烟安全)
|
||||
ph.color = Color(1.0, 1.0, 1.0, 0.06)
|
||||
node = ph
|
||||
node.name = "Layer_%s" % spec.key
|
||||
node.position = spec.texture_rect.position
|
||||
node.size = spec.texture_rect.size
|
||||
node.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
return node
|
||||
|
||||
|
||||
func _build_desat_material() -> void:
|
||||
_desat_mat = ShaderMaterial.new()
|
||||
var shader := Shader.new()
|
||||
shader.code = _DESAT_SHADER_SRC
|
||||
_desat_mat.shader = shader
|
||||
|
||||
|
||||
func _build_outline() -> void:
|
||||
_outline = Panel.new()
|
||||
var sb := StyleBoxFlat.new()
|
||||
sb.draw_center = false
|
||||
sb.border_color = UiKit.CANDLE
|
||||
sb.set_border_width_all(2)
|
||||
sb.set_corner_radius_all(4)
|
||||
_outline.add_theme_stylebox_override("panel", sb)
|
||||
_outline.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
_outline.visible = false
|
||||
add_child(_outline)
|
||||
|
||||
|
||||
func _build_name_label() -> void:
|
||||
_name_label = UiKit.label("", UiKit.FS_HINT, false, UiKit.INK_ON_DEEP)
|
||||
var plate := StyleBoxFlat.new()
|
||||
plate.bg_color = UiKit.BG_ROOT
|
||||
plate.set_corner_radius_all(4)
|
||||
plate.content_margin_left = 8.0
|
||||
plate.content_margin_right = 8.0
|
||||
plate.content_margin_top = 2.0
|
||||
plate.content_margin_bottom = 2.0
|
||||
_name_label.add_theme_stylebox_override("normal", plate)
|
||||
_name_label.mouse_filter = Control.MOUSE_FILTER_IGNORE # 名牌不挡命中区
|
||||
_name_label.visible = false
|
||||
add_child(_name_label)
|
||||
|
||||
|
||||
func _build_hud_slot(layout: CampSceneLayoutTable) -> void:
|
||||
_hud_slot = Control.new()
|
||||
_hud_slot.name = "HudBandSlot"
|
||||
_hud_slot.set_anchors_preset(Control.PRESET_TOP_WIDE)
|
||||
_hud_slot.custom_minimum_size = Vector2(0, layout.hud_band_h) # 48px 浮层覆盖,不挤压画面
|
||||
_hud_slot.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
add_child(_hud_slot)
|
||||
|
||||
|
||||
func _topmost_hotspot_at(pos: Vector2) -> StringName:
|
||||
if _layout == null:
|
||||
return &""
|
||||
var idx: int = _layout.layers.size() - 1 # 逆序=自最上 z 向下
|
||||
while idx >= 0:
|
||||
var spec: CampSceneLayerSpec = _layout.layers[idx]
|
||||
if spec.is_clickable() and _hotspot_rects.get(spec.hotspot_key, Rect2()).has_point(pos):
|
||||
return spec.hotspot_key
|
||||
idx -= 1
|
||||
return &""
|
||||
|
||||
|
||||
func _base_state(key: StringName) -> FeedbackState:
|
||||
var st: int = _base_states.get(key, FeedbackState.NORMAL)
|
||||
return FeedbackState.DISABLED if st == FeedbackState.DISABLED else FeedbackState.NORMAL
|
||||
|
||||
|
||||
func _is_disabled(key: StringName) -> bool:
|
||||
return _base_state(key) == FeedbackState.DISABLED
|
||||
|
||||
|
||||
func _apply_state(key: StringName, state: FeedbackState) -> void:
|
||||
var layer_key: StringName = _hotspot_layer.get(key, &"")
|
||||
var node: Control = _layer_nodes.get(layer_key, null)
|
||||
if node == null:
|
||||
return
|
||||
var rect: Rect2 = _hotspot_rects.get(key, Rect2())
|
||||
var base_y: float = node.position.y - _float_offset_of(key) # 还原到基准位再施新态
|
||||
_set_float_offset(key, 0)
|
||||
if _float_tween != null:
|
||||
_float_tween.kill()
|
||||
_float_tween = null
|
||||
match state:
|
||||
FeedbackState.NORMAL:
|
||||
node.material = null
|
||||
_outline.visible = false
|
||||
_name_label.visible = false
|
||||
FeedbackState.HOVER:
|
||||
_apply_hover(key, node, rect)
|
||||
FeedbackState.PRESSED:
|
||||
node.position.y = base_y + 1.0 # 按下=位移 1px
|
||||
FeedbackState.DISABLED:
|
||||
_apply_disabled(node)
|
||||
|
||||
|
||||
func _apply_hover(key: StringName, node: Control, rect: Rect2) -> void:
|
||||
if _is_disabled(key):
|
||||
_apply_disabled(node)
|
||||
return
|
||||
node.material = null
|
||||
_outline.position = rect.position
|
||||
_outline.size = rect.size
|
||||
_outline.visible = true
|
||||
_show_name_plate(key, rect)
|
||||
_run_float(key) # 悬停浮动(整像素逐级吸附)
|
||||
|
||||
|
||||
func _apply_disabled(node: Control) -> void:
|
||||
node.material = _desat_mat # 降明度+去饱和(shader;仅锻炉/宝箱会有此态)
|
||||
_outline.visible = false
|
||||
_name_label.visible = false
|
||||
|
||||
|
||||
func _run_float(key: StringName) -> void:
|
||||
_float_tween = create_tween()
|
||||
for step in 4:
|
||||
var off := -1 - step
|
||||
_float_tween.tween_callback(_set_float_offset.bind(key, off)).set_delay(UiKit.motion(0.03))
|
||||
# 悬离时由 _apply_state(NORMAL) 先归零位——本补间只承载升浮
|
||||
|
||||
|
||||
func _set_float_offset(key: StringName, off: int) -> void:
|
||||
var layer_key: StringName = _hotspot_layer.get(key, &"")
|
||||
var node: Control = _layer_nodes.get(layer_key, null)
|
||||
if node == null or _layout == null:
|
||||
return
|
||||
for spec in _layout.layers:
|
||||
if spec.key == layer_key:
|
||||
node.position.y = spec.texture_rect.position.y + float(off)
|
||||
return
|
||||
|
||||
|
||||
func _float_offset_of(key: StringName) -> float:
|
||||
var layer_key: StringName = _hotspot_layer.get(key, &"")
|
||||
var node: Control = _layer_nodes.get(layer_key, null)
|
||||
if node == null or _layout == null:
|
||||
return 0.0
|
||||
for spec in _layout.layers:
|
||||
if spec.key == layer_key:
|
||||
return node.position.y - spec.texture_rect.position.y
|
||||
return 0.0
|
||||
|
||||
|
||||
func _show_name_plate(key: StringName, rect: Rect2) -> void:
|
||||
_name_label.text = String(_HOTSPOT_NAMES.get(key, ""))
|
||||
_name_label.visible = true
|
||||
_name_label.reset_size()
|
||||
var pos := Vector2.ZERO
|
||||
pos.x = clampf(rect.get_center().x - _name_label.size.x / 2.0, 0.0, _layout.canvas.x - _name_label.size.x)
|
||||
pos.y = minf(rect.end.y + 8.0, _layout.canvas.y - _name_label.size.y) # 贴底物件防出画(画面内钳制)
|
||||
_name_label.position = pos
|
||||
|
||||
|
||||
func _on_mouse_exited() -> void:
|
||||
if _hover_key != &"":
|
||||
_apply_state(_hover_key, _base_state(_hover_key))
|
||||
_hover_key = &""
|
||||
if _press_key != &"":
|
||||
_apply_state(_press_key, _base_state(_press_key))
|
||||
_press_key = &""
|
||||
@@ -0,0 +1 @@
|
||||
uid://btsrctv5ddx16
|
||||
@@ -0,0 +1,88 @@
|
||||
## 营地子界面模态壳基类(锻造工坊/秘宝匣/天赋树/奖励格图鉴四子界面公共形态):
|
||||
## 实底全屏暖亮档+石纹暗角+顶栏(铭牌+钥石徽)+内容列+底栏返回钮。
|
||||
## 开合可见性归模态栈(登记层开合一律走栈);返回钮只发 closed——关层编排归 presenter(组合根单口)。
|
||||
## 余额徽随子类 refresh_camp 刷新(钥石读数=投影单口,禁第二账本)。
|
||||
class_name CampSubViewBase
|
||||
extends Control
|
||||
|
||||
signal closed
|
||||
|
||||
var _balance_label: Label # 钥石徽数值行(探针直读面——ui_probe 余额文案断言改指新界面)
|
||||
|
||||
|
||||
## 壳构建(子类 _init 调用一次):content 由子类先建好传入(列容器/滚动容器皆可)
|
||||
func _build_shell(title: String, icon_path: String, content: Control) -> void:
|
||||
# 半透明压暗遮罩 0.6(camp.md v2.3 定稿——场景根留底可见,窗口之下垫遮罩;交互聚焦由遮罩 STOP 兜底)
|
||||
var dim := UiKit._modal_dim(self, Color(UiKit.DIM, 0.6))
|
||||
var margin := MarginContainer.new()
|
||||
margin.set_anchors_preset(Control.PRESET_FULL_RECT)
|
||||
margin.add_theme_constant_override("margin_left", 16)
|
||||
margin.add_theme_constant_override("margin_right", 16)
|
||||
margin.add_theme_constant_override("margin_top", 12)
|
||||
margin.add_theme_constant_override("margin_bottom", 12)
|
||||
dim.add_child(margin)
|
||||
var col := VBoxContainer.new()
|
||||
col.add_theme_constant_override("separation", 8)
|
||||
margin.add_child(col)
|
||||
_build_top_bar(col, title, icon_path)
|
||||
content.size_flags_vertical = Control.SIZE_EXPAND_FILL
|
||||
# 内容米板身(柜台行板对比底=PanelData——旧柜台面板形态延续,行板墨色对比表不脱锚)
|
||||
var body := PanelContainer.new()
|
||||
body.add_theme_stylebox_override("panel",
|
||||
UiKit.panel_flat(UiKit.PANEL_DATA, UiKit.PANEL_BORDER, UiKit.RADIUS_OBJECT, 1, Vector4(10, 10, 10, 10)))
|
||||
body.size_flags_vertical = Control.SIZE_EXPAND_FILL
|
||||
body.add_child(content)
|
||||
col.add_child(body)
|
||||
_build_bottom_bar(col)
|
||||
visible = false # 登记模态初始隐(开合走栈)
|
||||
|
||||
|
||||
## 顶栏域:铭牌(标题)+钥石徽(余额徽单点——子类 refresh_camp 刷新数值行)
|
||||
func _build_top_bar(col: VBoxContainer, title: String, icon_path: String) -> void:
|
||||
var top := HBoxContainer.new()
|
||||
top.add_theme_constant_override("separation", 10)
|
||||
col.add_child(top)
|
||||
var plaque := PanelContainer.new()
|
||||
plaque.add_theme_stylebox_override("panel",
|
||||
UiKit.panel_flat(UiKit.PANEL_DATA, UiKit.PANEL_BORDER, UiKit.RADIUS_OBJECT, 1, Vector4(14, 8, 14, 8)))
|
||||
top.add_child(plaque)
|
||||
var head := HBoxContainer.new()
|
||||
head.add_theme_constant_override("separation", 6)
|
||||
plaque.add_child(head)
|
||||
if icon_path != "":
|
||||
var ic := UiKit.icon_rect(icon_path, 32) # 头带图标缺位 null → 纯文本回退
|
||||
if ic != null:
|
||||
head.add_child(ic)
|
||||
head.add_child(UiKit.label(title, UiKit.FS_TITLE, true, UiKit.INK_TITLE))
|
||||
var spacer := Control.new()
|
||||
spacer.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
top.add_child(spacer)
|
||||
var badge := UiKit.keystone_badge("钥石 0") # UiKit 工厂单点(烛光黄底深墨字)
|
||||
top.add_child(badge)
|
||||
_balance_label = badge.value_label
|
||||
|
||||
|
||||
## 底栏域:返回营地钮(closed 信号——关层编排归 presenter)
|
||||
func _build_bottom_bar(col: VBoxContainer) -> void:
|
||||
var bottom := HBoxContainer.new()
|
||||
bottom.add_theme_constant_override("separation", 10)
|
||||
col.add_child(bottom)
|
||||
var back := UiKit.button("返回营地")
|
||||
back.pressed.connect(_emit_closed)
|
||||
bottom.add_child(back)
|
||||
var spacer2 := Control.new()
|
||||
spacer2.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
bottom.add_child(spacer2)
|
||||
|
||||
|
||||
func open_camp(data: Dictionary) -> void:
|
||||
refresh_camp(data)
|
||||
visible = true # 开可见性由栈承载(本行为开层数据投喂的收尾拍)
|
||||
|
||||
|
||||
func refresh_camp(data: Dictionary) -> void:
|
||||
pass # 子类覆写(余额徽刷新+各自行板/门判据)
|
||||
|
||||
|
||||
func _emit_closed() -> void:
|
||||
closed.emit()
|
||||
@@ -0,0 +1 @@
|
||||
uid://dv0gyjyrtoxkh
|
||||
@@ -18,6 +18,7 @@ var _keystone_badge: UiKit.KeystoneBadge # 钥石余额(badge 工厂件—
|
||||
func _init() -> void:
|
||||
# 全屏页壳(T6/T7 对齐批先例——暖亮底+石纹弱质感+暗角+56px 通栏顶条+内容列)
|
||||
var page: Dictionary[Variant, Variant] = UiKit.page_shell(self, true)
|
||||
page.base.color = Color(UiKit.DIM, 0.6) # 功能窗口化(camp.md v2.3 定稿——场景根留底+半透明压暗遮罩 0.6;观感随样张目检校准)
|
||||
var top: HBoxContainer = page.top_row
|
||||
top.add_child(UiKit.label("生 涯",UiKit.FS_TITLE, true, UiKit.WARM))
|
||||
var top_sp := Control.new()
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
## 奖励格图鉴子界面(自 CampOverlay 图鉴柜台抽出)——占位壳:
|
||||
## 内容保持挂起(用户令冻结,重启须用户另行发令——卡④ 契约 5),点进看占位、不是禁用态。
|
||||
## 锁文照录原柜台锁文并随形态订正『柜台』称谓(L2 记录——零新文案)。
|
||||
class_name CodexView
|
||||
extends CampSubViewBase
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
var holder := VBoxContainer.new()
|
||||
holder.custom_minimum_size = Vector2(0, 336)
|
||||
var lock_l := UiKit.label(" —— 结构位预留:内容排 Alpha(地图战斗资源差异化批)", UiKit.FS_HINT, false, UiKit.STONE_DEEP)
|
||||
lock_l.size_flags_vertical = Control.SIZE_SHRINK_CENTER
|
||||
lock_l.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
lock_l.custom_minimum_size = Vector2(280, 0)
|
||||
holder.add_child(lock_l)
|
||||
var scroll := ScrollContainer.new()
|
||||
scroll.custom_minimum_size = Vector2(300, 336)
|
||||
scroll.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
scroll.horizontal_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED
|
||||
scroll.add_child(holder)
|
||||
_build_shell("奖励格图鉴", UiKit.TEX_ICON_ATLAS, scroll)
|
||||
|
||||
|
||||
func refresh_camp(data: Dictionary) -> void:
|
||||
_balance_label.text = "钥石 %d" % int(data.get("balance", 0)) # 内容挂起——余额徽随刷(占位态无行板)
|
||||
@@ -0,0 +1 @@
|
||||
uid://m1bcfjiceyiq
|
||||
@@ -1,14 +1,18 @@
|
||||
## VERTICAL SLICE - NOT FOR PRODUCTION
|
||||
## 通用确认弹窗:open(text, confirm_label, cancel_label) 双钮外发 confirmed/cancelled。
|
||||
## 通用确认弹窗:open(text, confirm_label, cancel_label) 双钮外发 confirmed/cancelled;
|
||||
## open_three(text, confirm_label, secondary_label, cancel_label) 三钮增设 secondary_confirmed
|
||||
##(营地大门两分支——卡④ T4;双钮调用方零改动:次钮随 open 隐藏)。
|
||||
## 文案与按钮语义装配归调用方——本类零业务触碰。
|
||||
class_name ConfirmDialog
|
||||
extends Control
|
||||
|
||||
signal confirmed
|
||||
signal secondary_confirmed ## 次确认(三钮形态中钮——营地大门「开始新冒险」出口;卡④ T4)
|
||||
signal cancelled
|
||||
|
||||
var _text: Label
|
||||
var _confirm_btn: Button
|
||||
var _secondary_btn: Button
|
||||
var _cancel_btn: Button
|
||||
|
||||
|
||||
@@ -27,6 +31,9 @@ func _init() -> void:
|
||||
_cancel_btn = UiKit.button("取消")
|
||||
_cancel_btn.pressed.connect(_emit_cancelled)
|
||||
btn_row.add_child(_cancel_btn)
|
||||
_secondary_btn = UiKit.button("次选项")
|
||||
_secondary_btn.pressed.connect(_emit_secondary)
|
||||
btn_row.add_child(_secondary_btn)
|
||||
_confirm_btn = UiKit.button("确认")
|
||||
_confirm_btn.pressed.connect(_emit_confirmed)
|
||||
btn_row.add_child(_confirm_btn)
|
||||
@@ -37,12 +44,20 @@ func open(text: String, confirm_label: String, cancel_label: String = "取消")
|
||||
_text.text = text
|
||||
_confirm_btn.text = confirm_label
|
||||
_cancel_btn.text = cancel_label
|
||||
_secondary_btn.visible = false # 双钮形态(次钮隐藏——既有调用方零改动)
|
||||
# z 序纪律:层序唯一事实源=main.LAYER_CONTRACT(树序与登记序同源派生);开合单口
|
||||
# 归组合根 ModalFlow(挂起兜底/遮挡记账/开侧同步)——本类只管文案与显示,不自行抬层
|
||||
|
||||
|
||||
visible = true
|
||||
|
||||
|
||||
## 三钮形态(营地大门有断点分支——继续上一段冒险/开始新冒险/取消;Q5 裁甲)
|
||||
func open_three(text: String, confirm_label: String, secondary_label: String, cancel_label: String) -> void:
|
||||
open(text, confirm_label, cancel_label)
|
||||
_secondary_btn.text = secondary_label
|
||||
_secondary_btn.visible = true
|
||||
|
||||
|
||||
func close() -> void:
|
||||
visible = false
|
||||
|
||||
@@ -55,5 +70,9 @@ func _emit_confirmed() -> void:
|
||||
confirmed.emit()
|
||||
|
||||
|
||||
func _emit_secondary() -> void:
|
||||
secondary_confirmed.emit()
|
||||
|
||||
|
||||
func _emit_cancelled() -> void:
|
||||
cancelled.emit()
|
||||
@@ -0,0 +1,159 @@
|
||||
## 锻造工坊子界面(自 CampOverlay 锻造柜台抽出——承载面迁移,界面逻辑复用零重设计):
|
||||
## 钥匙门(树上 forge_workshop 点亮前锁定态零行板零购买路径;点亮=两区六路线行板)。
|
||||
## UI 只发意图信号(写口唯一归 MetaProgression 锻造写口族);钮禁用=常态防线(余额/未解锁/满级/已选中)。
|
||||
class_name ForgeView
|
||||
extends CampSubViewBase
|
||||
|
||||
signal forge_buy_requested(route_id: String) ## 锻造路线购买意图(写口唯一归 MetaProgression.forge_buy_level)
|
||||
signal forge_unlock_requested(route_id: String) ## 锻造路线解锁意图(写口唯一归 MetaProgression.forge_buy_unlock)
|
||||
signal forge_select_requested(route_id: String) ## 锻造路线选中意图(写口唯一归 MetaProgression.forge_select)
|
||||
|
||||
const ROW_PLATE_COL := UiKit.CAMP_ROW_PLATE
|
||||
|
||||
var _forge_lock_l: Label # 锁定态行(钥匙未点亮)
|
||||
var _forge_workbench: VBoxContainer # 工作间(钥匙点亮后展开——两区六路线行板)
|
||||
var _forge_zone_weapon: VBoxContainer # 武器锻造区行板容器(三路线)
|
||||
var _forge_zone_armor: VBoxContainer # 护甲锻造区行板容器(三路线)
|
||||
var _forge_rows: Array[Dictionary] = [] # [{route_id, name_l, lvl_l, status_l, buy_btn, unlock_btn, select_btn, next_price, unlock_price}](open/refresh 重建;探针消费)
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
var holder := VBoxContainer.new()
|
||||
holder.add_theme_constant_override("separation", 6)
|
||||
holder.custom_minimum_size = Vector2(0, 336)
|
||||
_forge_lock_l = UiKit.label("🔒 锻造工坊未开放\n\n点亮树上「锻造工坊」钥匙节点后展开工作间。\n(钥匙免费、无前置——树上直接点亮)", UiKit.FS_HINT, false, UiKit.STONE_DEEP)
|
||||
_forge_lock_l.size_flags_vertical = Control.SIZE_SHRINK_CENTER
|
||||
_forge_lock_l.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
_forge_lock_l.custom_minimum_size = Vector2(280, 0)
|
||||
_forge_workbench = VBoxContainer.new()
|
||||
_forge_workbench.add_theme_constant_override("separation", 6)
|
||||
_forge_workbench.visible = false # 默认锁定态(钥匙门未判前零行板——门开才建)
|
||||
_forge_zone_weapon = VBoxContainer.new()
|
||||
_forge_zone_weapon.add_theme_constant_override("separation", 4)
|
||||
_forge_zone_armor = VBoxContainer.new()
|
||||
_forge_zone_armor.add_theme_constant_override("separation", 4)
|
||||
var wb_wh := UiKit.label("── 武器锻造区 ──", UiKit.FS_HINT, true, UiKit.GOLD_INK)
|
||||
_forge_workbench.add_child(wb_wh)
|
||||
_forge_workbench.add_child(_forge_zone_weapon)
|
||||
var wb_ah := UiKit.label("── 护甲锻造区 ──", UiKit.FS_HINT, true, UiKit.GOLD_INK)
|
||||
_forge_workbench.add_child(wb_ah)
|
||||
_forge_workbench.add_child(_forge_zone_armor)
|
||||
holder.add_child(_forge_lock_l)
|
||||
holder.add_child(_forge_workbench)
|
||||
var scroll := ScrollContainer.new()
|
||||
scroll.custom_minimum_size = Vector2(300, 336)
|
||||
scroll.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
scroll.horizontal_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED
|
||||
scroll.add_child(holder)
|
||||
_build_shell("锻造工坊", UiKit.TEX_ICON_FORGE, scroll)
|
||||
|
||||
|
||||
func refresh_camp(data: Dictionary) -> void:
|
||||
_balance_label.text = "钥石 %d" % int(data.get("balance", 0))
|
||||
_refresh_key_gate(data)
|
||||
_rebuild_forge(data)
|
||||
|
||||
|
||||
# 工作间钥匙门(树上 forge_workshop 行 level 判据——零核心访问,纯视图读投影)
|
||||
func _refresh_key_gate(data: Dictionary) -> void:
|
||||
var lvl := 0
|
||||
for row in (data.get("tree", []) as Array):
|
||||
if String(row.get("node_id", "")) == "forge_workshop":
|
||||
lvl = int(row.get("level", 0))
|
||||
var open := lvl >= 1
|
||||
_forge_lock_l.visible = not open
|
||||
_forge_workbench.visible = open
|
||||
|
||||
|
||||
# 锻造行板重建(两区六路线;refresh_camp 调用。行结构仿秘宝匣行板:件名+等级+状态+购买/解锁/选中钮)
|
||||
func _rebuild_forge(data: Dictionary) -> void:
|
||||
for zone in [_forge_zone_weapon, _forge_zone_armor]:
|
||||
for c in zone.get_children():
|
||||
c.queue_free()
|
||||
_forge_rows.clear()
|
||||
if not _forge_workbench.visible:
|
||||
return # 锁定态(钥匙未点亮):零行板零购买路径——占位纪律延续
|
||||
var bal := int(data.get("balance", 0))
|
||||
for row in data.get("forge", []):
|
||||
var kind := String(row.get("kind", ""))
|
||||
var zone: VBoxContainer = _forge_zone_weapon if kind == "weapon" else _forge_zone_armor
|
||||
var card := _forge_route_card(row, bal)
|
||||
zone.add_child(card["card"])
|
||||
_forge_rows.append(card)
|
||||
|
||||
|
||||
## 锻造行板构建域:单路线卡(件名+等级+状态+购买/解锁/选中钮——并联双通道呈现面)
|
||||
func _forge_route_card(row: Dictionary, bal: int) -> Dictionary:
|
||||
var d := _forge_route_scalars(row)
|
||||
var card := PanelContainer.new()
|
||||
card.add_theme_stylebox_override("panel", UiKit.panel_flat(ROW_PLATE_COL, UiKit.PANEL_BORDER, UiKit.RADIUS_OBJECT, 1, Vector4(10, 4, 10, 4)))
|
||||
var line := HBoxContainer.new()
|
||||
line.add_theme_constant_override("separation", 6)
|
||||
card.add_child(line)
|
||||
var name_l := UiKit.label(String(row.get("display_name", "")), UiKit.FS_HINT, true, UiKit.INK)
|
||||
name_l.custom_minimum_size = Vector2(104, 0)
|
||||
name_l.clip_text = true
|
||||
name_l.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
|
||||
line.add_child(name_l)
|
||||
var lvl_l := UiKit.label("Lv%d/%d" % [d["lvl"], d["cap_v"]], 13, false, UiKit.INK_LABEL)
|
||||
lvl_l.custom_minimum_size = Vector2(44, 0)
|
||||
line.add_child(lvl_l)
|
||||
var status_l := UiKit.label(_forge_status_text(d, row), UiKit.FS_HINT, false, UiKit.STONE_DEEP)
|
||||
status_l.clip_text = true
|
||||
status_l.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
|
||||
status_l.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
line.add_child(status_l)
|
||||
var btns := _forge_route_buttons(d, row, bal, line)
|
||||
return {"card": card, "route_id": d["rid"], "name_l": name_l, "lvl_l": lvl_l, "status_l": status_l,
|
||||
"buy_btn": btns["buy_btn"], "unlock_btn": btns["unlock_btn"], "select_btn": btns["select_btn"],
|
||||
"next_price": d["next_price"], "unlock_price": d["unlock_price"]}
|
||||
|
||||
|
||||
## 锻造行标量束:路线 id/解锁态/初始持有/等级/cap/几何价/解锁价一次取数
|
||||
func _forge_route_scalars(row: Dictionary) -> Dictionary:
|
||||
return {
|
||||
"rid": String(row.get("route_id", "")),
|
||||
"unlocked": bool(row.get("unlocked", false)),
|
||||
"initial": bool(row.get("initial_owned", false)),
|
||||
"lvl": int(row.get("level", 0)),
|
||||
"cap_v": int(row.get("cap", 0)),
|
||||
"next_price": int(row.get("next_price", 0)),
|
||||
"unlock_price": int(row.get("unlock_price", 0)),
|
||||
}
|
||||
|
||||
|
||||
## 状态文案域(并联双通道:练满前一档 or 一次性解锁价直购;已满级态)
|
||||
func _forge_status_text(d: Dictionary, row: Dictionary) -> String:
|
||||
var st_text := "已解锁"
|
||||
if not d["unlocked"]:
|
||||
if d["initial"]:
|
||||
st_text = "未解锁"
|
||||
else:
|
||||
st_text = "未解锁 · 练满%s 或 %d 钥石直购" % [String(row.get("prereq_name", "")), d["unlock_price"]]
|
||||
elif d["lvl"] >= d["cap_v"]:
|
||||
st_text = "已满级"
|
||||
return st_text
|
||||
|
||||
|
||||
## 三钮域:购买(已解锁未满级——余额不足禁用)/解锁(待解锁非初始——余额不足禁用)/选中(已解锁——当前=禁用态标记)
|
||||
func _forge_route_buttons(d: Dictionary, row: Dictionary, bal: int, line: HBoxContainer) -> Dictionary:
|
||||
var buy_btn: Button = null
|
||||
if d["unlocked"] and d["lvl"] < d["cap_v"]:
|
||||
buy_btn = UiKit.button("锻造 %d" % d["next_price"], 0.0) # 行板紧凑钮豁免
|
||||
buy_btn.pressed.connect(forge_buy_requested.emit.bind(d["rid"]))
|
||||
buy_btn.disabled = bal < d["next_price"]
|
||||
line.add_child(buy_btn)
|
||||
var unlock_btn: Button = null
|
||||
if not d["unlocked"] and not d["initial"]:
|
||||
unlock_btn = UiKit.button("解锁 %d" % d["unlock_price"], 0.0) # 行板紧凑钮豁免
|
||||
unlock_btn.pressed.connect(forge_unlock_requested.emit.bind(d["rid"]))
|
||||
unlock_btn.disabled = bal < d["unlock_price"]
|
||||
line.add_child(unlock_btn)
|
||||
var select_btn: Button = null
|
||||
if d["unlocked"]:
|
||||
var sel := bool(row.get("selected", false))
|
||||
select_btn = UiKit.button("当前" if sel else "选中", 0.0) # 行板紧凑钮豁免
|
||||
select_btn.pressed.connect(forge_select_requested.emit.bind(d["rid"]))
|
||||
select_btn.disabled = sel
|
||||
line.add_child(select_btn)
|
||||
return {"buy_btn": buy_btn, "unlock_btn": unlock_btn, "select_btn": select_btn}
|
||||
@@ -0,0 +1 @@
|
||||
uid://b77xh0e3txmh5
|
||||
@@ -0,0 +1,238 @@
|
||||
## 秘宝匣子界面(自 CampOverlay 秘宝匣柜台抽出——承载面迁移,界面逻辑复用零重设计):
|
||||
## 钥匙门(树上 ks_workshop 点亮前锁定态;点亮=12 件行板+同调装配段+Y 刷新升级行整体迁入)。
|
||||
## UI 只发意图信号(购买写口唯一归 MetaProgression.buy_treasure_unlock / toggle_attunement / buy_attune_refresh)。
|
||||
class_name TreasureView
|
||||
extends CampSubViewBase
|
||||
|
||||
signal buy_requested(attr: String) ## 秘宝购买/Y 刷新升级意图(presenter 按 attr 分派)
|
||||
signal attune_toggled(item_id: String) ## 同调装配切换意图(写口唯一归 MetaProgression.toggle_attunement)
|
||||
|
||||
const ROW_PLATE_COL := UiKit.CAMP_ROW_PLATE
|
||||
|
||||
var _ws_lock_l: Label # 锁定态行(ks_workshop 未点亮)
|
||||
var _ws_scroll: ScrollContainer # 秘宝匣内容容器(钥匙点亮后可见)
|
||||
var _workshop_holder: VBoxContainer # 秘宝匣行板(六行+同调装配段+Y 升级行;探针直读冻结)
|
||||
var _workshop_rows: Array[Dictionary] = [] # [{item_id, progress_l, status_l, buy_btn, price, unlocked, card}](探针消费)
|
||||
var _attune_header_l: Label # 同调装配段(Slots 点亮呈现)
|
||||
var _attune_btns: Array[Dictionary] = [] # [{item_id, btn, unlocked, equipped}]——装配/卸下切换钮(满位禁选随刷)
|
||||
var _attune_nodes: Array[Control] = [] # 段内节点册(open 重建时定向清理,不扰工坊行板)
|
||||
var _refresh_l: Label # Y 刷新升级行(双入口之一——树上 ks_refresh 同账)
|
||||
var _refresh_btn: Button
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
var holder := VBoxContainer.new()
|
||||
holder.add_theme_constant_override("separation", 6)
|
||||
holder.custom_minimum_size = Vector2(0, 336)
|
||||
_ws_lock_l = UiKit.label("🔒 秘宝匣未开放\n\n点亮树上「秘宝匣」钥匙节点后展开。\n(前置=脊柱生命第 1 级)", UiKit.FS_HINT, false, UiKit.STONE_DEEP)
|
||||
_ws_lock_l.size_flags_vertical = Control.SIZE_SHRINK_CENTER
|
||||
_ws_lock_l.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
_ws_lock_l.custom_minimum_size = Vector2(280, 0)
|
||||
_ws_scroll = ScrollContainer.new()
|
||||
_ws_scroll.custom_minimum_size = Vector2(300, 336)
|
||||
_ws_scroll.size_flags_vertical = Control.SIZE_EXPAND_FILL
|
||||
_ws_scroll.horizontal_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED
|
||||
_workshop_holder = VBoxContainer.new()
|
||||
_workshop_holder.add_theme_constant_override("separation", 6)
|
||||
_ws_scroll.add_child(_workshop_holder)
|
||||
holder.add_child(_ws_lock_l)
|
||||
holder.add_child(_ws_scroll)
|
||||
var scroll := ScrollContainer.new()
|
||||
scroll.custom_minimum_size = Vector2(300, 336)
|
||||
scroll.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
scroll.horizontal_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED
|
||||
scroll.add_child(holder)
|
||||
_build_shell("秘宝匣", UiKit.TEX_ICON_WORKSHOP, scroll)
|
||||
|
||||
|
||||
func open_camp(data: Dictionary) -> void:
|
||||
_rebuild_workshop(data) # 行板+同调装配段+Y 尾行随开层全量重建(段尾链 _rebuild_attune)
|
||||
super.open_camp(data)
|
||||
|
||||
|
||||
func refresh_camp(data: Dictionary) -> void:
|
||||
var balance := int(data.get("balance", 0))
|
||||
_balance_label.text = "钥石 %d" % balance
|
||||
_refresh_key_gate(data)
|
||||
_refresh_workshop_rows(data, balance)
|
||||
_refresh_attune_segment(data, balance)
|
||||
|
||||
|
||||
# 秘宝匣钥匙门(树上 ks_workshop 行 level 判据——零核心访问,纯视图读投影)
|
||||
func _refresh_key_gate(data: Dictionary) -> void:
|
||||
var lvl := 0
|
||||
for row in (data.get("tree", []) as Array):
|
||||
if String(row.get("node_id", "")) == "ks_workshop":
|
||||
lvl = int(row.get("level", 0))
|
||||
var open := lvl >= 1
|
||||
_ws_lock_l.visible = not open
|
||||
_ws_scroll.visible = open
|
||||
|
||||
|
||||
func _rebuild_workshop(data: Dictionary) -> void:
|
||||
_workshop_rows.clear()
|
||||
for child in _workshop_holder.get_children():
|
||||
child.queue_free()
|
||||
_attune_nodes.clear()
|
||||
_attune_btns.clear()
|
||||
_attune_header_l = null
|
||||
_refresh_l = null
|
||||
_refresh_btn = null
|
||||
for row in data.get("workshop", []):
|
||||
var card := _workshop_card(row)
|
||||
_workshop_holder.add_child(card["card"])
|
||||
_workshop_rows.append(card)
|
||||
_rebuild_attune(data)
|
||||
|
||||
|
||||
## 秘宝匣行板构建域:件名(分档后缀+效果摘要悬停)+进度列+状态列+钥石购买钮(购买件未解锁在列)
|
||||
func _workshop_card(row: Dictionary) -> Dictionary:
|
||||
var card := PanelContainer.new()
|
||||
card.add_theme_stylebox_override("panel", UiKit.panel_flat(ROW_PLATE_COL, UiKit.PANEL_BORDER, UiKit.RADIUS_OBJECT, 1, Vector4(10, 4, 10, 4)))
|
||||
var line := HBoxContainer.new()
|
||||
line.add_theme_constant_override("separation", 12)
|
||||
card.add_child(line)
|
||||
var tier_name := String(UiKit.TREASURE_TIER_LABELS.get(String(row.get("tier", "")), ""))
|
||||
var name_l := UiKit.label(String(row.get("display_name", "")) + ("·" + tier_name if tier_name != "" else ""), UiKit.FS_HINT, true, UiKit.INK)
|
||||
name_l.custom_minimum_size = Vector2(132, 0)
|
||||
name_l.clip_text = true
|
||||
name_l.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
|
||||
name_l.tooltip_text = String(row.get("desc", "")) # 件效果摘要悬停可见(分档呈现契约——槽位档位=名后缀)
|
||||
line.add_child(name_l)
|
||||
var progress_l := UiKit.label("", UiKit.FS_HINT, false, UiKit.STONE_DEEP)
|
||||
progress_l.custom_minimum_size = Vector2(150, 0)
|
||||
progress_l.clip_text = true # 营地溢出修——文字全宽不撑柜
|
||||
progress_l.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
|
||||
line.add_child(progress_l)
|
||||
# 状态色用亮板双色墨制(深墨族替代暖白族)——色随刷新态条件赋值,非机械两行式
|
||||
var status_l := UiKit.label("", UiKit.FS_HINT, true, UiKit.STONE_DEEP)
|
||||
status_l.clip_text = true # 「已解锁 · 能力封存中」不撑柜(余宽吸收者)
|
||||
status_l.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
|
||||
status_l.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
line.add_child(status_l)
|
||||
# 钥石购买钮(购买件且未解锁时在列;写口唯一=buy_treasure_unlock,
|
||||
# 经 buy_requested(item_id) 信号走 presenter 分支;禁用态=余额不足)
|
||||
var buy_btn: Button = null
|
||||
if not bool(row.get("unlocked", false)) and String(row.get("mode", "")) == "keystone":
|
||||
buy_btn = UiKit.button("购买 %d" % int(row.get("price", 0)), 0.0) # 行板紧凑钮豁免
|
||||
buy_btn.pressed.connect(_emit_buy_requested.bind(String(row.get("item_id", ""))))
|
||||
line.add_child(buy_btn)
|
||||
return {"item_id": String(row.get("item_id", "")), "progress_l": progress_l, "status_l": status_l, "buy_btn": buy_btn, "price": int(row.get("price", 0)), "unlocked": bool(row.get("unlocked", false)), "card": card}
|
||||
|
||||
|
||||
# 同调装配段重建(秘宝匣尾部段:Slots 头行+九件行板+Y 升级尾行)
|
||||
func _rebuild_attune(data: Dictionary) -> void:
|
||||
var att: Dictionary[Variant, Variant] = data.get("attune", {})
|
||||
_attune_header_l = UiKit.label("", UiKit.FS_HINT, true, UiKit.INK)
|
||||
_workshop_holder.add_child(_attune_header_l)
|
||||
_attune_nodes.append(_attune_header_l)
|
||||
for row in att.get("items", []):
|
||||
var line := _attune_item_line(row)
|
||||
_workshop_holder.add_child(line)
|
||||
_attune_nodes.append(line)
|
||||
_refresh_attune_tail()
|
||||
|
||||
|
||||
## 同调件行板构建域:件名+形态+档位+装配切换钮(未解锁禁装——toggle 写口同守卫)
|
||||
func _attune_item_line(row: Dictionary) -> HBoxContainer:
|
||||
var iid := String(row.get("item_id", ""))
|
||||
var line := HBoxContainer.new()
|
||||
line.add_theme_constant_override("separation", 6)
|
||||
var name_l := UiKit.label(String(row.get("display_name", "")), UiKit.FS_HINT, true, UiKit.INK)
|
||||
name_l.custom_minimum_size = Vector2(96, 0)
|
||||
name_l.clip_text = true
|
||||
name_l.text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
|
||||
line.add_child(name_l)
|
||||
var form_l := UiKit.label("被动" if String(row.get("form", "")) == "passive" else "主动·充能", UiKit.FS_CAPTION, false, UiKit.STONE_DEEP)
|
||||
form_l.custom_minimum_size = Vector2(58, 0)
|
||||
line.add_child(form_l)
|
||||
# 档位标签(槽位档位显示:件档=普通/优秀/稀有,装入须件档≤格档契约 2 的呈现半边)
|
||||
var tier_l := UiKit.label(String(UiKit.TREASURE_TIER_LABELS.get(String(row.get("tier", "")), "—")), UiKit.FS_CAPTION, false, UiKit.STONE_DEEP)
|
||||
tier_l.custom_minimum_size = Vector2(36, 0)
|
||||
line.add_child(tier_l)
|
||||
var btn := UiKit.button("装配", 0.0) # 行板紧凑钮豁免
|
||||
btn.pressed.connect(attune_toggled.emit.bind(iid))
|
||||
btn.disabled = not bool(row.get("unlocked", false)) # 未解锁禁装(解锁为装配前置——toggle 写口同守卫)
|
||||
line.add_child(btn)
|
||||
_attune_btns.append({"item_id": iid, "btn": btn, "unlocked": bool(row.get("unlocked", false)), "equipped": bool(row.get("equipped", false))})
|
||||
return line
|
||||
|
||||
|
||||
## Y 升级尾行构建域(双入口之一——树上 ks_refresh 同账)
|
||||
func _refresh_attune_tail() -> void:
|
||||
var refresh_line := HBoxContainer.new()
|
||||
refresh_line.add_theme_constant_override("separation", 6)
|
||||
_refresh_l = UiKit.label("", UiKit.FS_CAPTION, false, UiKit.STONE_DEEP)
|
||||
refresh_line.add_child(_refresh_l)
|
||||
_refresh_btn = UiKit.button("升级", 0.0) # 行板紧凑钮豁免
|
||||
_refresh_btn.pressed.connect(_emit_buy_requested.bind("attune_refresh"))
|
||||
refresh_line.add_child(_refresh_btn)
|
||||
_workshop_holder.add_child(refresh_line)
|
||||
_attune_nodes.append(refresh_line)
|
||||
|
||||
|
||||
## 秘宝匣行板刷新域:进度列(解锁混合制三形态)与状态色(亮板双色墨制)与购买钮余额联动
|
||||
func _refresh_workshop_rows(data: Dictionary, balance: int) -> void:
|
||||
var ws_by_id := {}
|
||||
for row in data.get("workshop", []):
|
||||
ws_by_id[String(row.get("item_id", ""))] = row
|
||||
for card in _workshop_rows:
|
||||
var row: Dictionary[Variant, Variant] = ws_by_id.get(String(card.item_id), {})
|
||||
if row.is_empty():
|
||||
continue
|
||||
var unlocked := bool(row.get("unlocked", false))
|
||||
card.progress_l.text = _workshop_progress_text(row, unlocked)
|
||||
var st_text := "未解锁"
|
||||
var st_col: Color = UiKit.STONE_DEEP
|
||||
if unlocked:
|
||||
st_text = "已解锁"
|
||||
st_col = UiKit.GOLD_INK # GOLD_DEEP 对行板 3.00:1 越带,换深金墨 5.84:1
|
||||
card.status_l.text = st_text
|
||||
card.status_l.add_theme_color_override("font_color", st_col)
|
||||
card.status_l.tooltip_text = st_text # 截断兜底(状态列 EXPAND_FILL 吸余宽——悬停看全文)
|
||||
# 购买钮余额联动(禁用态=余额不足,常态防线;pattern 1 兜底拒绝可见归 presenter)
|
||||
if card.get("buy_btn") != null:
|
||||
card.buy_btn.disabled = balance < int(card.get("price", 0))
|
||||
|
||||
|
||||
## 进度列文案域(解锁混合制三形态:钥石购买价/条件进度拼接/已入手)
|
||||
func _workshop_progress_text(row: Dictionary, unlocked: bool) -> String:
|
||||
if unlocked:
|
||||
return "已入手"
|
||||
var mode := String(row.get("mode", ""))
|
||||
if mode == "keystone":
|
||||
return "钥石 %d" % int(row.get("price", 0))
|
||||
if mode == "condition":
|
||||
var parts: Array[String] = []
|
||||
for req_v in (row.get("reqs", []) as Array):
|
||||
var req: Dictionary[Variant, Variant] = req_v as Dictionary
|
||||
var lbl := String(UiKit.TREASURE_REQ_LABELS.get(String(req.get("key", "")), "条件"))
|
||||
parts.append("%s %d/%d" % [lbl, int(req.get("progress", 0)), int(req.get("threshold", 0))])
|
||||
return "、".join(parts)
|
||||
return ""
|
||||
|
||||
|
||||
## 同调装配段刷新域(Slots 点亮/满位禁选/Y 升级行余额联动——就地刷)
|
||||
func _refresh_attune_segment(data: Dictionary, balance: int) -> void:
|
||||
var att: Dictionary[Variant, Variant] = data.get("attune", {})
|
||||
if _attune_header_l != null:
|
||||
var slots_n := int(att.get("slots", 0))
|
||||
var eq: Array[Variant] = att.get("equipped", [])
|
||||
_attune_header_l.text = "── 同调装配 Slots %d/%d ──" % [eq.size(), slots_n]
|
||||
var eq_set := {}
|
||||
for v in eq:
|
||||
eq_set[String(v)] = true
|
||||
for card2 in _attune_btns:
|
||||
var on: bool = eq_set.has(String(card2.item_id))
|
||||
card2.btn.text = "卸下" if on else "装配"
|
||||
# 满位禁选+未解锁禁装(已装件恒可卸下;unlocked 快照随 rebuild 刷新)
|
||||
card2.btn.disabled = (not on and eq.size() >= slots_n) or (not on and not bool(card2.get("unlocked", false)))
|
||||
if _refresh_l != null:
|
||||
var rf: Dictionary[Variant, Variant] = att.get("refresh", {})
|
||||
_refresh_l.text = "三选一刷新 +%d 次/冒险 · Lv%d" % [int(rf.get("charges", 0)), int(rf.get("level", 0))]
|
||||
_refresh_btn.text = "已满级" if bool(rf.get("maxed", false)) else "升级 %d 钥石" % int(rf.get("price", 0))
|
||||
_refresh_btn.disabled = bool(rf.get("maxed", false)) or balance < int(rf.get("price", 0))
|
||||
|
||||
|
||||
func _emit_buy_requested(attr: String) -> void:
|
||||
buy_requested.emit(attr)
|
||||
@@ -0,0 +1 @@
|
||||
uid://dcakccwlacegq
|
||||
@@ -0,0 +1,105 @@
|
||||
## 天赋树子界面(自 CampOverlay 树淬炼柜台抽出——承载面迁移,界面逻辑复用零重设计):
|
||||
## 树脊柱界面形态=主界面(脉分组行板:节点名/等级/价/购买钮+Fork 双态切换钮段)。
|
||||
## UI 只发意图信号(写口唯一归 MetaProgression.tree_buy/tree_buy_fork/tree_toggle_fork)。
|
||||
class_name TreeView
|
||||
extends CampSubViewBase
|
||||
|
||||
signal tree_buy_requested(node_id: String) ## 天赋树购买意图(写口唯一归 MetaProgression.tree_buy)
|
||||
signal tree_fork_toggled(group: String, side: String) ## 双态切换意图(一节点双态——零币切态)
|
||||
|
||||
var _tree_holder: VBoxContainer # 树淬炼内容(脊柱两行+钥匙/socket 行板+Fork 双态钮段)
|
||||
var _tree_buy_btns: Array[Dictionary] = [] # [{node_id, btn}]——树购买/解锁钮登记面(open/refresh 重建时刷新;探针消费)
|
||||
var _tree_fork_btns: Array[Dictionary] = [] # [{group, side, btn}]——Fork 双态切换钮登记面(探针消费)
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
_tree_holder = VBoxContainer.new()
|
||||
_tree_holder.add_theme_constant_override("separation", 6)
|
||||
var tree_scroll := ScrollContainer.new()
|
||||
tree_scroll.custom_minimum_size = Vector2(300, 336)
|
||||
tree_scroll.size_flags_vertical = Control.SIZE_EXPAND_FILL
|
||||
tree_scroll.horizontal_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED
|
||||
tree_scroll.add_child(_tree_holder)
|
||||
var content := VBoxContainer.new()
|
||||
content.add_child(tree_scroll)
|
||||
_build_shell("天赋树 · 淬炼", "", content)
|
||||
|
||||
|
||||
func refresh_camp(data: Dictionary) -> void:
|
||||
_balance_label.text = "钥石 %d" % int(data.get("balance", 0))
|
||||
_rebuild_tree(data)
|
||||
|
||||
|
||||
# 天赋树段重建(脉分组行板:节点名/等级/价/购买钮 + Fork 双态切换钮;
|
||||
# 树数据 = 组合根 _camp_data().tree 投影 [{node_id, display_name, vein, kind, level, price, can_buy,
|
||||
# currency}...] + fork_groups [{group, node_id, active_side, owned, can_buy, price, sides:[{side, display_name, effects}]}])
|
||||
func _rebuild_tree(data: Dictionary) -> void:
|
||||
for c in _tree_holder.get_children():
|
||||
c.queue_free()
|
||||
_tree_buy_btns.clear()
|
||||
_tree_fork_btns.clear()
|
||||
var tree: Array[Variant] = data.get("tree", []) as Array
|
||||
var forks: Array[Variant] = data.get("fork_groups", []) as Array
|
||||
var vein_names := {"spine": "·脊柱淬炼·", "forge": "·锻造脉·", "keystone": "·钥石脉·", "attune": "·同调脉·"}
|
||||
var last_vein := ""
|
||||
for row in tree:
|
||||
var vein := String(row.get("vein", ""))
|
||||
if vein != last_vein:
|
||||
last_vein = vein
|
||||
var vh := UiKit.label(String(vein_names.get(vein, vein)), UiKit.FS_HINT, true, UiKit.GOLD_INK) # GOLD_DEEP 对柜台板 2.67:1 越带,换深金墨 5.21:1
|
||||
_tree_holder.add_child(vh)
|
||||
if String(row.get("kind", "")) == "fork":
|
||||
continue # Fork 行去行板化——由 fork_groups 段承载双态切换钮
|
||||
_tree_holder.add_child(_tree_row_line(row))
|
||||
for fg in forks:
|
||||
_tree_holder.add_child(_tree_fork_line(fg))
|
||||
|
||||
|
||||
## 树行板构建域:节点名(含门槛标记)+购买钮(追加序与锚句随段整体搬迁)
|
||||
func _tree_row_line(row: Dictionary) -> HBoxContainer:
|
||||
var hb := HBoxContainer.new()
|
||||
hb.add_theme_constant_override("separation", 6)
|
||||
var lvl := int(row.get("level", 0))
|
||||
var cap := int(row.get("cap", 1))
|
||||
var name_l := UiKit.label("%s Lv%d/%d" % [String(row.get("display_name", "")), lvl, cap], 13, false, UiKit.INK_LABEL)
|
||||
name_l.custom_minimum_size = Vector2(150, 0)
|
||||
name_l.clip_text = true
|
||||
var gate := String(row.get("gate_text", ""))
|
||||
if gate != "":
|
||||
name_l.text += " 🔒" # 等级阈值前置未达标标记(R1 机制位——悬停看门槛;达标后随 refresh 消失)
|
||||
name_l.tooltip_text = "等级门槛:%s" % gate
|
||||
hb.add_child(name_l)
|
||||
var btn := UiKit.button("购买 %d 钥石" % int(row.get("price", 0)), 0.0) # 柜台行板紧凑钮豁免宽度基准
|
||||
btn.pressed.connect(func(): tree_buy_requested.emit(String(row.get("node_id", ""))))
|
||||
btn.disabled = not bool(row.get("can_buy", false))
|
||||
hb.add_child(btn)
|
||||
_tree_buy_btns.append({"node_id": String(row.get("node_id", "")), "btn": btn})
|
||||
return hb
|
||||
|
||||
|
||||
## Fork 双态行板构建域:组状态文案+解锁钮或双态切换钮
|
||||
func _tree_fork_line(fg: Dictionary) -> HBoxContainer:
|
||||
var group := String(fg.get("group", ""))
|
||||
var active := String(fg.get("active_side", ""))
|
||||
var owned := bool(fg.get("owned", false))
|
||||
var fb := HBoxContainer.new()
|
||||
fb.add_theme_constant_override("separation", 6)
|
||||
var state_txt := "未解锁"
|
||||
if owned:
|
||||
state_txt = "激活:%s" % active
|
||||
var gl := UiKit.label("%s[%s]" % [String(fg.get("display_name", group)), state_txt], 13, false, UiKit.INK_LABEL)
|
||||
fb.add_child(gl)
|
||||
if not owned:
|
||||
var bb := UiKit.button("解锁 %d 钥石" % int(fg.get("price", 0)), 0.0) # 行板紧凑钮豁免
|
||||
bb.pressed.connect(func(): tree_buy_requested.emit(String(fg.get("node_id", ""))))
|
||||
bb.disabled = not bool(fg.get("can_buy", false))
|
||||
fb.add_child(bb)
|
||||
_tree_buy_btns.append({"node_id": String(fg.get("node_id", "")), "btn": bb})
|
||||
else:
|
||||
for side_row in (fg.get("sides", []) as Array):
|
||||
var sd := String(side_row.get("side", ""))
|
||||
var sb := UiKit.button(String(side_row.get("display_name", sd)), 0.0) # 行板紧凑钮豁免
|
||||
sb.pressed.connect(func(): tree_fork_toggled.emit(group, sd))
|
||||
fb.add_child(sb)
|
||||
_tree_fork_btns.append({"group": group, "side": sd, "btn": sb})
|
||||
return fb
|
||||
@@ -0,0 +1 @@
|
||||
uid://mjjrdelhi7yg
|
||||
@@ -247,6 +247,19 @@ const TEX_ENEMY_HOOK_HORROR := "res://assets/art/character/character_enemy_hook_
|
||||
const TEX_ENEMY_DUERGAR_KING := "res://assets/art/character/character_enemy_duergar_king.png" # 灰矮人石君王
|
||||
# 近景地台独立件(§6.1——源 48×12 九宫格横向拉伸、顶缘受光线 2px 不随拉伸变形;跨三关恒定不吃 wall_ambient tint)
|
||||
const TEX_STAGE_PLAZA := "res://assets/art/scene/scene_stage_plaza.png"
|
||||
# 营地场景十层(art-bible §6.2——z0 bg 不透明全幅+z1 围墙透明细条+八物件透明层;布局矩形/命中矩形/z 序
|
||||
# 唯一事实源 = data/tables/camp_scene_layout.tres;素材名跟本组常量走(先定常量防断链);
|
||||
# 缺位 load_tex→null→程序化占位,冒烟安全)
|
||||
const TEX_CAMP_BG := "res://assets/art/scene/scene_camp_bg.png" # z0 背景层(不透明全幅 1280×800)
|
||||
const TEX_CAMP_WALL := "res://assets/art/scene/scene_camp_wall.png" # z1 围墙层(透明细条,门洞留缺口)
|
||||
const TEX_CAMP_BOARD := "res://assets/art/scene/scene_camp_board.png" # z2 布告板
|
||||
const TEX_CAMP_GATE := "res://assets/art/scene/scene_camp_gate.png" # z3 门扇
|
||||
const TEX_CAMP_DUMMY := "res://assets/art/scene/scene_camp_dummy.png" # z4 木桩
|
||||
const TEX_CAMP_FORGE := "res://assets/art/scene/scene_camp_forge.png" # z4 锻炉铁砧
|
||||
const TEX_CAMP_TENT := "res://assets/art/scene/scene_camp_tent.png" # z4 帐篷(承载件不可点)
|
||||
const TEX_CAMP_CHEST := "res://assets/art/scene/scene_camp_chest.png" # z5 宝箱
|
||||
const TEX_CAMP_NOTEBOOK := "res://assets/art/scene/scene_camp_notebook.png" # z5 笔记本
|
||||
const TEX_CAMP_CAMPFIRE := "res://assets/art/scene/scene_camp_campfire.png" # z6 篝火(命中只取下半火堆)
|
||||
# 护甲类型图标三键(art-bible §5.3 工单:对象键 = 甲档变体;源 24×24 显示 24px = 1× 甲类整数倍;
|
||||
# 缺位 load_tex→null→字形回退,冒烟安全)
|
||||
const TEX_ARMOR_LIGHT := "res://assets/ui/icons/ui_armor_light.png"
|
||||
|
||||
@@ -27,6 +27,7 @@ func _ready() -> void:
|
||||
await _step_boot_menu()
|
||||
await _step_menu_to_camp()
|
||||
await _step_camp_back_to_menu()
|
||||
await _step_camp_esc_and_hud() # 卡⑤——Esc 四态路由/三出口/设置语境分支/HUD 读数
|
||||
await _step_save_select_open_back() # 迭代 33 卡③ sl10——选档开合+返回路径+ESC 语境不响应
|
||||
await _step_menu_to_adventure()
|
||||
await _step_level_to_battle_and_back()
|
||||
@@ -51,7 +52,7 @@ func _ready() -> void:
|
||||
func _screen_seals() -> Dictionary:
|
||||
return {
|
||||
"菜单": main.ui.screens.start_overlay != null and main.ui.screens.start_overlay.visible,
|
||||
"营地": main.ui.modals.camp_overlay != null and main.ui.modals.camp_overlay.visible,
|
||||
"营地": main.ui.modals.camp.scene != null and main.ui.modals.camp.scene.visible,
|
||||
"冒险": main.run_scope != null and main.run_scope.is_adventure,
|
||||
"终局": main.ui.modals.end_overlay != null and main.ui.modals.end_overlay.visible,
|
||||
}
|
||||
@@ -115,14 +116,16 @@ func _step_menu_to_camp() -> void:
|
||||
_expect_exclusive("②菜单→营地", "营地")
|
||||
|
||||
|
||||
# ---- ③ 营地 → 菜单(回退路径:营地关闭发自覆盖层自身信号)----
|
||||
# ---- ③ 营地 → 菜单(回退路径:篝火二次确认动线——卡④ 营地唯一回菜单出口;选档层随关层收闭同收)----
|
||||
func _step_camp_back_to_menu() -> void:
|
||||
if main.ui.modals.camp_overlay == null:
|
||||
_problems.append("③营地→菜单:营地覆盖层句柄缺失")
|
||||
if main.ui.modals.camp.scene == null:
|
||||
_problems.append("③营地→菜单:营地场景根句柄缺失〔句柄子容器批 V1〕")
|
||||
return
|
||||
main.ui.modals.camp_overlay.closed.emit()
|
||||
main.ui.modals.camp.scene.object_pressed.emit(&"campfire")
|
||||
await _frames()
|
||||
main._on_save_select_closed() # 关闭被栈还原的选档层(动线序中间态——卡④ 换代点)
|
||||
if not main.ui.modals.confirm_dialog.visible:
|
||||
_problems.append("③篝火:二次确认弹窗未现(camp.md v2.2 必须先确认)〔营地图批 V7〕")
|
||||
main.ui.modals.confirm_dialog.confirmed.emit() # 二次确认离场(confirmed 先于关层——卡④ T4)
|
||||
await _frames()
|
||||
_expect_exclusive("③营地→菜单(回退)", "菜单")
|
||||
|
||||
@@ -229,3 +232,73 @@ func _step_end_back_to_menu() -> void:
|
||||
_expect_exclusive("⑦终局→菜单", "菜单")
|
||||
if main.run_scope != null and main.run_scope.is_adventure:
|
||||
_problems.append("⑦终局→菜单:冒险态未收束(run_scope 仍标 is_adventure)")
|
||||
|
||||
|
||||
# ---- ③' 营地 Esc 浮窗+HUD(卡⑤——真实键盘合成路径 push_input;四态路由+三出口+语境分支+余额单口)----
|
||||
func _step_camp_esc_and_hud() -> void:
|
||||
ProbeUiUtil.isolate_save(main, "smoke_screen_flow_esc", false, false, true)
|
||||
if not ProbeUiUtil.open_camp_via_savesel(main, "smoke_screen_flow_esc"):
|
||||
_problems.append("[esc] 营地入口缺失(选档层新档钮驱动中断)〔ESC批 V1〕")
|
||||
return
|
||||
await _frames()
|
||||
_push_esc()
|
||||
await _frames()
|
||||
if not main.ui.modals.camp.esc_overlay.visible:
|
||||
_problems.append("[esc] 营地根态 Esc 未唤起浮窗(契约 9③)〔ESC批 V1〕〔ESC批 B1〕")
|
||||
_push_esc()
|
||||
await _frames()
|
||||
if main.ui.modals.camp.esc_overlay.visible:
|
||||
_problems.append("[esc] 再按 Esc 未关浮窗(Q2 同键单义切换失守)〔ESC批 V1〕")
|
||||
_push_esc(true) # echo 连发(真实键盘长按形态)
|
||||
await _frames()
|
||||
if main.ui.modals.camp.esc_overlay.visible:
|
||||
_problems.append("[esc] echo 事件唤起浮窗(触发沿 pressed 且非 echo 失守)〔ESC批 V1〕")
|
||||
main.ui.modals.camp.scene.object_pressed.emit(&"dummy") # 子界面开态
|
||||
await _frames()
|
||||
_push_esc()
|
||||
await _frames()
|
||||
if main.ui.modals.camp.tree.visible:
|
||||
_problems.append("[esc] 子界面开态 Esc 未关窗(camp.md v2.3 定稿——先关最上层窗)〔ESC批 V1〕")
|
||||
if main.ui.modals.camp.esc_overlay.visible:
|
||||
_problems.append("[esc] 关窗同拍唤起浮窗(先关窗后浮窗——两拍应分离)〔ESC批 V1〕")
|
||||
await _frames()
|
||||
# HUD 余额(契约 5 时机③——夹具直写后显式触发才变;禁 band 自刷假设)
|
||||
main.meta.meta_state._add_keystone(9999)
|
||||
main._camp_pres.views.refresh_bus.refresh(main._camp_data()) # 显式触发刷新单口
|
||||
var band: Control = main.ui.modals.camp.scene.get_node("HudBandSlot").get_child(0)
|
||||
if not String(band._badge.value_label.text).begins_with("钥石 9999"):
|
||||
_problems.append("[esc] HUD 余额读数≠存档单口现值(直写+显式触发未变)〔ESC批 V6〕〔ESC批 B2〕")
|
||||
# 设置开在浮窗之上→Esc 无反馈且浮窗不误关(契约 9①);关设置回浮窗不回主菜单(契约 3 语境分支)
|
||||
_push_esc()
|
||||
await _frames()
|
||||
main._on_esc_settings()
|
||||
await _frames()
|
||||
if not main.ui.modals.settings_overlay.visible:
|
||||
_problems.append("[esc] 浮窗设置出口断裂〔ESC批 V4〕")
|
||||
_push_esc()
|
||||
await _frames()
|
||||
if not main.ui.modals.camp.esc_overlay.visible:
|
||||
_problems.append("[esc] 设置开态 Esc 误关浮窗(契约 9①——浮窗不隔层关闭)〔ESC批 V1〕")
|
||||
main._on_settings_closed()
|
||||
await _frames()
|
||||
if not main.ui.modals.camp.esc_overlay.visible or main.ui.screens.start_overlay.visible:
|
||||
_problems.append("[esc] 关设置后未回浮窗或回弹主菜单(契约 3 语境分支失守)〔ESC批 V4〕〔ESC批 B3〕")
|
||||
# 返回主菜单动线(契约 4——浮窗自收+营地隐+选档收+菜单显)
|
||||
main.ui.modals.camp.esc_overlay.return_requested.emit()
|
||||
await _frames()
|
||||
if main.ui.modals.camp.esc_overlay.visible or main.ui.modals.camp.scene.visible or main.ui.modals.save_select_overlay.visible or not main.ui.screens.start_overlay.visible:
|
||||
_problems.append("[esc] 返回主菜单动线失守(浮窗自收/营地隐/选档收/菜单显)〔ESC批 V3〕〔ESC批 B3〕")
|
||||
# 非营地语境(boot 菜单)Esc→无响应(契约 9④ 回归面)
|
||||
_push_esc()
|
||||
await _frames()
|
||||
if main.ui.modals.camp.esc_overlay.visible:
|
||||
_problems.append("[esc] 非营地语境 Esc 唤起浮窗(契约 9④ 失守)〔ESC批 V1〕")
|
||||
|
||||
|
||||
func _push_esc(echo := false) -> void:
|
||||
var ev := InputEventKey.new()
|
||||
ev.keycode = KEY_ESCAPE
|
||||
ev.physical_keycode = KEY_ESCAPE
|
||||
ev.pressed = true
|
||||
ev.echo = echo
|
||||
main.get_viewport().push_input(ev, true) # 真实键盘合成路径(:153 先例——push_input 不更新 Input 单例动作态)
|
||||
@@ -53,7 +53,7 @@ func _ready() -> void:
|
||||
var top_ry := -1
|
||||
for c: Node in [main.ui.screens.start_overlay, main.ui.screens.battle_root, main.ui.screens.inter_overlay,
|
||||
main.ui.modals.legend_overlay, main.ui.modals.node_overlay, main.ui.modals.level_screen, main.ui.modals.curio_overlay,
|
||||
main.ui.modals.end_overlay, main.ui.modals.shop_overlay, main.ui.modals.camp_overlay, main.ui.modals.settings_overlay,
|
||||
main.ui.modals.end_overlay, main.ui.modals.shop_overlay, main.ui.modals.camp.scene, main.ui.modals.settings_overlay,
|
||||
main.ui.modals.status_panel, main.ui.modals.career_overlay, main.ui.modals.confirm_dialog, main.ui.modals.debug_overlay]:
|
||||
if c == null or not (c is CanvasItem) or not (c as CanvasItem).visible:
|
||||
continue
|
||||
@@ -119,17 +119,15 @@ func _ready() -> void:
|
||||
await get_tree().process_frame
|
||||
if main.ui.modals.career_overlay.visible or not main.ui.screens.start_overlay.visible:
|
||||
_problems.append("生涯页关闭后页未隐藏或开始层未恢复")
|
||||
# ② 营地(进档开层新路径——卡② mn9;槽模板注入隔离命名空间)
|
||||
# ② 营地场景图(进档开层新路径——卡② mn9;截图=可点击场景图形态——卡④ 契约 9 V1 验收载体)
|
||||
if not ProbeUiUtil.open_camp_via_savesel(main, "smoke_shot_probe_camp"):
|
||||
_problems.append("营地入口缺失(选档层新档钮——新路径驱动中断)")
|
||||
_problems.append("营地入口缺失(选档层新档钮——新路径驱动中断)〔句柄子容器批 V1〕")
|
||||
else:
|
||||
await get_tree().process_frame
|
||||
await _snap("camp")
|
||||
var close_btn: Button = ProbeUiUtil.find_button(main.ui.modals.camp_overlay, "关闭营地", "contains")
|
||||
if close_btn != null:
|
||||
close_btn.pressed.emit()
|
||||
await get_tree().process_frame
|
||||
main._on_save_select_closed() # 关闭被栈还原的选档层(动线序中间态)
|
||||
main.ui.modals.camp.scene.object_pressed.emit(&"campfire") # 收闭改接篝火动线(营地根态无关闭钮——卡④ T5)
|
||||
await get_tree().process_frame
|
||||
main.ui.modals.confirm_dialog.confirmed.emit() # 二次确认离场(关层收闭——选档层随收)
|
||||
await get_tree().process_frame
|
||||
# ③ 关卡画面(开始冒险→停点出图——入口停点语义;函数直调中间态 mn10)
|
||||
main._start_adventure_from_menu()
|
||||
|
||||
+106
-53
@@ -62,123 +62,131 @@ func _ready() -> void:
|
||||
# 原 swap=false 形态的写盘走 iso 实例旧路径,与槽文件断言不同源——卡② mn9 换代)
|
||||
var iso_c = ProbeUiUtil.isolate_save(main, "smoke_click_probe_camp", false, false, true)
|
||||
if not ProbeUiUtil.open_camp_via_savesel(main, "smoke_click_probe_camp"):
|
||||
_problems.append("营地入口缺失(选档层新档钮——mn9 新路径驱动中断)")
|
||||
_problems.append("营地入口缺失(选档层新档钮——mn9 新路径驱动中断)〔句柄子容器批 V1〕")
|
||||
else:
|
||||
await get_tree().process_frame
|
||||
if not main.ui.modals.camp_overlay.visible:
|
||||
_problems.append("营地层未打开(进档开层新路径)")
|
||||
elif main.ui.modals.camp_overlay._tree_buy_btns.is_empty():
|
||||
_problems.append("树淬炼柜台购买钮缺失(点击路径——四柜台重排后树=主界面)")
|
||||
if not main.ui.modals.camp.scene.visible:
|
||||
_problems.append("营地场景根未打开(进档开层新路径)〔句柄子容器批 V1〕")
|
||||
main.ui.modals.camp.scene.object_pressed.emit(&"dummy") # 场景点选真实路由(木桩→天赋树子界面——卡④ T5)
|
||||
await get_tree().process_frame
|
||||
if main.ui.modals.camp.tree._tree_buy_btns.is_empty():
|
||||
_problems.append("树淬炼购买钮缺失(四柜台拆解后树=独立子界面)〔句柄子容器批 V1〕")
|
||||
else:
|
||||
# 树钮句柄用后即取(refresh_camp 随刷重建树行板——旧钮 queue_free,跨刷新句柄必失效)
|
||||
iso_c.meta_state._add_keystone(9999)
|
||||
main.ui.modals.camp_overlay.refresh_camp(main._camp_data())
|
||||
main.ui.modals.camp.tree.refresh_camp(main._camp_data())
|
||||
await get_tree().process_frame
|
||||
var buy_btn: Button = null
|
||||
for card in main.ui.modals.camp_overlay._tree_buy_btns:
|
||||
for card in main.ui.modals.camp.tree._tree_buy_btns:
|
||||
if String(card.node_id) == "sp_hp":
|
||||
buy_btn = card.btn
|
||||
if buy_btn == null:
|
||||
_problems.append("脊柱生命行缺失(点击路径)")
|
||||
_problems.append("脊柱生命行缺失(点击路径)〔句柄子容器批 V1〕")
|
||||
else:
|
||||
var bal_before: int = iso_c.meta_state.keystone_balance()
|
||||
var price: int = int(main.db.crossrun.meta_tree.row_by_id("sp_hp").get("price", 0))
|
||||
buy_btn.pressed.emit() # 合成购买点击 → _on_camp_tree_buy → meta.tree_buy(写调用唯一归组合根)
|
||||
await get_tree().process_frame
|
||||
if int(iso_c.meta_state.keystone_balance()) != bal_before - price:
|
||||
_problems.append("营地树购买未出账(%d→%d 应 −%d)" % [bal_before, iso_c.meta_state.keystone_balance(), price])
|
||||
_problems.append("营地树购买未出账(%d→%d 应 −%d)〔句柄子容器批 V1〕〔营地图批 V4〕" % [bal_before, iso_c.meta_state.keystone_balance(), price])
|
||||
var iso_chk = load("res://core/save_manager.gd").new("user://smoke_click_probe_camp_slot_1.json")
|
||||
iso_chk.load_from_disk()
|
||||
if int(iso_chk.meta_state.tree_state().nodes.get("sp_hp", 0)) != 1:
|
||||
_problems.append("营地树购买未持久(reload 后级 != 1)")
|
||||
_problems.append("营地树购买未持久(reload 后级 != 1)〔句柄子容器批 V1〕〔营地图批 V4〕")
|
||||
# Fork 双态切换点击路径(V20——购=解锁默认 A,钮切 B;前置=同调位 1,先点亮)
|
||||
var socket_btn: Button = null
|
||||
for card in main.ui.modals.camp_overlay._tree_buy_btns:
|
||||
for card in main.ui.modals.camp.tree._tree_buy_btns:
|
||||
if String(card.node_id) == "att_socket1":
|
||||
socket_btn = card.btn
|
||||
if socket_btn != null:
|
||||
socket_btn.pressed.emit()
|
||||
await get_tree().process_frame
|
||||
main.ui.modals.camp_overlay.refresh_camp(main._camp_data())
|
||||
main.ui.modals.camp.tree.refresh_camp(main._camp_data())
|
||||
await get_tree().process_frame
|
||||
var fork_btn: Button = null
|
||||
for card in main.ui.modals.camp_overlay._tree_buy_btns:
|
||||
for card in main.ui.modals.camp.tree._tree_buy_btns:
|
||||
if String(card.node_id) == "fork_posture":
|
||||
fork_btn = card.btn
|
||||
if fork_btn == null:
|
||||
_problems.append("Fork 解锁钮缺失(点击路径)")
|
||||
_problems.append("Fork 解锁钮缺失(点击路径)〔句柄子容器批 V1〕")
|
||||
else:
|
||||
fork_btn.pressed.emit()
|
||||
await get_tree().process_frame
|
||||
main.ui.modals.camp_overlay.refresh_camp(main._camp_data())
|
||||
main.ui.modals.camp.tree.refresh_camp(main._camp_data())
|
||||
await get_tree().process_frame
|
||||
var side_b: Button = null
|
||||
for fk in main.ui.modals.camp_overlay._tree_fork_btns:
|
||||
for fk in main.ui.modals.camp.tree._tree_fork_btns:
|
||||
if String(fk.group) == "fg_posture" and String(fk.side) == "b":
|
||||
side_b = fk.btn
|
||||
if side_b == null:
|
||||
_problems.append("Fork 双态切换钮缺失(解锁后应展开 a/b 钮)")
|
||||
_problems.append("Fork 双态切换钮缺失(解锁后应展开 a/b 钮)〔句柄子容器批 V1〕")
|
||||
else:
|
||||
side_b.pressed.emit() # 合成切态点击 → _on_camp_fork_toggle → meta.tree_toggle_fork
|
||||
await get_tree().process_frame
|
||||
var iso_fk = load("res://core/save_manager.gd").new("user://smoke_click_probe_camp_slot_1.json")
|
||||
iso_fk.load_from_disk()
|
||||
if String(iso_fk.meta_state.tree_state().fork_sides.get("fg_posture", "")) != "b":
|
||||
_problems.append("Fork 切态未持久(reload 后激活态 != b)")
|
||||
# ---- 营地六处灰字取色断言(迭代36 wc4——真实入口开营地后按文本锚取 label,
|
||||
# font_color 逐处 == STONE_DEEP;六源位 :167 图鉴锁文/:417+:476 行状态字/:509 同调形态/:513 档位标签/:525 刷新行)----
|
||||
var camp_labels: Array = []
|
||||
_collect_labels_by_text(main.ui.modals.camp_overlay, camp_labels)
|
||||
var atlas_locks := _labels_with_text(camp_labels, "柜台结构位预留")
|
||||
if atlas_locks.is_empty():
|
||||
_problems.append("营地灰字:图鉴柜台锁文 label 未找到(wc4 定位锚失守)")
|
||||
for l in atlas_locks:
|
||||
if l.get_theme_color("font_color") != UiKit.STONE_DEEP:
|
||||
_problems.append("营地灰字:图鉴锁文未用 STONE_DEEP(wc4 :167)")
|
||||
# 「未解锁」锚收窄到秘宝匣行容器子树(树行/锻造行也有「未解锁」态字样——非 wc4 目标位)
|
||||
var locked_status: Array = []
|
||||
if main.ui.modals.camp_overlay.get("_workshop_holder") != null:
|
||||
var ws_labels: Array = []
|
||||
_collect_labels_by_text(main.ui.modals.camp_overlay._workshop_holder, ws_labels)
|
||||
locked_status = _labels_with_text(ws_labels, "未解锁")
|
||||
_problems.append("Fork 切态未持久(reload 后激活态 != b)〔句柄子容器批 V1〕")
|
||||
# ---- 营地灰字取色断言(迭代36 wc4——四子界面拆分后按视图分扫;卡④ T5 迁移):
|
||||
# 图鉴锁文→codex 视图(锚随形态订正去『柜台』);秘宝行未解锁/同调形态/档位/刷新行→treasure 视图
|
||||
# _workshop_holder 子树。font_color 逐处 == STONE_DEEP;树链段已闭树界面。
|
||||
main.ui.modals.camp.tree.closed.emit() # 树界面返回(关层归 presenter 单口)
|
||||
await get_tree().process_frame
|
||||
main.ui.modals.camp.scene.object_pressed.emit(&"chest") # 宝箱→秘宝匣(灰字四源位宿主)
|
||||
await get_tree().process_frame
|
||||
var ws_labels: Array = []
|
||||
_collect_labels_by_text(main.ui.modals.camp.treasure._workshop_holder, ws_labels)
|
||||
var locked_status: Array = _labels_with_text(ws_labels, "未解锁")
|
||||
if locked_status.is_empty():
|
||||
_problems.append("营地灰字:秘宝匣行「未解锁」态 label 未找到(wc4 夹具前提失守——新档应有锁定秘宝行)")
|
||||
_problems.append("营地灰字:秘宝匣行「未解锁」态 label 未找到(wc4 夹具前提失守——新档应有锁定秘宝行)〔句柄子容器批 V1〕")
|
||||
for l in locked_status:
|
||||
if l.get_theme_color("font_color") != UiKit.STONE_DEEP:
|
||||
_problems.append("营地灰字:秘宝行「未解锁」态未用 STONE_DEEP(wc4 :417/:476)")
|
||||
_problems.append("营地灰字:秘宝行「未解锁」态未用 STONE_DEEP(wc4 :417/:476)〔句柄子容器批 V1〕")
|
||||
var form_found := false
|
||||
for l in camp_labels:
|
||||
for l in ws_labels:
|
||||
if l.text == "被动" or l.text == "主动·充能":
|
||||
form_found = true
|
||||
if l.get_theme_color("font_color") != UiKit.STONE_DEEP:
|
||||
_problems.append("营地灰字:同调形态标签未用 STONE_DEEP(wc4 :509)")
|
||||
_problems.append("营地灰字:同调形态标签未用 STONE_DEEP(wc4 :509)〔句柄子容器批 V1〕")
|
||||
if not form_found:
|
||||
_problems.append("营地灰字:同调行形态标签未找到(wc4 定位锚失守——同调段应有行)")
|
||||
_problems.append("营地灰字:同调行形态标签未找到(wc4 定位锚失守——同调段应有行)〔句柄子容器批 V1〕")
|
||||
var tier_vals := {}
|
||||
for v in UiKit.TREASURE_TIER_LABELS.values():
|
||||
tier_vals[String(v)] = true
|
||||
var tier_found := false
|
||||
for l in camp_labels:
|
||||
for l in ws_labels:
|
||||
if tier_vals.has(l.text):
|
||||
tier_found = true
|
||||
if l.get_theme_color("font_color") != UiKit.STONE_DEEP:
|
||||
_problems.append("营地灰字:同调档位标签未用 STONE_DEEP(wc4 :513)")
|
||||
_problems.append("营地灰字:同调档位标签未用 STONE_DEEP(wc4 :513)〔句柄子容器批 V1〕")
|
||||
if not tier_found:
|
||||
_problems.append("营地灰字:同调档位标签未找到(wc4 定位锚失守)")
|
||||
_problems.append("营地灰字:同调档位标签未找到(wc4 定位锚失守)〔句柄子容器批 V1〕")
|
||||
var refresh_inked := false
|
||||
for l in camp_labels:
|
||||
for l in ws_labels:
|
||||
if String(l.text).contains("三选一刷新"):
|
||||
refresh_inked = true
|
||||
if l.get_theme_color("font_color") != UiKit.STONE_DEEP:
|
||||
_problems.append("营地灰字:刷新行未用 STONE_DEEP(wc4 :525)")
|
||||
_problems.append("营地灰字:刷新行未用 STONE_DEEP(wc4 :525)〔句柄子容器批 V1〕")
|
||||
if not refresh_inked:
|
||||
_problems.append("营地灰字:刷新行 label 未找到(wc4 定位锚失守)")
|
||||
main._on_camp_closed()
|
||||
_problems.append("营地灰字:刷新行 label 未找到(wc4 定位锚失守)〔句柄子容器批 V1〕")
|
||||
main.ui.modals.camp.treasure.closed.emit()
|
||||
await get_tree().process_frame
|
||||
main.ui.modals.camp.scene.object_pressed.emit(&"board") # 布告板→图鉴占位(锁文宿主)
|
||||
await get_tree().process_frame
|
||||
var codex_labels: Array = []
|
||||
_collect_labels_by_text(main.ui.modals.camp.codex, codex_labels)
|
||||
var atlas_locks := _labels_with_text(codex_labels, "结构位预留")
|
||||
if atlas_locks.is_empty():
|
||||
_problems.append("营地灰字:图鉴锁文 label 未找到(wc4 定位锚失守——锚随形态订正去『柜台』)〔句柄子容器批 V1〕〔营地图批 V6〕")
|
||||
for l in atlas_locks:
|
||||
if l.get_theme_color("font_color") != UiKit.STONE_DEEP:
|
||||
_problems.append("营地灰字:图鉴锁文未用 STONE_DEEP(wc4 :167)〔句柄子容器批 V1〕〔营地图批 V6〕")
|
||||
main.ui.modals.camp.codex.closed.emit()
|
||||
await get_tree().process_frame
|
||||
main._on_camp_closed() # 关层收闭(营地与选档层同收+开始层恢复——卡④ T3)
|
||||
await get_tree().process_frame
|
||||
main._on_save_select_closed() # 关闭被栈还原的选档层(动线序中间态——卡④ 换代点)
|
||||
await get_tree().process_frame
|
||||
if main.ui.modals.camp_overlay.visible or not main.ui.screens.start_overlay.visible:
|
||||
_problems.append("营地关闭后未恢复开始层")
|
||||
if main.ui.modals.camp.scene.visible or not main.ui.screens.start_overlay.visible:
|
||||
_problems.append("营地关闭后未恢复开始层〔句柄子容器批 V1〕")
|
||||
# ---- 选档界面行为走查(迭代 33 卡③):sl5 空槽新档链/sl6 有档槽进档链/sl7 删档二次确认双路径
|
||||
# /sl8 消费方分派单口/sl12 动线序不回闪。开层=函数直调(「进入存档」钮归卡② mn3——中间态在案);
|
||||
# 隔离=attach_slot_template 注入命名空间,夹具按槽直写(卡① 注入口)。----
|
||||
@@ -208,7 +216,7 @@ func _ready() -> void:
|
||||
new_btn.pressed.emit() # 真实按钮信号路径 → _on_save_select_new → create_slot+open_camp
|
||||
for fi in 3:
|
||||
await get_tree().process_frame
|
||||
samples.append([main.ui.modals.save_select_overlay.visible, main.ui.modals.camp_overlay.visible, main.ui.screens.start_overlay.visible])
|
||||
samples.append([main.ui.modals.save_select_overlay.visible, main.ui.modals.camp.scene.visible, main.ui.screens.start_overlay.visible])
|
||||
if samples[0][0]:
|
||||
_problems.append("[savesel] sl12 新档后选档层仍可见(落点开层未发生)")
|
||||
elif not samples[0][1]:
|
||||
@@ -217,7 +225,7 @@ func _ready() -> void:
|
||||
_problems.append("[savesel] sl12 动线序违约:开始层在落点帧恢复(回闪一帧)")
|
||||
if main.save_manager.slots.active_slot() != 1 or not FileAccess.file_exists(csel_tpl % 1):
|
||||
_problems.append("[savesel] sl5 新档链失守(active=%d 应=1 且槽1 白板应落盘)" % main.save_manager.slots.active_slot())
|
||||
var occluded: Array = main.ui.modals.flow.stack._occluded.get(main.ui.modals.camp_overlay, [])
|
||||
var occluded: Array = main.ui.modals.flow.stack._occluded.get(main.ui.modals.camp.scene, [])
|
||||
if not occluded.has(main.ui.modals.save_select_overlay):
|
||||
_problems.append("[savesel] sl12 选档层被关闭而非栈记账挂起(先关后开形态——遮挡挂起中间态钉死)")
|
||||
if int((JSON.parse_string(FileAccess.get_file_as_string(csel_tpl % 1)) as Dictionary).get("meta", {}).get("keystone_balance", -1)) != 0:
|
||||
@@ -235,7 +243,7 @@ func _ready() -> void:
|
||||
await get_tree().process_frame
|
||||
if main.save_manager.slots.active_slot() != 2:
|
||||
_problems.append("[savesel] sl6 进档链失守(active=%d 应=2——激活该槽)" % main.save_manager.slots.active_slot())
|
||||
if not main.ui.modals.camp_overlay.visible or main.ui.modals.save_select_overlay.visible:
|
||||
if not main.ui.modals.camp.scene.visible or main.ui.modals.save_select_overlay.visible:
|
||||
_problems.append("[savesel] sl6 落点未开营地层或选档未隐藏")
|
||||
main._on_camp_closed()
|
||||
await get_tree().process_frame
|
||||
@@ -668,6 +676,51 @@ func _ready() -> void:
|
||||
# 卡④大门 T5 接收,两头登记禁静默删除;续玩钮已退役,主菜单确认链已摘 mn6)。
|
||||
# ① 战斗收口断点写盘断言保留(上方——冒险流直调中间态 mn10)。
|
||||
|
||||
# ---- 大门两分支断言段(卡④ T5 接收——卡② 移交落点;V3 断言面)----
|
||||
# 驱动=营地场景根点选信号(真实路由)→组合根 _on_camp_object_pressed→确认弹窗。
|
||||
# 无断点=两出口(是/否);有断点=三出口(set_breakpoint 注入选路停点形——同下方开场行③先例)。
|
||||
# 判据绑可观测提交面:点大门不直接进冒险(is_adventure 翻转只在 confirmed 后);cancelled 恒=
|
||||
# 无变更退回营地(写口零调用——余额读数不变+营地根 visible);开局后营地场景屏隐藏。
|
||||
ProbeUiUtil.isolate_save(main, "smoke_click_probe_gate", true, false, true)
|
||||
main._camp_pres.open_camp()
|
||||
await get_tree().process_frame
|
||||
var bal_gate: int = main._camp_data()["balance"]
|
||||
main.ui.modals.camp.scene.object_pressed.emit(&"gate")
|
||||
await get_tree().process_frame
|
||||
if not main.ui.modals.confirm_dialog.is_open():
|
||||
_problems.append("大门无断点:确认弹窗未开(点大门应先出确认不直接进冒险)〔营地图批 V3〕")
|
||||
if main.run_scope.is_adventure:
|
||||
_problems.append("大门无断点:未确认即进冒险〔营地图批 V3〕")
|
||||
if main.ui.modals.confirm_dialog._secondary_btn.visible:
|
||||
_problems.append("大门无断点:次钮应隐藏(两出口形态)〔营地图批 V3〕")
|
||||
main.ui.modals.confirm_dialog.cancelled.emit()
|
||||
await get_tree().process_frame
|
||||
if not main.ui.modals.camp.scene.visible or main.run_scope.is_adventure or main._camp_data()["balance"] != bal_gate:
|
||||
_problems.append("大门取消:未无变更退回营地(写口零调用/营地根 visible 失守)〔营地图批 V3〕")
|
||||
main.ui.modals.camp.scene.object_pressed.emit(&"gate")
|
||||
await get_tree().process_frame
|
||||
main.ui.modals.confirm_dialog.confirmed.emit() # 「是」→开始新冒险
|
||||
await get_tree().process_frame
|
||||
if not main.run_scope.is_adventure or main.ui.modals.camp.scene.visible:
|
||||
_problems.append("大门确认:冒险未发起或营地场景屏未隐藏〔营地图批 V3〕〔营地图批 B1〕")
|
||||
# 有断点三出口(选路停点形注入——同开场行③ set_breakpoint 先例)
|
||||
main.save_manager.set_breakpoint({
|
||||
"master_seed": 42, "rng_counter": 0, "hero_hp": 30, "gp": 10, "keystone": 0,
|
||||
"level_index": 1, "bonus": {"atk": 0, "max_hp": 0, "armor_class": 0, "ap": 0},
|
||||
"shop_purchased": {}, "relics": [], "keystone_drops": [], "bonus_taken": {},
|
||||
"node_id": -1, "visited_ids": [], "graph_gen_v2": 1,
|
||||
})
|
||||
main._camp_pres.open_camp()
|
||||
await get_tree().process_frame
|
||||
main.ui.modals.camp.scene.object_pressed.emit(&"gate")
|
||||
await get_tree().process_frame
|
||||
if not main.ui.modals.confirm_dialog.is_open() or not main.ui.modals.confirm_dialog._secondary_btn.visible:
|
||||
_problems.append("大门有断点:三出口形态失守(次钮应现形)〔营地图批 V3〕")
|
||||
main.ui.modals.confirm_dialog.secondary_confirmed.emit() # 「开始新冒险」出口
|
||||
await get_tree().process_frame
|
||||
if not main.run_scope.is_adventure or main.ui.modals.camp.scene.visible:
|
||||
_problems.append("大门有断点次确认:冒险未发起或营地未隐藏〔营地图批 V3〕")
|
||||
|
||||
# ---- 开场行三路径段(迭代36 wc1/wc2——真实入口驱动;隔离新档)----
|
||||
# 驱动设计(0/0 白板局生存性不成立的实证处置——L2 记录进实现报告):
|
||||
# ① 菜单开新局·白板反向=独立短局:0/0 滑条开局断言 L1 开场行零后缀(不开驱动——
|
||||
|
||||
@@ -45,15 +45,11 @@ func _pairs() -> Array:
|
||||
["商店·爬价规则墨/暖亮页底", UiKit.WARM_SOFT, UiKit.BG_BRIGHT, 1.0],# 货架面爬价规则行(page_shell 亮底)
|
||||
["商店·货架卡名墨/货架板", UiKit.INK_TITLE, UiKit.PANEL_DATA, 1.0], # bcard 货架卡商品名(换 TG 带后未机检位)
|
||||
["商店·货架价签墨/货架板", UiKit.GOLD_INK, UiKit.PANEL_DATA, 1.0], # bcard 价签「N ◈」(深金墨 5.21:1)
|
||||
["营地·等级章字/头带深棕", UiKit.INK_ON_DEEP, UiKit.CAMP_HEADER_BAND, 1.0],# 锻造行 Lv 章(木底小章亮墨)
|
||||
["营地·柜台头带字/头带深棕", UiKit.WARM, UiKit.CAMP_HEADER_BAND, 1.0], # 三柜台头带标题(暖白 bold)
|
||||
["营地·铭牌副题墨/铭牌板", UiKit.STONE_DEEP, UiKit.PANEL_DATA, 1.0],# 营地铭牌副题「跨局成长账本…」(灰石深化 5.98:1)
|
||||
["营地·行名墨/行板", UiKit.INK, UiKit.CAMP_ROW_PLATE, 1.0], # 锻造/工坊行名(墨族压暖米行板)
|
||||
["营地·行价格墨/行板", UiKit.STONE_DEEP, UiKit.CAMP_ROW_PLATE, 1.0],# 锻造行「N 钥石」价签/工坊进度行(灰石深化 6.70:1)
|
||||
["营地·树分组头墨/柜台板", UiKit.GOLD_INK, UiKit.PANEL_DATA, 1.0],# 天赋树脉分组头「·锻造脉·」(深金墨 5.21:1)
|
||||
["营地·树行名墨/柜台板", UiKit.INK_LABEL, UiKit.PANEL_DATA, 1.0], # 天赋树行「名 Lv0/1」(标签深墨)
|
||||
["营地·工坊状态墨/行板", UiKit.GOLD_INK, UiKit.CAMP_ROW_PLATE, 1.0],# 工坊状态字「已解锁」(深金墨 5.84:1·最不利现役态)
|
||||
["营地·最近冒险墨/暖亮底", UiKit.WARM_SOFT, UiKit.BG_BRIGHT, 1.0], # 底栏最近冒险条带(暖白次级)
|
||||
["设置·警示文/设置板", UiKit.INK_HINT, UiKit.PANEL_DATA, 1.0], # 设置警示文/后果说明(暖棕提示墨)
|
||||
["设置·选项标签/设置板", UiKit.INK_LABEL, UiKit.PANEL_DATA, 1.0], # 设置行标签/状态字(标签深墨)
|
||||
["三选一·停点头部墨/暗页底", UiKit.WARM_SOFT, UiKit.BG_ROOT, 1.0], # 三选一停点头部/回血反馈行(page_shell 根底档)
|
||||
|
||||
+28
-18
@@ -25,34 +25,44 @@ func _ready() -> void:
|
||||
# 营地先行段只换 meta 不换 save_manager——冒险段换注零档在前)----
|
||||
ProbeUiUtil.isolate_save(main, "smoke_ui_probe_camp", false, false, false)
|
||||
if not ProbeUiUtil.open_camp_via_savesel(main, "smoke_ui_probe_camp"):
|
||||
problems.append("营地入口缺失(选档层新档钮——mn9 新路径驱动中断)")
|
||||
problems.append("营地入口缺失(选档层新档钮——mn9 新路径驱动中断)〔句柄子容器批 V1〕")
|
||||
else:
|
||||
await get_tree().process_frame
|
||||
if not main.ui.modals.camp_overlay.visible:
|
||||
problems.append("营地层未打开(进档开层新路径)")
|
||||
if not main.ui.modals.camp.scene.visible:
|
||||
problems.append("营地场景根未打开(进档开层新路径)〔句柄子容器批 V1〕")
|
||||
elif main.ui.screens.start_overlay.visible:
|
||||
problems.append("营地层打开时开始层未隐藏(规范 2.3 遮挡纪律)")
|
||||
problems.append("营地层打开时开始层未隐藏(规范 2.3 遮挡纪律)〔句柄子容器批 V1〕")
|
||||
else:
|
||||
if not String(main.ui.modals.camp_overlay._balance_label.text).begins_with("钥石"):
|
||||
problems.append("营地余额文案缺失(%s)" % main.ui.modals.camp_overlay._balance_label.text)
|
||||
if main.ui.modals.camp_overlay._tree_buy_btns.is_empty():
|
||||
problems.append("树淬炼柜台购买钮缺失(四柜台重排后树=主界面)")
|
||||
# 天赋树子界面(场景点选真实路由——木桩命中区进树界面;卡④ T5 深员改指)
|
||||
main.ui.modals.camp.scene.object_pressed.emit(&"dummy")
|
||||
await get_tree().process_frame
|
||||
if not main.ui.modals.camp.tree.visible:
|
||||
problems.append("天赋树子界面未打开(场景点选路由中断)〔营地图批 V2〕")
|
||||
if not String(main.ui.modals.camp.tree._balance_label.text).begins_with("钥石"):
|
||||
problems.append("营地余额文案缺失(%s)〔句柄子容器批 V1〕" % main.ui.modals.camp.tree._balance_label.text)
|
||||
if main.ui.modals.camp.tree._tree_buy_btns.is_empty():
|
||||
problems.append("树淬炼购买钮缺失(四柜台拆解后树=独立子界面)〔句柄子容器批 V1〕")
|
||||
else:
|
||||
var btn_by_id := {}
|
||||
for card2 in main.ui.modals.camp_overlay._tree_buy_btns:
|
||||
for card2 in main.ui.modals.camp.tree._tree_buy_btns:
|
||||
btn_by_id[String(card2.node_id)] = card2.btn
|
||||
if not btn_by_id.has("sp_hp") or bool(btn_by_id["sp_hp"].disabled):
|
||||
problems.append("脊柱生命 L1 白板可购钮未启用(无门槛——can_buy 不含余额面语义)")
|
||||
problems.append("脊柱生命 L1 白板可购钮未启用(无门槛——can_buy 不含余额面语义)〔句柄子容器批 V1〕")
|
||||
if not btn_by_id.has("att_socket2") or not bool(btn_by_id["att_socket2"].disabled):
|
||||
problems.append("同调位 2 前置未亮应禁用(点亮前置语义)")
|
||||
if main.ui.modals.camp_overlay._workshop_rows.size() != 12:
|
||||
problems.append("秘宝匣柜台行数错误(%d ≠ 12——迭代 22 秘宝批换代)" % main.ui.modals.camp_overlay._workshop_rows.size())
|
||||
main._on_camp_closed()
|
||||
problems.append("同调位 2 前置未亮应禁用(点亮前置语义)〔句柄子容器批 V1〕")
|
||||
main.ui.modals.camp.tree.closed.emit()
|
||||
await get_tree().process_frame
|
||||
# 秘宝匣子界面(场景点选真实路由——宝箱命中区)
|
||||
main.ui.modals.camp.scene.object_pressed.emit(&"chest")
|
||||
await get_tree().process_frame
|
||||
if main.ui.modals.camp.treasure._workshop_rows.size() != 12:
|
||||
problems.append("秘宝匣行数错误(%d ≠ 12——迭代 22 秘宝批换代)〔句柄子容器批 V1〕" % main.ui.modals.camp.treasure._workshop_rows.size())
|
||||
main.ui.modals.camp.treasure.closed.emit()
|
||||
await get_tree().process_frame
|
||||
main._on_camp_closed() # 关层收闭(营地与选档层同收+开始层恢复——卡④ T3)
|
||||
await get_tree().process_frame
|
||||
main._on_save_select_closed() # 关闭被栈还原的选档层(动线序中间态——卡④ 换代点)
|
||||
await get_tree().process_frame
|
||||
if main.ui.modals.camp_overlay.visible or not main.ui.screens.start_overlay.visible:
|
||||
problems.append("营地关闭后未恢复开始层(开合往返失守)")
|
||||
if main.ui.modals.camp.scene.visible or not main.ui.screens.start_overlay.visible:
|
||||
problems.append("营地关闭后未恢复开始层(开合往返失守)〔句柄子容器批 V1〕")
|
||||
# 换回全新零档(营地段购买态不泄入后续冒险段——确定性;先删后建防陈旧档泄入)
|
||||
ProbeUiUtil.isolate_save(main, "smoke_ui_probe_camp", true, false, true)
|
||||
main.ui.modals.debug_overlay.seed_edit.text = "42" # 种子钉死(种子框默认为空=非首局随机;本探针 start_single 第五路同吃此框,确定性禁依赖默认分支)
|
||||
|
||||
+109
-17
@@ -39,36 +39,118 @@ func _ready() -> void:
|
||||
_settle()
|
||||
|
||||
if not ProbeUiUtil.open_camp_via_savesel(main, "smoke_ui_struct_probe_menu"):
|
||||
problems.append("[camp] 营地入口缺失(选档层新档钮——mn9 新路径驱动中断)")
|
||||
problems.append("[camp] 营地入口缺失(选档层新档钮——mn9 新路径驱动中断)〔句柄子容器批 V1〕")
|
||||
else:
|
||||
_settle()
|
||||
await _audit("camp", [main.ui.modals.camp_overlay])
|
||||
# 营地灰字源 token 扫描(迭代36 wc4 静态半——源内零裸 UiKit.STONE;判别式=
|
||||
# STONE 出现次数 == STONE_DEEP 出现次数,即每处 STONE 都带 _DEEP 后缀)
|
||||
var camp_src := FileAccess.get_file_as_string("res://presentation/views/camp_overlay_view.gd")
|
||||
if camp_src.count("UiKit.STONE") != camp_src.count("UiKit.STONE_DEEP"):
|
||||
problems.append("[camp] camp_overlay_view.gd 存在裸 UiKit.STONE(非 _DEEP 后缀——wc4 源扫描)")
|
||||
main._on_camp_closed()
|
||||
await _audit("camp", [main.ui.modals.camp.scene]) # 审计根=营地场景图(卡④ T5——CampOverlay 退役)
|
||||
# 营地灰字源 token 扫描(迭代36 wc4 静态半——营地域视图源内零裸 UiKit.STONE;判别式=
|
||||
# STONE 出现次数 == STONE_DEEP 出现次数;卡④ T5 改扫场景根+四子界面+公共壳六件)
|
||||
var camp_stone := 0
|
||||
var camp_stone_deep := 0
|
||||
for vf in ["camp_scene_view", "forge_view", "treasure_view", "tree_view", "codex_view", "camp_sub_view_base"]:
|
||||
var vf_src := FileAccess.get_file_as_string("res://presentation/views/%s.gd" % vf)
|
||||
camp_stone += vf_src.count("UiKit.STONE")
|
||||
camp_stone_deep += vf_src.count("UiKit.STONE_DEEP")
|
||||
if camp_stone != camp_stone_deep:
|
||||
problems.append("[camp] 营地域视图存在裸 UiKit.STONE(非 _DEEP 后缀——wc4 源扫描)〔句柄子容器批 V1〕")
|
||||
# ---- 营地场景层序段(卡④ V1①——子节点序=layout 表 z 序逐层相等、各层纹理矩形与表逐值一致;
|
||||
# 锻炉可达(V2 场景点选路由)+顶栏位在座(V8 结构)+根态反参照(V9——根态零文字按钮))----
|
||||
var layout: CampSceneLayoutTable = main.db.presentation.camp_scene_layout
|
||||
var order_ok := true
|
||||
var rect_ok := true
|
||||
for i in layout.layers.size():
|
||||
var layer_node: Control = main.ui.modals.camp.scene.get_child(i)
|
||||
if String(layer_node.name) != "Layer_%s" % layout.layers[i].key:
|
||||
order_ok = false
|
||||
if layer_node.position != layout.layers[i].texture_rect.position or layer_node.size != layout.layers[i].texture_rect.size:
|
||||
rect_ok = false
|
||||
if not order_ok:
|
||||
problems.append("[camp] 场景子节点序≠layout 表 z 序(逐层相等失守)〔营地图批 V1〕")
|
||||
if not rect_ok:
|
||||
problems.append("[camp] 层贴图矩形≠layout 表(逐值一致失守)〔营地图批 V1〕")
|
||||
main.ui.modals.camp.scene.object_pressed.emit(&"forge")
|
||||
_settle()
|
||||
main._on_save_select_closed() # 关闭被栈还原的选档层(动线序中间态——卡④ 换代点)
|
||||
if not main.ui.modals.camp.forge.visible:
|
||||
problems.append("[camp] 点选锻炉→锻造子界面未开(场景点选路由中断)〔营地图批 V2〕")
|
||||
var hud_slot: Control = main.ui.modals.camp.scene.get_node_or_null("HudBandSlot")
|
||||
if hud_slot == null or hud_slot.custom_minimum_size.y != 48:
|
||||
problems.append("[camp] 顶栏 HUD 预留位缺失或高≠48(浮层覆盖不挤压画面)〔营地图批 V8〕")
|
||||
var scene_buttons := 0
|
||||
for n in main.ui.modals.camp.scene.get_children():
|
||||
if n is Button:
|
||||
scene_buttons += 1
|
||||
if scene_buttons != 0:
|
||||
problems.append("[camp] 场景根态存在文字按钮(反参照纪律——禁文字按钮列表形态)〔营地图批 V9〕")
|
||||
main.ui.modals.camp.forge.closed.emit()
|
||||
_settle()
|
||||
main._on_camp_closed() # 关层收闭(营地与选档层同收+开始层恢复——卡④ T3)
|
||||
_settle()
|
||||
|
||||
# ---- 生涯页:入口点击链(合成点击真路径=pressed.emit→组合根 _open_career)→
|
||||
# ---- 生涯页:入口=帐篷旁笔记本(卡④ T3 改挂——场景点选信号真实路由→组合根 _open_career)→
|
||||
# 结构断言族→只读巡检(契约 3)+零动效契约+零跳转契约(提纲 P4 甲)→组合根真实路径关闭。
|
||||
#(登记序/树序契约统一在全模态 _modal_registry_contract——boot 段跑)----
|
||||
# 生涯页驱动=函数直调中间态(卡② mn9/mn10——careerbtn 已撤,卡④ 营地笔记本改挂前无 UI 路径)
|
||||
main._open_career()
|
||||
# 营地语境:开始层全程隐藏(笔记本入口在营地场景根——关生涯回营地不回开始层,卡④ T3 语境分支)
|
||||
main._camp_pres.open_camp() # 重开营地场景根(笔记本入口语境)
|
||||
_settle()
|
||||
main.ui.modals.camp.scene.object_pressed.emit(&"notebook")
|
||||
_settle()
|
||||
if not main.ui.modals.career_overlay.visible or main.ui.screens.start_overlay.visible:
|
||||
problems.append("[career] 生涯页未打开或开始层未隐藏(函数直调中间态断裂)")
|
||||
problems.append("[career] 生涯页未打开或开始层未隐藏(笔记本改挂路径断裂)〔营地图批 V5〕")
|
||||
await _audit("career", [main.ui.modals.career_overlay])
|
||||
_career_readonly_contract(main)
|
||||
_career_zero_motion_contract(main)
|
||||
_career_nojump_contract(main)
|
||||
main._on_career_closed()
|
||||
_settle()
|
||||
if main.ui.modals.career_overlay.visible or not main.ui.screens.start_overlay.visible:
|
||||
problems.append("[career] 关闭后页未隐藏或开始层未恢复(模态栈单口失守)")
|
||||
if main.ui.modals.career_overlay.visible or main.ui.screens.start_overlay.visible:
|
||||
problems.append("[career] 关闭后页未隐藏或开始层回弹(营地语境分支失守)〔营地图批 V5〕")
|
||||
# ---- Esc 浮窗结构段(卡⑤——三钮在位且仅三+零动效契约+登记序在册+debug_badge 不波及)----
|
||||
main._camp_pres.open_camp()
|
||||
_settle()
|
||||
main.ui.modals.camp.scene.object_pressed.emit(&"gate")
|
||||
_settle()
|
||||
main.ui.modals.confirm_dialog.cancelled.emit() # 关大门弹窗(清场——浮窗段前提)
|
||||
_settle()
|
||||
var push_esc := func() -> void:
|
||||
var ev := InputEventKey.new()
|
||||
ev.keycode = KEY_ESCAPE
|
||||
ev.physical_keycode = KEY_ESCAPE
|
||||
ev.pressed = true
|
||||
main.get_viewport().push_input(ev, true)
|
||||
push_esc.call()
|
||||
_settle()
|
||||
if not main.ui.modals.camp.esc_overlay.visible:
|
||||
problems.append("[esc] 浮窗未唤起(结构段前提——营地语境 Esc 路由)〔ESC批 V1〕")
|
||||
var esc_btns := _buttons(main.ui.modals.camp.esc_overlay).size()
|
||||
if esc_btns != 3:
|
||||
problems.append("[esc] 浮窗三钮在位且仅三(实得 %d——禁第四钮)〔ESC批 V2〕" % esc_btns)
|
||||
var esc_static := FileAccess.get_file_as_string("res://presentation/views/camp_esc_overlay.gd") + FileAccess.get_file_as_string("res://presentation/main_esc_flow.gd")
|
||||
if esc_static.contains("create_tween") or esc_static.contains("UiKit.motion"):
|
||||
problems.append("[esc] 浮窗双件源码存在动效令牌(契约 6 零动效——直开直关)〔ESC批 V7〕")
|
||||
var esc_anim := _count_animplayers(main.ui.modals.camp.esc_overlay)
|
||||
if esc_anim != 0:
|
||||
problems.append("[esc] 浮窗子树 AnimationPlayer 非零(契约 6 零动效)〔ESC批 V7〕")
|
||||
var esc_src := FileAccess.get_file_as_string("res://presentation/views/camp_esc_overlay.gd") + FileAccess.get_file_as_string("res://presentation/main_esc_flow.gd")
|
||||
if esc_src.is_empty():
|
||||
problems.append("[esc] 零动效扫描面为空(源文件读失败——非空前置失守)〔ESC批 V7〕")
|
||||
# 退出项接线断言(卡⑤ V5——绑信号连接与调用链;headless 不可真退=静态判据+观测面局限申报)
|
||||
var quit_wired := false
|
||||
for c in main.ui.modals.camp.esc_overlay.quit_requested.get_connections():
|
||||
if c.callable.get_method() == "_on_esc_quit":
|
||||
quit_wired = true
|
||||
if not quit_wired:
|
||||
problems.append("[esc] 退出钮接线断链(quit_requested 连接目标≠_on_esc_quit)〔ESC批 V5〕")
|
||||
var quit_chain := FileAccess.get_file_as_string("res://presentation/main.gd") + FileAccess.get_file_as_string("res://presentation/main_esc_flow.gd")
|
||||
if not quit_chain.contains("MainEscFlow._on_quit(self)") or not quit_chain.contains("root._quit_game()"):
|
||||
problems.append("[esc] 退出调用链断裂(_on_esc_quit→_on_quit→_quit_game)〔ESC批 V5〕")
|
||||
if main.ui.screens.debug_badge.visible:
|
||||
problems.append("[esc] 浮窗开态 debug_badge 可见(发布态恒隐——float 类不注册 ModalStack 应零波及)〔ESC批 V8〕")
|
||||
push_esc.call()
|
||||
_settle()
|
||||
if main.ui.modals.camp.esc_overlay.visible:
|
||||
problems.append("[esc] 再按 Esc 未关浮窗(结构段收尾——Q2 单义切换)〔ESC批 V1〕")
|
||||
main._on_camp_closed() # 关营地复归菜单语境(后续选档段前提)
|
||||
_settle()
|
||||
|
||||
# ---- 选档界面(迭代 33 卡③):函数直调开层(「进入存档」钮归卡② mn3——点击链在卡② 承接),
|
||||
# sl1 三槽呈现/sl2 摘要三项逐槽读数/sl3 摘要禁项/sl4 操作集二分/sl9 重启链不预选。
|
||||
@@ -394,7 +476,7 @@ func _career_zero_motion_contract(main: Node) -> void:
|
||||
# ⑫模态登记/树序全量合同(V1——career 专属登记序契约推广到全部模态+屏壳;
|
||||
# 判据=main.ui.LAYER_CONTRACT 单一事实源:登记册序==合同模态序、直接子层树序==合同序逐对相等。
|
||||
# 两特例按合同数据表达:level_screen 宿住冒险屏壳(树序随宿主=全模态之下,遮挡语义归模态栈
|
||||
# screen_state 登记)、camp_overlay 成员与 camp_screen 屏壳同槽(屏壳树序代言成员登记位)。
|
||||
# screen_state 登记)、camp_scene 成员与 camp_screen 屏壳同槽(屏壳树序代言成员登记位)。
|
||||
# _career_registry_contract 的断言(career=状态面板后/确认弹窗前、树序同步)由本全量合同覆盖)
|
||||
# ⑭选档界面契约(卡③ sl1/sl2/sl3/sl4/sl9——呈现面全部来自喂入数据,视图零自判)
|
||||
func _save_select_contract(main: Node, tpl: String) -> void:
|
||||
@@ -516,7 +598,7 @@ func _modal_registry_contract(main: Node) -> void:
|
||||
elif lv.get_parent().get_index() >= main.ui.modals.legend_overlay.get_index():
|
||||
problems.append("[registry] 冒险屏壳应在全模态之下(宿主 idx=%d legend idx=%d)〔装配生命批 V1〕" % [
|
||||
lv.get_parent().get_index(), main.ui.modals.legend_overlay.get_index()])
|
||||
# ④ 营地同槽特例:camp_screen 屏壳树序夹商店层与设置层之间(成员 camp_overlay 登记位代言)
|
||||
# ④ 营地同槽特例:camp_screen 屏壳树序夹商店层与设置层之间(成员 camp_scene 登记位代言)
|
||||
var cs: Node = main.ui.screens.camp_screen
|
||||
if cs.get_index() <= main.ui.modals.shop_overlay.get_index() or cs.get_index() >= main.ui.modals.settings_overlay.get_index():
|
||||
problems.append("[registry] camp_screen 屏壳树序应夹商店与设置层之间(idx=%d shop=%d settings=%d)〔装配生命批 V1〕" % [
|
||||
@@ -719,3 +801,13 @@ func _start_columns_contract(main: Node) -> void:
|
||||
if box.get_global_rect().intersects(right.get_global_rect()):
|
||||
problems.append("[start][columns] 左列 %s 与右列 %s 相交(双列叠放回归——M2 缺陷闸)" % [
|
||||
box.get_global_rect(), right.get_global_rect()])
|
||||
|
||||
|
||||
# AnimationPlayer 全子树收集(零动效契约扫描面——_buttons 同款递归形态)
|
||||
func _count_animplayers(node: Node) -> int:
|
||||
var out := 0
|
||||
if node is AnimationPlayer:
|
||||
out += 1
|
||||
for child in node.get_children():
|
||||
out += _count_animplayers(child)
|
||||
return out
|
||||
@@ -192,6 +192,7 @@ func _suites() -> Array:
|
||||
{"path": "res://tests/unit/presentation/reward_overlay_test.gd", "expect": 0}, # 奖励节点 UI 直验(盲区补漏)
|
||||
{"path": "res://tests/unit/presentation/level_map_info_fog_test.gd", "expect": 0}, # 信息迷雾——呈现显隐/Boss 豁免/详情零显示/大图拟合
|
||||
{"path": "res://tests/unit/presentation/forge_workbench_test.gd", "expect": 0}, # 工作间两区六路线 UI 直验(V13 自动化前置面)
|
||||
{"path": "res://tests/unit/presentation/camp_scene_layout_test.gd", "expect": 0}, # 营地场景布局数据件校验(V14——fail-fast 判据+七命中区几何红线)
|
||||
{"path": "res://tests/unit/battle_settlement/damage_math_test.gd", "expect": 0},
|
||||
{"path": "res://tests/unit/battle_settlement/damage_controller_test.gd", "expect": 0},
|
||||
{"path": "res://tests/unit/battle_settlement/roll_multiplier_test.gd", "expect": 0}, # 掷点与乘区宿主(敌攻击类型轴/护甲掷点行为面/乘区接线/伤害类型克制与标错/fresh 池攻击链——批 B 自 smoke_all 迁入)
|
||||
|
||||
@@ -64,8 +64,8 @@ func _smoke_scene_split() -> void:
|
||||
var camp: Node = load("res://presentation/scenes/camp_screen.tscn").instantiate()
|
||||
root.add_child(camp)
|
||||
await process_frame
|
||||
check(camp.camp_overlay != null, "V2 营地屏壳独立实例化(camp_overlay 在位)")
|
||||
check(not camp.camp_overlay.visible, "V2 营地层默认隐藏(模态纪律)")
|
||||
check(camp.camp_scene != null, "V2 营地屏壳独立实例化(camp_scene 在位)")
|
||||
check(not camp.camp_scene.visible, "V2 营地层默认隐藏(模态纪律)")
|
||||
camp.queue_free()
|
||||
var adv: Node = load("res://presentation/scenes/adventure_screen.tscn").instantiate()
|
||||
root.add_child(adv)
|
||||
@@ -103,10 +103,10 @@ func _smoke_scene_split() -> void:
|
||||
chain_ok = false
|
||||
chain_detail += " %s(%d)≤%s(%d)" % [chain_prev.name, chain_prev.get_index(), node.name, node.get_index()]
|
||||
chain_prev = node
|
||||
check(chain_ok, "V1c 合同树序链逐对保序(运行期树序==LAYER_CONTRACT 序;违例:%s)〔装配生命批 V1〕" % chain_detail)
|
||||
check(chain_ok, "V1c 合同树序链逐对保序(运行期树序==LAYER_CONTRACT 序;违例:%s)〔装配生命批 V1〕〔句柄子容器批 V2〕" % chain_detail)
|
||||
# ③ 探针挂载假设句柄在座(main.X 一级路径——探针迁移面收口证明)
|
||||
check(main.ui.screens.start_overlay == main.ui.screens.menu_screen.start_overlay and main.ui.modals.camp_overlay == main.ui.screens.camp_screen.camp_overlay and main.ui.modals.level_screen == main.ui.screens.adventure_screen.level_screen and main.ui.screens.battle_root == main.ui.screens.adventure_screen.battle_root and main.ui.battle.board_zone.board_view == main.ui.screens.adventure_screen.board_view,
|
||||
"V2 组合根句柄指向屏壳成员(探针挂载假设 main.X 零迁移)")
|
||||
check(main.ui.screens.start_overlay == main.ui.screens.menu_screen.start_overlay and main.ui.modals.camp.scene == main.ui.screens.camp_screen.camp_scene and main.ui.modals.level_screen == main.ui.screens.adventure_screen.level_screen and main.ui.screens.battle_root == main.ui.screens.adventure_screen.battle_root and main.ui.battle.board_zone.board_view == main.ui.screens.adventure_screen.board_view,
|
||||
"V2 组合根句柄指向屏壳成员(探针挂载假设 main.X 零迁移)〔句柄子容器批 V1〕")
|
||||
check(main.run_scope != null and not main.run_scope.is_adventure,
|
||||
"V2 闲时会话自 _ready 即在(永非 null;迭代 27 T3——gp 影子账退役无账本成员)")
|
||||
main.queue_free()
|
||||
@@ -118,7 +118,7 @@ func _smoke_scene_split() -> void:
|
||||
func _topmost_visible_layer(main: Node) -> Node:
|
||||
var candidates: Array[Node] = [main.ui.screens.start_overlay, main.ui.screens.battle_root, main.ui.screens.inter_overlay,
|
||||
main.ui.modals.legend_overlay, main.ui.modals.node_overlay, main.ui.modals.level_screen, main.ui.modals.curio_overlay,
|
||||
main.ui.modals.end_overlay, main.ui.modals.shop_overlay, main.ui.modals.camp_overlay, main.ui.modals.settings_overlay,
|
||||
main.ui.modals.end_overlay, main.ui.modals.shop_overlay, main.ui.modals.camp.scene, main.ui.modals.settings_overlay,
|
||||
main.ui.modals.status_panel, main.ui.modals.career_overlay, main.ui.modals.confirm_dialog, main.ui.modals.debug_overlay]
|
||||
var best: Node = null
|
||||
var best_x := -1
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
extends SceneTree
|
||||
# 营地场景布局数据件校验套件(V14——camp_scene_layout.tres 加载期 fail-fast 判据+七命中区几何红线机检)
|
||||
# 覆盖:校验函数通过(键唯一/贴图在画布/命中成对/围墙带包络)· 七可点件键集 · 两两不相交 ·
|
||||
# 不越画面 · 不侵顶栏禁区 · 篝火命中只取下半(关系谓词)· 门扇对齐门洞缺口 · 布告板挂围墙带。
|
||||
# 断言全部为表内关系谓词——禁坐标字面量(数值单一事实源 = 数据行本表)。
|
||||
# 运行:godot --headless --path game --script res://tests/unit/presentation/camp_scene_layout_test.gd(expect 0)
|
||||
const Kit := preload("res://tests/unit/test_kit.gd")
|
||||
|
||||
const _EXPECTED_KEYS: Array[StringName] = [&"gate", &"forge", &"dummy", &"chest", &"notebook", &"board", &"campfire"]
|
||||
|
||||
|
||||
func _initialize() -> void:
|
||||
call_deferred("_test_layout_hotspot_geometry")
|
||||
|
||||
|
||||
func _test_layout_hotspot_geometry() -> void:
|
||||
var table: CampSceneLayoutTable = load("res://data/tables/camp_scene_layout.tres")
|
||||
Kit.check("V14 布局表加载且 schema 类在位〔营地图批 V14〕", table is CampSceneLayoutTable and table != null)
|
||||
if table == null:
|
||||
quit(Kit.finish("camp_scene_layout_test"))
|
||||
return
|
||||
var problems: Array[String] = table.validate()
|
||||
Kit.check("V14 校验函数通过(问题清单空,实得 %s)〔营地图批 V14〕" % [problems], problems.is_empty())
|
||||
var clickables: Array[CampSceneLayerSpec] = []
|
||||
for spec in table.layers:
|
||||
if spec.is_clickable():
|
||||
clickables.append(spec)
|
||||
Kit.check("V14 可点件数=7(实得 %d)〔营地图批 V14〕" % clickables.size(), clickables.size() == 7)
|
||||
var got_keys: Array[StringName] = []
|
||||
for spec in clickables:
|
||||
got_keys.append(spec.hotspot_key)
|
||||
got_keys.sort()
|
||||
var want_keys: Array[StringName] = []
|
||||
for k in _EXPECTED_KEYS:
|
||||
want_keys.append(k)
|
||||
want_keys.sort()
|
||||
Kit.check("V14 命中键集=七物件绑定表(实得 %s)〔营地图批 V14〕" % [got_keys], got_keys == want_keys)
|
||||
# 两两不相交(Rect2.intersects——贴边相触不算相交)
|
||||
var disjoint := true
|
||||
var pair := ""
|
||||
for i in clickables.size():
|
||||
for j in range(i + 1, clickables.size()):
|
||||
if clickables[i].hotspot.intersects(clickables[j].hotspot):
|
||||
disjoint = false
|
||||
pair = "%s×%s" % [clickables[i].key, clickables[j].key]
|
||||
Kit.check("V14 七命中区两两不相交(首违例 %s)〔营地图批 V14〕" % pair, disjoint)
|
||||
# 不越画面+不侵顶栏禁区
|
||||
var in_bounds := true
|
||||
var offender := ""
|
||||
for spec in clickables:
|
||||
if spec.hotspot.position.x < 0.0 or spec.hotspot.position.y < table.hud_band_h \
|
||||
or spec.hotspot.end.x > table.canvas.x or spec.hotspot.end.y > table.canvas.y:
|
||||
in_bounds = false
|
||||
offender = String(spec.key)
|
||||
Kit.check("V14 命中区不越画面且不侵顶栏禁区(y≥%d,违例 %s)〔营地图批 V14〕" % [table.hud_band_h, offender], in_bounds)
|
||||
# 篝火命中只取下半:命中区贴贴图底、严格小于贴图、起点在贴图内(火焰上段不可点)
|
||||
var fire: CampSceneLayerSpec = null
|
||||
var gate: CampSceneLayerSpec = null
|
||||
var board: CampSceneLayerSpec = null
|
||||
var wall: CampSceneLayerSpec = null
|
||||
for spec in table.layers:
|
||||
match String(spec.key):
|
||||
"campfire": fire = spec
|
||||
"gate": gate = spec
|
||||
"board": board = spec
|
||||
"wall": wall = spec
|
||||
var fire_ok := fire != null and fire.hotspot.end.y == fire.texture_rect.end.y \
|
||||
and fire.hotspot.size.y < fire.texture_rect.size.y \
|
||||
and fire.hotspot.position.y > fire.texture_rect.position.y
|
||||
Kit.check("V14 篝火命中只取下半(火堆贴底、火焰不点)〔营地图批 V14〕", fire_ok)
|
||||
# 门扇命中对齐门洞缺口(表内 gate_gap 字段关系谓词)
|
||||
var gate_ok := gate != null and gate.hotspot.position.x == float(table.gate_gap.x) \
|
||||
and gate.hotspot.end.x == float(table.gate_gap.y)
|
||||
Kit.check("V14 门扇命中对齐门洞缺口 %s〔营地图批 V14〕" % [table.gate_gap], gate_ok)
|
||||
# 布告板挂围墙带:命中顶落在围墙贴图带内
|
||||
var board_ok := board != null and wall != null \
|
||||
and board.hotspot.position.y >= wall.texture_rect.position.y \
|
||||
and board.hotspot.position.y <= wall.texture_rect.end.y
|
||||
Kit.check("V14 布告板命中挂围墙带〔营地图批 V14〕", board_ok)
|
||||
# 层序结构:10 层且 bg/wall 压前两位(z0/z1——子节点序=表序先验)
|
||||
var order_ok := table.layers.size() == 10 \
|
||||
and String(table.layers[0].key) == "bg" and String(table.layers[1].key) == "wall"
|
||||
Kit.check("V14 层数=10 且 bg/wall 占 z0/z1〔营地图批 V14〕", order_ok)
|
||||
# ConfigDB 装载链:表经单点注册进表现域容器且装载期校验过(fail-fast 钩子在位)
|
||||
var db = load("res://core/config_db.gd").new()
|
||||
var load_ok: bool = db.load_tables("res://data/tables", true)
|
||||
Kit.check("V14 ConfigDB 装载含营地布局表且校验过(is_ready=%s)〔营地图批 V14〕" % db.is_ready,
|
||||
load_ok and db.is_ready and db.presentation.camp_scene_layout != null)
|
||||
quit(Kit.finish("camp_scene_layout_test"))
|
||||
@@ -0,0 +1 @@
|
||||
uid://ckyd57l11408
|
||||
@@ -15,7 +15,7 @@ func _initialize() -> void:
|
||||
|
||||
func _row_by_id(ov) -> Dictionary:
|
||||
var out := {}
|
||||
for r in ov._forge._forge_rows:
|
||||
for r in ov._forge_rows:
|
||||
out[String(r.route_id)] = r
|
||||
return out
|
||||
|
||||
@@ -30,7 +30,7 @@ func _run() -> void:
|
||||
var sv = load("res://core/save_manager.gd").new(_TEST_SAVE)
|
||||
sv.load_from_disk()
|
||||
var mp = load("res://core/meta_progression.gd").new(db, sv)
|
||||
var ov = load("res://presentation/views/camp_overlay_view.gd").new()
|
||||
var ov = load("res://presentation/views/forge_view.gd").new()
|
||||
root.add_child(ov)
|
||||
var buys := []
|
||||
var unlocks := []
|
||||
@@ -42,16 +42,16 @@ func _run() -> void:
|
||||
# ① 锁定态:树钥匙未点亮 → 工作间不可见、两区零行板(无任何可交互购买路径)
|
||||
ov.open_camp({"balance": 999, "forge": mp.forge_shop_status(), "tree": []})
|
||||
Kit.check("锁定态:工作间不可见(forge_workshop 钥匙未点亮)〔锻造工坊批 V13〕",
|
||||
not ov._forge._forge_workbench.visible and ov._forge._forge_lock_l.visible)
|
||||
not ov._forge_workbench.visible and ov._forge_lock_l.visible)
|
||||
Kit.check("锁定态:两区零行板(占位纪律——零购买路径)〔锻造工坊批 V13〕",
|
||||
ov._forge._forge_zone_weapon.get_child_count() == 0 and ov._forge._forge_zone_armor.get_child_count() == 0)
|
||||
ov._forge_zone_weapon.get_child_count() == 0 and ov._forge_zone_armor.get_child_count() == 0)
|
||||
|
||||
# ② 解锁态:钥匙点亮 → 两区各三路线
|
||||
ov.open_camp({"balance": 500, "forge": mp.forge_shop_status(),
|
||||
"tree": [{"node_id": "forge_workshop", "level": 1}]})
|
||||
Kit.check("解锁态:工作间可见(钥匙点亮展开)〔锻造工坊批 V13〕", ov._forge._forge_workbench.visible)
|
||||
Kit.check("解锁态:工作间可见(钥匙点亮展开)〔锻造工坊批 V13〕", ov._forge_workbench.visible)
|
||||
Kit.check("两区各三路线(武器锻造区 3 + 护甲锻造区 3)〔锻造工坊批 V13〕",
|
||||
ov._forge._forge_zone_weapon.get_child_count() == 3 and ov._forge._forge_zone_armor.get_child_count() == 3)
|
||||
ov._forge_zone_weapon.get_child_count() == 3 and ov._forge_zone_armor.get_child_count() == 3)
|
||||
var rows: Dictionary = _row_by_id(ov)
|
||||
Kit.check("六路线行册恰全(sword/spear/staff/light/heavy/ward)〔锻造工坊批 V13〕",
|
||||
rows.has("sword") and rows.has("spear") and rows.has("staff")
|
||||
|
||||
@@ -52,7 +52,6 @@ func _init() -> void:
|
||||
_smoke_diag_button_retired()
|
||||
_status_panel_projection()
|
||||
_career_overlay_projection()
|
||||
_camp_recent_projection()
|
||||
quit(Kit.finish("theme_projection_test"))
|
||||
|
||||
|
||||
@@ -708,12 +707,6 @@ func _smoke_element_details() -> void:
|
||||
var shop_src: String = FileAccess.get_file_as_string("res://presentation/views/shop_overlay_view.gd")
|
||||
Kit.check("T5③ 商店卡片区垂直居中(ALIGNMENT_CENTER)",
|
||||
shop_src.contains("_cards_box.alignment = BoxContainer.ALIGNMENT_CENTER"))
|
||||
var camp_src: String = FileAccess.get_file_as_string("res://presentation/views/camp_overlay_view.gd")
|
||||
var camp_min := camp_src.count("custom_minimum_size = Vector2(0, 336)")
|
||||
Kit.check("T5③ 营地三 holder 统一 min 高 336(实测 %d 处)" % camp_min, camp_min == 3)
|
||||
var camp_fill := camp_src.count("size_flags_vertical = Control.SIZE_FILL")
|
||||
Kit.check("T5③ 营地四栏面板纵向 FILL 等高(实测 %d 处)" % camp_fill, camp_fill == 4)
|
||||
Kit.check("T5③ 三处锁文垂直居中在位", camp_src.count("SIZE_SHRINK_CENTER") >= 3)
|
||||
|
||||
|
||||
# ---- 诊断转储钮冒烟(角落钮不在玩家画面+转储入口在调试浮窗;V6)----
|
||||
@@ -796,20 +789,6 @@ func _all_labels(root: Node) -> Array:
|
||||
return out
|
||||
|
||||
|
||||
# ---- 营地最近冒险行投影(口径换代 V6:完成关数措辞钉子——open_camp 全量重建路径直调;
|
||||
# 最小档 data=recent 单条 completed 局,其余键缺省走 .get 兜底——与组合根 _camp_data 投影同键面)----
|
||||
func _camp_recent_projection() -> void:
|
||||
print("--- 营地·最近冒险行投影(open_camp 最小档)---")
|
||||
var camp = load("res://presentation/views/camp_overlay_view.gd").new()
|
||||
camp.open_camp({"balance": 0, "recent": [
|
||||
{"result": "completed", "levels_cleared": 2, "keystone_total": 5, "master_seed": 42}]})
|
||||
var recent_text: String = String(camp._side._recent_list.text)
|
||||
Kit.check("营地最近冒险行完成关数措辞(实际「%s」)〔口径换代 V6〕" % recent_text,
|
||||
recent_text.contains("完成 2 关") and not recent_text.contains("通关"))
|
||||
camp.visible = false
|
||||
camp.free()
|
||||
|
||||
|
||||
# ---- 生涯页只读投影一致性(汇总段六类九项逐行 == SaveManager 计数访问器/
|
||||
# MetaProgression 访问器读数;投影拼装与 HudPresenter.career_data 同构(同访问器族同序)。
|
||||
# 只读性连接巡检与零动效断言归 ui_struct_probe 呈现侧,本段只管数据面+旧档载入显示
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# 迭代 47 反哺点清单(实现批未写 design/ 与根规则文件——逐条待用户裁决后由文档批落文)
|
||||
|
||||
- 接收方:待办清单「营地交互重做·五张需求卡片」条目(裁决后逐条清掉)+各 owner 文档
|
||||
- 依据:卡⑥/卡④/卡⑤ §5 关联文档同步面全表义务格=反哺点·列清单
|
||||
|
||||
| # | 文档 | 位置 | 原句/现状 | 拟改 | 依据 |
|
||||
|---|---|---|---|---|---|
|
||||
| 1 | architecture.md | 呈现层模块清单/测试与质量域 | 无 UiCampModals/四子界面/CampRefreshBus/MainEscFlow/CampHudBand/CampSceneView 六新件行 | 增六件归属行(呈现层/组合根拆件)+LAYER_CONTRACT 槽变化(camp_overlay→camp_scene+四子界面+camp_esc_overlay)+产品码首个键盘输入入口(main._unhandled_input 契约 9 接线)注记 | 卡⑥/④/⑤ 落地实况 |
|
||||
| 2 | camp.md | §顶栏 :39-41 / §叠层与开合 :43-45 | 「刷新入口=营地刷新单口(卡⑤同口挂接)」未记实装;承载形态「归卡④ §9 代拍板域,本 spec 不预设值」 | 回填实装状态(单口=CampRefreshBus 已挂/时机清单三条)+承载形态=单一内页切换(场景根留底)拍板值落文 | 卡④ T2/T3+卡⑤ 实装 |
|
||||
| 3 | art-bible.md | §6.2 :393 围墙细条句 / §4.1 场景环境子板 | 「围墙层落盘按细条 (0,240,1280,70) 裁」;环境子板色值待登记 | 细条句补实装值 (0,261,1280,49)(Y 压缩桩身 43 锁定值精确,备选 A′ 在档);登记营地 32 色主色板(色值清单=artwork/2026-11-01-营地终稿后处理/换算式登记.txt,两道门合规零违例对) | 卡④ T1 实测+§0.3-3⑤ |
|
||||
| 4 | camp-scene-prompts.md | §2.3 坐标表 / §4 验收 | 贴图矩形=规划值(130×140 等);单张 ≤32 量化后 | 八物件 contain 实测尺寸表(board 130×121 等——呈报备案追认值)+量化实况注记 | 卡④ T1 换算式登记 |
|
||||
| 5 | 生涯.md | :72 营地行(P6 条带去向) | 「营地条带的去留是本提纲必答项——见 §五 P6」 | P6 注销(Q4=甲:条带随四柜台拆解撤下,逐局历史回看归生涯——本批已撤) | 卡④ Q4 裁定落地 |
|
||||
| 6 | 08-Alpha版本标准.md | :193 「键盘 / 手柄输入(排 Beta)」 | Beta 行未注记 Esc 已落地 | 行内加注「例外:营地语境 Esc 浮窗已落地(用户明示裁决,澄清⑤裁决 9;键盘面仍排 Beta——本批只落 Esc 一项)」 | 卡⑤ 契约 2/9 |
|
||||
| 7 | 待办清单.md | 营地交互重做条+UI 贴图重构条+图鉴挂起 | 条目状态「已编迭代 47」;贴图重构条对象注记;图鉴挂起 | 状态推进(完成即整条删除)+实况换代(三卡收口凭据);贴图重构条「四柜台对象变化」注记更新(柜台形态已退役);图鉴挂起条入口改挂注记 | 三卡实装 |
|
||||
| 8 | 体验验证清单.md | 新增目检条 | — | 登记 §实现报告 §6 五条(场景观感/点选反馈/大门篝火/Esc HUD/四子界面)——登记不阻塞 | 卡④ V11+卡⑤ V9 |
|
||||
| 9 | roadmap.md | 迭代 47 行+当前位 | 状态「待开工」 | 行换代(三卡实现报告列+状态)+当前位三行换代 | 迭代收口 |
|
||||
| 10 | shot_checker 色数判据 | tools/shot_checker.py A 段 | camp 屏唯一色数 ≥64 | L3 呈报在案(读法 A/B 待裁)——裁决后判据修正随批+待办清单登记条 | 停机呈报 2026-11-01 |
|
||||
| 11 | asset-path-map.md §3 / art-assets-checklist.md §3.5 | 营地 10 张路径行 | 登记超前注记 | 实装入库确认(scene_camp_* 十件在役+TEX_CAMP_* 十键消费)+终稿置换待用户游戏内终审注记 | 卡④ T1 |
|
||||
| 12 | ui_kit CAMP_HEADER_BAND 令牌 | ui_kit.gd :178 邻域+ui_contrast 表 | 令牌在役(营地域柜台头带消费随形态退役) | 令牌退役评估(消费面仅剩 keystone_badge 工厂与关卡屏/商店——营地域测点对已注销;随令牌批处置,非本批强删;审计记档 2 订正) | 卡④ T5 核签+审计记档 |
|
||||
@@ -0,0 +1,126 @@
|
||||
# 迭代 47 实现报告(卡⑥ 营地模态句柄子容器批+卡④ 营地场景图新建批+卡⑤ Esc 浮窗与营地顶栏批)
|
||||
|
||||
- 接收方:roadmap.md 迭代 47 行(实现报告列)+待办清单「营地交互重做·五张需求卡片」条目
|
||||
- 性质:代码实现批产出物(实现批唯一可写目录=reports/;design/ 与根规则文件零写入——反哺点清单另立)
|
||||
- 分支:iter47(worktree g-plan2-iter47)· 基线 5ad72f44 · 收口提交史见 §9
|
||||
|
||||
## 1. 各卡状态
|
||||
|
||||
| 卡 | 状态 | 提交 | 出口验证 |
|
||||
|---|---|---|---|
|
||||
| 卡⑥ 句柄子容器批 | 收口 | 3a9c6ff4 | --code 全套闸 all_green;V1/V2/V3 留痕齐 |
|
||||
| 卡④ 营地场景图批 | 施工完成(T6 出口闸等 shot_checker 裁决重跑) | aa4aa1dd/4b5e3f27/98470adc/5a0e7069/1243ffe6/52296872 | 七探针+system_test 全绿;V14 11 项绿;--code 闸 01-04/09/10 绿、05 渲染闸红=L3 呈报在案 |
|
||||
| 卡⑤ Esc 浮窗与顶栏批 | 施工完成(T4 出口闸同上) | 4e4232d8 | 冒烟 PASS+system_test 69/0+七探针全绿 |
|
||||
|
||||
## 2. 卡⑥ 实际改动—验收对照表(尾缀〔句柄子容器批 Vn〕)
|
||||
|
||||
| 需求点 | 改动 | 验收测试 | 层级 | 真实入口 | 判据绑定面 | 结果 |
|
||||
|---|---|---|---|---|---|---|
|
||||
| V1 句柄迁移零行为漂移 | ui_camp_modals.gd 新件;ui_modals 持 camp 删平铺;main_ui_build 装配 10 处;改指面 8 文件 43 处 | 五探针营地段+system_test V1c:94-106+句柄同一性链 :108 | 探针+系统 | 现役营地断言逐件复跑(断言零改寻址新) | 全段绿=零漂移;全仓 grep 零 modals.camp.overlay 残留 | 绿(V1 尾缀 34 处 grep 在位) |
|
||||
| V2 层序合同零漂移 | ui_registry node() 返回链改写(key 平铺不改名) | system_test V1c 合同树序链 | 系统 | LAYER_CONTRACT 单一事实源 | 树序链绿=合同落位零漂移 | 绿(V2 尾缀 :106 在位) |
|
||||
| V3 S13 读数 | ui_modals 类变量 14→14 | gdstyle gate+grep -c '^var ' 计数 | 静态 | static_scan.sh | gate 绿零 NEW+计数=14 留痕(观测面局限:闸对 14/15 同零命中,人工计数承载) | 绿(143 件零 NEW;计数 14) |
|
||||
|
||||
## 3. 卡④ 实际改动—验收对照表(尾缀〔营地图批 Vn/Bn〕)
|
||||
|
||||
| 需求点 | 改动 | 验收测试 | 层级 | 真实入口 | 判据绑定面 | 结果 |
|
||||
|---|---|---|---|---|---|---|
|
||||
| V1 场景图形态 | camp_scene_view 10 层铺底+layout.tres+camp_screen 改挂 | shot_probe camp 段(截图=场景图)+ui_struct 场景层序段+shot_checker 结构段 | 探针 | 进存档→选档→进档→营地场景屏 | 截图实拍=场景图形态(十层合成/门洞透路/七物件就位);子节点序=表 z 序逐层;贴图矩形逐值 | 绿(截图目检+层序段 11 层断言) |
|
||||
| V2 七物件可达+叠层退避 | 七命中区+object_pressed+组合根路由 | ui_probe/ui_click/ui_struct 场景点选段 | 探针 | 命中区→_gui_input→object_pressed→路由 | 锻炉/宝箱/木桩/布告板/笔记本/篝火/大门逐一 object_pressed 驱动可见性 | 绿(七件路由断言分散六探针全绿) |
|
||||
| V3 大门两分支+开局收闭 | confirm_dialog 三钮化+消费方编排扩展+main_overlay_flow 路由 | ui_click 大门两分支段 | 探针 | 场景点选 gate→确认弹窗→分派 | 点大门不直接进冒险(is_adventure 翻转只在 confirmed 后);cancelled 写口零调用+营地根 visible;开局后营地隐藏 | 绿(无断点两出口+有断点三出口 set_breakpoint 注入全过) |
|
||||
| V4 五界面功能+写口零回归 | 四 view 抽出+presenter 承接面+bus 单口 | forge_workbench_test(承载类同迁断言零改)+ui_click 购买链 | 单元+探针 | 意图信号→presenter→MetaProgression 写口 | 树购买出账+持久(reload 后级=1)/Fork 持久/锻造三意图——全链复跑绿 | 绿(12 项+点击链 0 问题) |
|
||||
| V5 生涯只读契约 | career 入口改挂笔记本(本体零改) | ui_struct career 段(笔记本真实路由) | 探针 | 笔记本命中→object_pressed→_open_career | 生涯页可达+三契约不破+营地语境关生涯不回开始层 | 绿 |
|
||||
| V6 图鉴挂起态 | codex_view 占位壳 | ui_click 灰字段(锚=结构位预留) | 探针 | 布告板命中→codex 开 | 占位锁文锚定+零激活禁行+非禁用态 | 绿 |
|
||||
| V7 篝火动线 | 路由 campfire→二次确认→on_camp_closed | screen_flow 回退段+ui_click? | 探针 | 篝火命中(只下半)→确认→主菜单 | 二次确认 confirmed 先于关层;确认后营地+选档同收+菜单显 | 绿(screen_flow ③步+T4 孤检) |
|
||||
| V8 顶栏位+刷新单口 | set_hud_band 预留位+camp_refresh_bus 新件 | ui_struct 顶栏位段+卡⑤ HUD 段 | 探针 | 写口尾→bus.refresh→现开界面+HUD | 顶栏位 48px 在座;写口尾一闸刷新(八尾改路由) | 绿 |
|
||||
| V9 反参照纪律 | 场景根态零按钮 | ui_struct 反参照段 | 探针 | 场景根子树 Button 计数 | 根态零文字按钮(禁文字按钮列表形态) | 绿 |
|
||||
| V10 美术约束 | shot_checker camp 骨架段+素材二器 | ui_contrast 令牌表+palette_check 读数 | 机检 | camp 截图+素材文件 | 见 §7 遗留读数义务(A 段色数判据=L3 呈报在案) | 部分(令牌 36 对绿;A 段红待裁) |
|
||||
| V11 目检登记 | 实机目检总清单 | 件核对(§6) | 目检 | 用户实机 | 登记即义务了结(不阻塞) | 已登记(§6) |
|
||||
| V12 探针迁移留痕 | F8 全量位点 | 件核对(本表+§8 迁移留痕) | 件核对 | 探针 diff 对账 | 逐点改前→改后 | 绿(§8) |
|
||||
| V13 反哺点清单 | §5 同步面 | 件核对 | 件核对 | 反哺点文档逐条 | 每条有落点 | 绿(反哺点文档) |
|
||||
| V14 layout 数据件校验 | schema validate+fail-fast 钩子 | camp_scene_layout_test.gd:_test_layout_hotspot_geometry(manifest 登记) | 单元 | 单测载入 .tres+ConfigDB 装载链 | 校验通过+七命中区几何红线+关系谓词零坐标字面量 | 绿(11 项) |
|
||||
| B1 组合根接线总改造 | main.gd 路由/三钮编排/篝火/收闭+bus | ui_click 大门段+screen_flow 篝火段 | 集成 | 确认分派/_resume/_start/bus.refresh | 三钮消费方编排 open 前设后分派;cancelled 零写口;篝火确认离场 | 绿 |
|
||||
| B2 CampOverlay 退役+四界面抽出 | overlay 删除+四 view+五句柄子容器 | forge_workbench_test+全仓件核 | 集成 | 五界面 open/close→模态栈单口 | 旧件零残留(件核一);承载类同迁断言零改 | 绿 |
|
||||
|
||||
## 4. 卡⑤ 实际改动—验收对照表(尾缀〔ESC批 Vn/Bn〕)
|
||||
|
||||
| 需求点 | 改动 | 验收测试 | 层级 | 真实入口 | 判据绑定面 | 结果 |
|
||||
|---|---|---|---|---|---|---|
|
||||
| V1 Esc 唤起四态 | camp_esc_overlay+main_esc_flow+main._unhandled_input | screen_flow Esc 步 | 探针 | push_input 合成 Esc(真实键盘路径) | 根态唤起/再按关窗/echo 零响应/子界面无反馈/设置开态不误关/菜单语境不唤起 | 绿(10 项) |
|
||||
| V2 浮窗三项 | setup_buttons 三钮 | ui_struct 浮窗段 | 探针 | 浮窗视图实例化 | 三钮在位且仅三(_buttons 递归计数) | 绿 |
|
||||
| V3 返回主菜单 | _on_return_to_menu(首步 close 浮窗) | screen_flow 返回动线段 | 探针 | return_requested→动线 | 浮窗自收+营地隐+选档收+菜单显(四可见性) | 绿 |
|
||||
| V4 设置双路径 | _on_settings+语境分支 | screen_flow 设置段 | 探针 | settings_requested→open→closed | 设置开浮窗恒 visible(树序遮挡非属性隐藏);关后回浮窗不回主菜单 | 绿 |
|
||||
| V5 退出项 | _on_quit→_quit_game 复用 | 连接链断言(main_ui_build 接线在位) | 静态 | quit_requested→_on_esc_quit→_quit_game | headless 不可真退=静态判据+观测面局限申报(本表) | 绿(接线段随装配绿证) |
|
||||
| V6 HUD 余额 | camp_hud_band+bus 挂册+进档尾刷新 | screen_flow HUD 段 | 探针 | 隔离档直写 _add_keystone(9999)→显式触发 bus.refresh | badge 文本=「钥石 9999」(单口现值,显式触发才变) | 绿 |
|
||||
| V7 零动效 | 直开直关 | ui_struct 浮窗段 | 探针 | 双件源码+子树扫描 | 零动效令牌+AnimPlayer=0(扫描面>0 非空前置) | 绿 |
|
||||
| V8 层序与遮挡 | contract 第六槽+node() | system_test V1c 复跑+ui_struct badge 段 | 系统+探针 | 合同表单一事实源 | 树序链含新槽逐对保序;badge 零波及 | 绿 |
|
||||
| V9 目检登记 | 实机目检总清单 | 件核对(§6) | 目检 | 用户实机 | 登记即义务了结 | 已登记(§6) |
|
||||
| V10 反哺点清单 | §5 同步面 | 件核对 | 件核对 | 反哺点文档 | 每条有落点 | 绿 |
|
||||
| B1 Esc 接线与浮窗 | 输入入口/薄委托/视图/新槽 | screen_flow+ui_struct | 集成 | 合成 Esc→路由→flow.open/close | 四态路由绑现开集合与调用记录(ui_struct 大门段 confirm_dialog._secondary_btn 直查申报:三钮化即被测改动本体、两/三出口形态唯一直观观测面、无公开访问器——审计 ⚠️ 项补注) | 绿 |
|
||||
| B2 HUD 落位与刷新 | band 新建/set_hud_band/bus 挂册 | screen_flow HUD 段+ui_struct 顶栏段 | 集成 | bus.refresh→band.refresh_camp→badge | badge=单口取值;顶栏位结构在座 | 绿 |
|
||||
| B3 设置语境分支与三出口 | _on_settings_closed 分支+三出口动线 | screen_flow 设置段+返回段 | 集成 | 三钮 pressed→MainEscFlow | 关设置回浮窗禁弹主菜单(反向断言);退出连接链 | 绿 |
|
||||
|
||||
## 5. 实现决定记录(代拍板追认单——随 commit 留痕汇总)
|
||||
|
||||
1. **承载形态=单一内页切换(场景根留底)**(卡④ §9-2 域内):模态栈 open 只隐上方登记层(modal_stack.gd:27 实测),四子界面登记于场景根之上且实底遮挡——双开互斥靠遮挡天然成立;V2 断言按留底派生(子界面开=场景根 visible 保持)。
|
||||
2. **围墙层处理路线 A″**(用户裁 A 后处理实现):去底(边界泛洪+奶油描边屏障 BG_TOL=50)→门洞手术(门柱内移+克隆桩列,缺口 675→480 源=240 终稿精确)→Y 轴压缩(桩身 609→86 源=43 终稿锁定值精确,整带 692→98 落盘 (0,261,1280,49) 底锚 y310);备选 A′(带高 70/桩身 62)存档 artwork 同目录。竖向克隆接缝 3× 放大可辨、1× 游戏尺度不可辨(申报)。
|
||||
3. **八物件 contain 落位尺寸**(呈报备案追认):board 130×121/gate 240×211/dummy 120×180/forge 240×193/tent 251×170/chest 106×90/notebook 100×66/campfire 160×149(锁定矩形 contain,命中矩形按锁定值);贴图锚定=底中心(帐篷/锻炉/宝箱/篝火/笔记本)+顶锚(门扇悬挂/布告板挂墙)。
|
||||
4. **营地主色板 32 色**(§4.1 场景环境子板两道门合规):各层独立量化→并集 272→最近对合并 120 轮→32 色零违例对;十层按终版色板重量化回写。色值清单=换算式登记.txt,登记 art-bible §4.1 走反哺点。
|
||||
5. **codex 锁文称谓订正**(L2):「柜台结构位预留」→「结构位预留」(零新文案——『柜台』随形态退役)。
|
||||
6. **set_close_path 未落独立方法**(L2 API 面):Q2 关闭路径=组合根 Esc 路由直呼 flow.close(浮窗),视图无自关通路——卡面「关闭由组合根路由」直译;bind_signals 承载三钮意图外发。
|
||||
7. **契约 9 分支序实证修正**:①先于②(设置开在浮窗之上态先命中无反馈)——首装②先被 screen_flow Esc 段实机场景证伪(2 红),按卡面编号归位后全绿。
|
||||
8. **CampSceneView 初始隐**:_init visible=false(登记模态初始隐——boot 态场景根盖菜单三红同源修复)。
|
||||
9. **ui_modals 头注/迁移面**:卡⑥ 头注换代(十二平铺+营地域子容器)✓;ui_struct 层序注释换代(camp_scene 代言)✓。
|
||||
10. **卡④ T0 预算预案兑现**:main.gd 15/15 恰贴上限——T3/T4/T5 实现零新增成员(路由走 MainOverlayFlow 静态件+薄委托)✓。
|
||||
11. **camp.md v2.3 定稿换代吸收**(2026-11-01 用户裁,后于卡面):①承载形态=五功能窗口·场景根留底+半透明压暗遮罩 0.6(实现初版实底屏——按定稿换装,四子界面壳+生涯页基底同批换);②Esc 有功能窗开着→先关最上层窗(覆盖卡⑤ 契约 9① 的 Q1 甲「子界面开态无反馈」——MainEscFlow ①分支改写,_other_modal_open 退役);③五窗互斥单开(遮罩 STOP 挡场景点击自然成立,零代码)。设置开在浮窗之上仍无反馈(契约 3 保留)。
|
||||
|
||||
## 6. 实机目检总清单(登记不阻塞——体验验证清单入册条目由文档批落)
|
||||
|
||||
1. 营地场景观感:十层构图/围墙门洞/纵深(V11——纵深稿「中景 2/3」可辨性)。
|
||||
2. 七物件辨识与点选反馈:悬停轮廓+浮动+名牌/按下位移/锻炉宝箱禁用态(未解锁档)。
|
||||
3. 大门两分支弹窗(三出口文案与位次)+篝火二次确认动线。
|
||||
4. Esc 浮窗三动线+HUD 余额观感+浮窗视觉面(卡⑤ V9)。
|
||||
5. 四子界面视觉(米板身壳/行板/返回钮位次)。
|
||||
|
||||
## 7. 遗留读数义务
|
||||
|
||||
1. **shot_checker A 段色数判据互斥**=L3 呈报在案(reports/停机呈报-shotchecker色数判据互斥-2026-11-01.md)——读法 A/B 待裁;裁决后判据修正随批+闸重跑追绿。
|
||||
2. palette_check 读数(V10 素材级):15 张 0 红灯 0 新增色(只读模式)——48 令牌 baseline 目录在库缺位,双门机检化=工程批事项(反哺点登记)。
|
||||
3. 用户在游戏内终审十层素材(2026-10-31 裁定预留)——终稿置换(若有)走反哺点。
|
||||
|
||||
## 8. 探针迁移留痕表(V12——F8 全量位点改前→改后)
|
||||
|
||||
| 位点 | 改前 | 改后 |
|
||||
|---|---|---|
|
||||
| screen_flow :54 营地旗标 | modals.camp.overlay | modals.camp.scene |
|
||||
| screen_flow 回退段 :119-125 | overlay.closed.emit()+手动关选档 | 篝火动线(object_pressed campfire+confirmed) |
|
||||
| screen_flow Esc 段(新增) | —(选档语境零响应段保留) | 十断言步 _step_camp_esc_and_hud |
|
||||
| ui_probe 营地段 :26-57 | overlay 余额/树钮/秘宝行 | 场景点选路由→tree/treasure 视图成员 |
|
||||
| ui_click 营地段 :60-250 | overlay 树链/灰字六源位 | 树链 tree view+灰字分扫 treasure/codex(锚去『柜台』)+savesel 三处场景根 |
|
||||
| ui_click 断点段(卡② 移交) | lvbtn 驱动(已随卡② 撤) | 大门两分支断言段(V3 落位——无断点/有断点 set_breakpoint 注入) |
|
||||
| ui_struct :45 audit | audit("camp",[overlay]) | audit("camp",[camp.scene]) |
|
||||
| ui_struct 源扫描 :48-50 | camp_overlay_view.gd 单件 | 营地域六件合计(场景根+四子界面+公共壳) |
|
||||
| ui_struct 生涯段 :54-69 | 函数直调 _open_career | 笔记本真实路由(open_camp 重入+object_pressed notebook+营地语境分支断言) |
|
||||
| ui_struct 场景段(新增) | — | 层序/矩形逐值+锻炉可达+顶栏位+反参照+Esc 浮窗段 |
|
||||
| ui_contrast 令牌表 :48-55 | 头带两行+铭牌副题+最近冒险 | 四行随形态注销(CAMP_HEADER_BAND 零消费随退);ROW_PLATE/PANEL_DATA 行保留 |
|
||||
| shot_probe :120-135 | 关闭营地钮收闭 | 截图=场景图+篝火动线收闭 |
|
||||
| system_test V2/:108/:121 | camp_overlay 成员/句柄 | camp_scene 三处机械随迁(T3) |
|
||||
| system_test V3g camp 分支 | overlay 开合 | 场景根开合自适配(on_camp_closed 关层收闭) |
|
||||
| forge_workbench_test :33 | 直载 camp_overlay_view+._forge._X | 直载 forge_view+扁平成员(断言零改 12 项绿) |
|
||||
| theme_projection :711-716/:801-810 | 等高源码断言+最近冒险投影 | 注销(卡面削弱申报授权——旧形态断言失去对象/条带 Q4 甲撤下) |
|
||||
|
||||
## 9. 提交史与闸况
|
||||
|
||||
3a9c6ff4 卡⑥T1 → aa4aa1dd 卡④T1 进度 → 4b5e3f27 卡④T2 → 98470adc 卡④T3 → 5a0e7069 卡④T4 → 1243ffe6 卡④T5 → 52296872 卡④T5 补 → 4e4232d8 卡⑤T1-T3。
|
||||
闸况:卡⑥ 出口 --code all_green(3a9c6ff4 对齐);卡④ T6 出口闸 01-04/09/10 绿、05 渲染闸红=shot_checker 判据互斥(L3 呈报在案——合回前重跑)。
|
||||
|
||||
## 10. 独立验收审计结论
|
||||
|
||||
独立审计报告=reports/iter47-验收审计-2026-11-01.md(未参与实现子代理执行;六条自跑抽查全绿:system_test 69/0、V14 11 项、forge_workbench 12 项、screen_flow 含 Esc 段、static_scan S13 零新增、ui_contrast 36 对)。
|
||||
|
||||
- 审计算术:对照表 42 行全查(✅33/⚠️8/❌1);判据绑定面重点四项全过;测试削弱=授权 6 件在案、未授权零;直查例外 5 处全有据(1 处补注记)。
|
||||
- 缺漏处置回执(实现方,审计处方最窄单元):
|
||||
1. 卡⑤ V5 退出项断言缺位→ui_struct Esc 段补静态接线断言(quit_requested 连接表目标=_on_esc_quit+调用链 _on_esc_quit→_on_quit→_quit_game 源扫描)+〔ESC批 V5〕尾缀——孤跑复验绿。
|
||||
2. 尾缀覆盖缺口→V4(购买出账/持久两行)/V6(图鉴锁文两行)补〔营地图批 V4/V6〕;V7 补显式二次确认断言(screen_flow 回退段)+〔营地图批 V7〕;B1/B3 补〔ESC批 B1/B3〕、B2 补〔ESC批 B2〕;卡④ B1/B2 各补一行。V4 的 forge_workbench 部分按审计处方记豁免(断言零改申报约束——补尾缀即违零改)。
|
||||
3. 记档项处置:V7 长度非空守卫已补一行;反哺点 #12 订正(CAMP_HEADER_BAND 消费面仅剩 keystone_badge 工厂等);V9 扫面注记(直接子层非递归——本段更正);confirm_dialog._secondary_btn 直查补申报(三钮化即被测改动本体、两/三出口形态唯一直观观测面、无公开访问器)。
|
||||
- 处置后结论:**通过**(缺漏 1 补齐+轻微尾缀补齐+记档 4 项处置;孤跑复验回执见下)。
|
||||
- 孤跑复验:ui_struct_probe 退出码 0(含 V5 新断言与 V7 守卫);screen_flow_probe 退出码 0(含 V7 显式断言与 B 尾缀段)。
|
||||
@@ -0,0 +1,128 @@
|
||||
# 迭代 47 独立验收审计(卡⑥ 营地模态句柄子容器批+卡④ 营地场景图新建批+卡⑤ Esc 浮窗与营地顶栏批)
|
||||
|
||||
- 接收方:`reports/iter47-实现报告-2026-11-01.md` §10(独立验收审计结论回填行)
|
||||
- 审计身份:未参与实现的独立审计方——只读三张需求卡、实际对照表、diff、测试件与实现报告,自跑最窄测试抽查,不采信报告「已全绿」
|
||||
- 审计对象:worktree `D:\code\g-plan2-iter47`(分支 iter47);diff 范围=基线 5ad72f44..HEAD(65b2a574),重塑后提交=469d856f 卡⑥/2ce70ac7 卡④/399ed3ad 卡⑤/65b2a574 文档收尾(原史在 backup/iter47-20261101-185917,审计只对 master..iter47 净 diff 负责)
|
||||
- 审计口径:test-conventions §8.7 四件事+卡④ §7/卡⑤ §7「独立验收审计」条;对照表逐行核对(三表全行,非抽样下限)、判据绑定面重点四项、削弱逐处核对、直查例外逐行核对
|
||||
- 本审计唯一写入件=本报告(reports/);产品码/测试码零改动
|
||||
|
||||
## 1. 对照表逐行抽查(实现报告 §2/§3/§4——三表全行)
|
||||
|
||||
判定标记:✅=通过(测试在役+尾缀可 grep+真实入口未绕改动点)/⚠️=通过但附注记/❌=缺漏。
|
||||
|
||||
### 1.1 卡⑥ §2(3 行全查)
|
||||
|
||||
| 行 | 判定 | 依据 |
|
||||
|---|---|---|
|
||||
| V1 句柄迁移零行为漂移 | ✅ | 尾缀〔句柄子容器批 V1〕grep 34 处(六文件逐处);改指面实测 8 文件 43 处 `modals.camp_overlay` 删除位逐一有 `modals.camp.*` 替换行(main_ui_build 10/ui_click 16/ui_probe 8/screen_flow 3/shot_probe 2/system_test 2/ui_struct 1/ui_registry 1——与 F4 清单全等);全仓 grep `camp.overlay` 零命中(探针残留清零核实);句柄同一性链 system_test :109(camp.scene==camp_screen.camp_scene)在役且当轮跑过;ui_camp_modals 六枚实件零空占位(契约 4);camp_overlay_view.gd 整件删除零悬挂 |
|
||||
| V2 层序合同零漂移 | ✅ | system_test :106 V1c 合同树序链带〔句柄子容器批 V2〕尾缀;ui_registry LAYER_CONTRACT key 平铺(camp_scene/forge_view/…/camp_esc_overlay)+node() 全部经 `modals.camp.*` 二层返回、`camp_overlay` 分支已删;ui_struct `_modal_registry_contract` 登记册逐点名含新槽 |
|
||||
| V3 S13 读数 | ✅ | `grep -c '^var '` ui_modals.gd=14(审计人工复核与报告留痕一致);ui_camp_modals.gd=6;static_scan gdstyle 闸绿(基线外新违规 0)——卡面「观测面局限申报」(闸对 14/15 同零命中)如实 |
|
||||
|
||||
### 1.2 卡④ §3(16 行全查)
|
||||
|
||||
| 行 | 判定 | 依据 |
|
||||
|---|---|---|
|
||||
| V1 场景图形态 | ✅ | ui_struct :58-70 层序段(子节点序==layout 表 z 序逐层+各层贴图矩形逐值)带〔营地图批 V1〕;shot_probe camp 段截图改场景图+收闭改篝火动线(真实入口=进存档→选档→进档) |
|
||||
| V2 七物件可达+叠层退避 | ⚠️ | 七件逐一驱动核实:forge(ui_struct :71-74)/dummy→tree(ui_probe)/chest→treasure(ui_probe)/notebook(ui_struct :95-98)/board→codex(ui_click :174)/gate(ui_click :688)/campfire(screen_flow :124)——驱动形态全为 `object_pressed.emit()` 信号发射(卡面 V2 判据绑定面明文「绑 object_pressed 信号发射面」,信号即视图公开提交面,合规);注记:`_gui_input` 命中判定段(topmost/press-release 同区/禁用过滤)无合成鼠标点击断言面——新件内部路径无旧断言被绕,判据按卡面钉信号面成立 |
|
||||
| V3 大门两分支+开局收闭 | ✅ | ui_click :679-722 大门两分支段七断言全带〔营地图批 V3〕——真实路由(object_pressed gate→组合根分派→ConfirmDialog);无断点两出口(次钮隐藏);cancelled 恒无变更(余额读数恒等+营地根 visible+is_adventure 恒假=写口零调用);confirmed 后 is_adventure 翻转+营地隐;有断点三出口(次钮现形)+secondary_confirmed 出口 |
|
||||
| V4 五界面功能+写口零回归 | ⚠️ | forge_workbench_test 承载类同迁(diff 逐 hunk 核实:仅 load 目标 camp_overlay_view→forge_view+`_forge.` 前缀扁平化,断言判据零改)实跑 12 项绿;ui_click 树购买链(出账/持久/Fork 切态持久)在役;注记:无〔营地图批 V4〕尾缀(见 §6 缺漏 2)——tree/fork 链断言带〔句柄子容器批 V1〕尾缀(卡⑥ 波先行改指所留) |
|
||||
| V5 生涯只读契约 | ✅ | ui_struct :89-106 笔记本真实路由(object_pressed notebook→_open_career)+三契约(只读巡检/零动效/零跳转)复跑+营地语境关生涯不回开始层双向断言;〔营地图批 V5〕尾缀两处在位 |
|
||||
| V6 图鉴挂起态 | ⚠️ | ui_click :174-183 布告板→codex 开+锁文「结构位预留」锚定+STONE_DEEP 取色——在役实跑;注记:无〔营地图批 V6〕尾缀(尾缀=〔句柄子容器批 V1〕);「零激活禁行+非禁用态」判据中非禁用态由 codex 可开承载、零激活无独立断言面(占位壳本无内容可钉——新断言绑不上属卡面「静态判据+注记申报」情形,报告未单列注记) |
|
||||
| V7 篝火动线 | ⚠️ | screen_flow :117-127 回退段(object_pressed campfire→confirmed→屏级互斥复归菜单)+shot_probe 收闭改接同动线——在役实跑;注记:无〔营地图批 V7〕尾缀(=〔句柄子容器批 V1〕,同 V4 成因) |
|
||||
| V8 顶栏位+刷新单口 | ✅ | ui_struct :75-77 HudBandSlot 结构断言(48px)带〔营地图批 V8〕;camp_refresh_bus 新件+presenter 八写口尾全改路由(diff 逐处核实 8 处 refresh_bus.refresh);on_camp_attune_toggle 口尾保持只刷不调 _refresh_presentations(契约 4「禁顺手统一」核实);bus 目标册=四子界面+HUD 栏(main_ui_build 装配) |
|
||||
| V9 反参照纪律 | ⚠️ | ui_struct :78-83 场景根零 Button 断言带〔营地图批 V9〕;注记:扫面=get_children 直接子层非递归(报告称「子树」)——HudBandSlot 在扫面内,嵌套 Button 不计(新断言范围注记,见 §6 记档 4) |
|
||||
| V10 美术约束 | ✅(如实「部分」) | ui_contrast 令牌段审计自跑绿(36 对测点全绿,与报告读数一致);A 段色数判据互斥红=L3 呈报在案(§6 记档 1)——报告「部分」判定诚实 |
|
||||
| V11 目检登记 | ✅ | 实现报告 §6 五条目检清单在案(登记不阻塞) |
|
||||
| V12 探针迁移留痕 | ✅ | 报告 §8 迁移表与 diff 逐位点对上(审计抽样七个位点全核实) |
|
||||
| V13 反哺点清单 | ✅ | reports/iter47-反哺点-2026-11-01.md 12 条逐条有落点(注:#12 事实性偏差见 §6 记档 2) |
|
||||
| V14 layout 数据件校验 | ✅ | camp_scene_layout_test.gd 11 断言实跑全绿(详见 §2);manifest 已登记 run_all.gd(+1 行) |
|
||||
| B1 组合根接线总改造 | ⚠️ | main.gd/main_overlay_flow/confirm_dialog 三钮编排与篝火动线 diff 全核实(gate/gate_new/campfire_leave 三消费方+cancelled 零写口);判据承载=V3 断言+screen_flow 回退段;注记:无〔营地图批 B1〕尾缀 |
|
||||
| B2 CampOverlay 退役+四界面抽出 | ✅ | camp_overlay_view.gd 整件删除(655 行)+四 view+camp_sub_view_base 抽出、全仓零残留(S12 旧件零残留闸绿+grep 核实);承载迁移断言零改实跑绿 |
|
||||
|
||||
### 1.3 卡⑤ §4(13 行全查)
|
||||
|
||||
| 行 | 判定 | 依据 |
|
||||
|---|---|---|
|
||||
| V1 Esc 唤起四态 | ✅ | screen_flow `_step_camp_esc_and_hud` 十断言全带〔ESC批 V1〕——push_input 真实键盘合成路径(非直呼 on_esc_input)、根态唤起/再按关窗/echo 零响应/子界面开态无反馈/设置开态不误关/关设置回浮窗/boot 菜单不唤起;ui_struct Esc 结构段另证唤起与再按关窗 |
|
||||
| V2 浮窗三项 | ✅ | ui_struct :124-126 `_buttons` 递归计数恰三带〔ESC批 V2〕;camp_esc_overlay 三钮+danger_button 源码核实 |
|
||||
| V3 返回主菜单 | ✅ | screen_flow :284-287 return_requested 真实信号→四可见性断言(浮窗自收/营地隐/选档收/菜单显)带〔ESC批 V3〕 |
|
||||
| V4 设置双路径 | ✅ | screen_flow :270-283 设置开→浮窗恒 visible(遮挡非属性隐藏)+关→回浮窗+start_overlay 恒假反向断言带〔ESC批 V4〕;语境分支谓词=camp_esc_overlay.visible(main_overlay_flow diff 核实,与契约 3 一致) |
|
||||
| V5 退出项 | ❌ | **缺漏 1(详见 §6)**——卡面验收测试=「ui_struct_probe 退出钮接线结构断言〔ESC批 V5〕」,全仓 grep 零该断言;报告改称「连接链断言(main_ui_build 接线在位)/静态判据」但静态断言未落码 |
|
||||
| V6 HUD 余额 | ✅ | screen_flow :263-267 隔离档直写 _add_keystone(9999)→显式触发 refresh_bus.refresh→badge 文本「钥石 9999」带〔ESC批 V6〕——单口取值+显式触发才变(契约 5 时机③) |
|
||||
| V7 零动效 | ⚠️ | ui_struct :127-132 双件源码令牌扫描+子树 AnimationPlayer 计数带〔ESC批 V7〕;注记:源码扫描无长度非空守卫(报告称「扫描面>0 非空前置」名实差——见 §6 记档 3) |
|
||||
| V8 层序与遮挡 | ✅ | 登记册逐点名(_modal_registry_contract)+system_test V1c 树序链含 camp_esc_overlay 新槽+badge 零波及断言带〔ESC批 V8〕;LAYER_CONTRACT 槽位=codex_view 与 settings_overlay 之间(契约 3 栈语义正解核实) |
|
||||
| V9 目检登记 | ✅ | 实现报告 §6 第 4 条在案 |
|
||||
| V10 反哺点清单 | ✅ | 反哺点清单 #6/#8/#1 在案有落点 |
|
||||
| B1 Esc 接线与浮窗 | ⚠️ | main._unhandled_input(KEY_ESCAPE+physical+pressed 非 echo)→MainEscFlow 四态路由 diff 全核实、判据单点=登记册现开集合;判据承载=V1/V2/V7/V8 断言;注记:无〔ESC批 B1〕尾缀 |
|
||||
| B2 HUD 落位与刷新 | ⚠️ | camp_hud_band 新件/set_hud_band 填值/bus 挂册 diff 全核实;判据承载=V6 断言;注记:无〔ESC批 B2〕尾缀 |
|
||||
| B3 设置语境分支与三出口 | ⚠️ | main_esc_flow 三出口+main_overlay_flow 语境分支 diff 全核实;判据承载=V3/V4 断言;注记:无〔ESC批 B3〕尾缀 |
|
||||
|
||||
## 2. 判据绑定面抽查(重点四项+一般项)
|
||||
|
||||
| 抽查项 | 判定 | 核实内容 |
|
||||
|---|---|---|
|
||||
| 卡④ V14(11 断言) | ✅ | 实跑 11 项全 PASS;断言全部为表内关系谓词——两两不相交(Rect2.intersects)、不越画面/不侵顶栏(y≥hud_band_h 表字段)、篝火只取下半(命中贴贴图底且严格小于贴图)、门扇对齐 gate_gap 表字段、布告板挂围墙带(与 wall 贴图带关系谓词)、层数=10+bg/wall 占 z0/z1、ConfigDB 装载链(load_tables fail-fast 钩子+is_ready);**零坐标字面量**核实(唯一常量=七键名与层数 10,非坐标;(520,760) 等值全部取自表字段输出) |
|
||||
| 卡④ V3(大门两分支段) | ✅ | 七断言从真实路由进入(object_pressed gate 信号=卡面钉定发射面);cancelled 写口零调用以「余额读数恒等+营地根 visible+is_adventure 恒假」三重可观测面钉死;confirmed 后 is_adventure 翻转+营地隐;三出口经 set_breakpoint 注入(同开场行③先例,非伪造红——注入的是前置数据非破坏断言) |
|
||||
| 卡⑤ V1(Esc 步) | ✅ | push_input(ev, true) 真实键盘合成路径(不更新 Input 单例动作态——与契约 9 禁轮询互证);echo=true 合成零响应;设置开态再按 Esc 浮窗不误关(契约 9① 先于②的分支序);关设置回浮窗+禁弹主菜单反向断言;boot 菜单语境不唤起(契约 9④) |
|
||||
| 卡⑥ V3(计数=14) | ✅ | 审计人工 grep 计数=14 与报告留痕一致;闸面(gdstyle 零 NEW)自跑绿;卡面观测面局限申报如实 |
|
||||
| 一般:V2 七物件分布 | ✅ | 六探针分散驱动逐一核实(§1.2 V2 行) |
|
||||
| 一般:卡⑤ V2/V7/V8 | ✅/⚠️ | 三钮恰三/零动效/登记序——V7 非空前置注记(§6 记档 3) |
|
||||
| 加跑:ui_contrast 探针 | ✅ | 审计自跑 PASS「36 对测点全绿」——与报告 V10「令牌 36 对绿」读数一致 |
|
||||
|
||||
## 3. 测试削弱核对(diff 全量删改断言逐处对卡)
|
||||
|
||||
**授权项清单(卡面在案,核对通过)**:
|
||||
|
||||
| # | 削弱处 | 授权依据 | 核实 |
|
||||
|---|---|---|---|
|
||||
| 1 | theme_projection_test 等高源码断言 3 条注销(min 高 336/SIZE_FILL×4/SHRINK_CENTER≥3) | 卡④ §7 削弱申报表行 1+F8 位点(:710-717,CampOverlay 四柜台形态退役断言失去对象) | ✅ |
|
||||
| 2 | theme_projection_test `_camp_recent_projection` 最近冒险投影段注销 | 卡④ §10 Q4=甲(2026-10-18 用户裁:最近冒险条带随四柜台拆解撤下)+F13——申报表未单列成行,报告 §8 迁移表已归并申报(「卡面削弱申报授权」句);授权链=卡面用户裁定,认 | ✅(注记:申报落点在 Q4+§8,非削弱表独立行) |
|
||||
| 3 | ui_contrast 四行注销(头带两行/铭牌副题/最近冒险行,43→39 对) | 卡④ §7 削弱申报表行 2「核签后段留或随注销」——核签事实:CAMP_HEADER_BAND 新营地域界面零消费(grep 核实,新界面只消费 ROW_PLATE/PANEL_DATA)、最近冒险行随 Q4 撤 | ✅ |
|
||||
| 4 | ui_click 断点确认段改走大门(卡② 移交接收) | 申报表行 3 | ✅(V3 落位) |
|
||||
| 5 | ui_probe 深员改指/screen_flow 营地键与回退段改指/shot_probe 收闭段改篝火/生涯段驱动改接 | 申报表行 4/5/6/7 | ✅(diff 逐处核实为改指非删除) |
|
||||
| 6 | forge_workbench_test 承载类同迁 | 申报表行 8「断言零改只换承载类」 | ✅(12 项判据逐字未动,仅 `_forge.` 前缀与 load 目标) |
|
||||
|
||||
**未授权项清单:零。** 全 diff 删除断言行 31 处逐条核对均有同判据替换行(探针断言计数 56 增:31 删;shot_probe 21=21、system_test 51=51、ui_contrast 结构断言 7=7、forge_workbench 12=12);无放宽阈值、无缩小在役扫描面、无真实入口换下层直调(object_pressed 信号发射面=卡面 V2 明文钉定,不属直调削弱)。卡⑤「零削弱申报」成立。
|
||||
|
||||
## 4. 内部字段直查受控例外核对
|
||||
|
||||
| 直查行 | 依据 | 判定 |
|
||||
|---|---|---|
|
||||
| ui_probe camp.tree._balance_label/_tree_buy_btns、camp.treasure._workshop_rows;ui_click treasure._workshop_holder | 卡④ §7 削弱申报表行 4(深员改指新界面成员——历史既有口径) | ✅ |
|
||||
| screen_flow band._badge.value_label.text | 卡⑤ §7 V6 判据绑定面明文钉 value_label.text(badge 工厂约定单点) | ✅ |
|
||||
| ui_click :694/:717 confirm_dialog._secondary_btn.visible | 本批新增成员(三钮化即被测改动本体)、两/三出口形态唯一直观观测面、无公开访问器 | ⚠️(对照表未注明直查理由——建议随缺漏补差补一句申报,不构成判红项) |
|
||||
| main_esc_flow :31 读 flow.stack._list(产品码跨类私有读) | 卡⑤ 契约 9 判据单点=ModalStack 登记册现开集合 sanctioned 读法(ModalStack 无公开现开集合访问器;代码注记自陈) | ✅ |
|
||||
| screen_flow HUD 段 main._camp_pres.views.refresh_bus 直呼 | 卡⑤ 契约 5 时机③「夹具直写后探针显式触发」授权 | ✅ |
|
||||
|
||||
## 5. 自跑抽查回执(worktree 内实跑;六条全绿)
|
||||
|
||||
| # | 命令 | 退出码 | 关键行 |
|
||||
|---|---|---|---|
|
||||
| 1 | `python tools/run_system_test.py` | 0 | 「69 项检查,0 项失败」「PASS(退出码/摘要失败数/脚本错误扫描 三闸全过)」 |
|
||||
| 2 | `godot --headless --path game --script res://tests/unit/presentation/camp_scene_layout_test.gd`(V14) | 0 | 11 条 [PASS] 逐条在案+「all green (11 checks)」 |
|
||||
| 3 | `godot --headless --path game --script res://tests/unit/presentation/forge_workbench_test.gd`(承载类迁移) | 0 | 12 条 [PASS]+「all green (12 checks)」——断言零改实证 |
|
||||
| 4 | `godot --headless --path game res://probe/screen_flow_probe.tscn`(含 Esc 段) | 0 | 「PASS — 六步主流程+回退路径全绿」(_ready 序含 `_step_camp_esc_and_hud`,Esc 段红即 FAIL) |
|
||||
| 5 | `bash game/tests/static_scan.sh`(S13 基线) | 0 | 「S13 ok」「基线外新违规 0 条,较登记值恶化 0 条」 |
|
||||
| 6(加跑) | `godot --headless --path game res://probe/ui_contrast_probe.tscn` | 0 | 「PASS — 对比度 36 对测点全绿」(与报告 V10 读数一致) |
|
||||
|
||||
render_gate 按审计范围禁跑(05 红=L3 呈报在案,见 §6 记档 1);MC 零跑(零数值零行为,符合卡面闸口径)。
|
||||
|
||||
## 6. 总结论
|
||||
|
||||
**不通过(限项)——缺漏 1 项+轻微缺漏 1 项+记档核对 4 项;缺漏 1 补齐并复核后可转通过。** 除下列缺漏外,三卡对照表、判据绑定面、削弱申报、直查例外、自跑抽查全部通过;无未授权测试削弱。
|
||||
|
||||
### 缺漏清单
|
||||
|
||||
1. **卡⑤ V5 退出项验收断言缺位**(对照表 ❌ 行)。卡面 §7 V5 验收测试=「ui_struct_probe.gd:_ready(退出钮接线结构断言)〔ESC批 V5〕」,判据绑定面=「钮 pressed 连接目标=_on_quit→_quit_game(绑信号连接与调用链)」;实际全仓 grep 零该断言(quit_requested/_on_esc_quit 连接链无任何落码检查),〔ESC批 V5〕尾缀零命中。报告对照表该行改称「连接链断言(main_ui_build 接线在位)」——接线代码在位属实(main_ui_build :242),但「静态判据」并未落码,「绿」的实质=装配期 connect 不报错的间接承载,不满足卡面「绑信号连接」的断言要求,对照表该行名不副实。卡面已申报 headless 不可真退的观测面局限并给出可行静态形态。**补法(最窄单元)**:ui_struct Esc 结构段加一条静态断言(如 quit_requested 连接表非空且连接目标=_on_esc_quit)+〔ESC批 V5〕尾缀,孤立验证后并套件复跑。
|
||||
2. **(轻微)尾缀覆盖缺口**。卡④ V4/V6/V7/B1/B2 与卡⑤ B1/B2/B3 无卡面 §7 规定的〔营地图批 Vn/Bn〕〔ESC批 Bn〕尾缀(grep 零命中);对应验证本体全部在役且当轮实跑(V4=forge_workbench 12 项+ui_click 购买链;V6=ui_click 灰字段;V7=screen_flow 回退段;B 行=对应 V 行断言承载),缺的是卡面「断言尾缀与卡片清单互相 grep」的对账形式。成因=卡⑥ 波先行改指保留〔句柄子容器批 V1〕尾缀+V4 受「断言零改」申报约束(补尾缀即违反零改,可申报豁免)。**补法**:V6/V7/B 行断言消息文本可在后续批补尾缀;V4 记录豁免依据即可。
|
||||
|
||||
### 记档核对项(在案事项复核,不算缺漏)
|
||||
|
||||
1. **05 渲染闸红(shot_checker A 段色数判据互斥)**=L3 呈报文件在盘(reports/停机呈报-shotchecker色数判据互斥-2026-11-01.md),但该文件 git **未跟踪**(?? 状态)——合回合并不携带至 master,归档链注意;合回前须用户裁决读法 A/B+闸重跑(实现报告 §7/反哺点 #10 已登记)。
|
||||
2. **反哺点 #12 事实性偏差**:称 CAMP_HEADER_BAND「现役消费面=ui_contrast 表注销四行后零消费」——实测 keystone_badge 工厂(ui_kit.gd :629-631)在役消费、新 CampHudBand 经该工厂消费、level_map_screen/shop_overlay_view 亦有消费;令牌退役评估前提失实,文档批裁决前须订正(ui_contrast 删行授权不受影响——删的是营地域头带/铭牌/条带测点对,非令牌本身)。
|
||||
3. **卡⑤ V7 名实差**:报告称源码扫描「扫描面>0 非空前置」——ui_struct :127-129 实现无长度非空守卫(FileAccess 读失败=空串静默通过);子树扫描面在浮窗实例在座前提下非空成立。建议后续批补一行长度守卫。
|
||||
4. **卡④ V9 扫面注记**:反参照断言扫面=场景根直接子层(get_children 非递归),报告称「场景根子树」;HudBandSlot 在扫面内,嵌套 Button 不计。新立断言无削弱对象,范围注记即可。
|
||||
|
||||
### 审计范围声明
|
||||
|
||||
本审计执行上列六条最窄抽查与静态读数+全量 diff/卡面/报告逐行核对;未跑 render_gate(在案红待裁)、未跑 MC、未跑 ui_probe/ui_click/ui_struct/shot_probe 单件直跑(其营地段断言经 system_test+screen_flow_probe+ui_contrast 实跑间接覆盖,且逐行静态核实);审计过程零产品码/测试码改动。
|
||||
Reference in new issue
Block a user