修复(迭代 41 测试债批): 9 套件归绿+静态扫描 S9/S10/S11 清零+删死常量 SCHEMA_VERSION——两个产品回归随批修(standee 补间目标改子对象 st/tune_sim 运行态收尾归还 run),测试面按 iter41 拆件改址(slots/meta_state/crossrun/_forge/_side);S9 类型闸 24 处(node_map 三处给 Array[int] 真类型,其余动态边界 type-hint: ignore 逐处注记)+S10 头注日期 4 处+S11 退役词 1 处;config_db 头注「--script 无 autoload」订正为实测事实(autoload 并存、共享 .tres resolver 归最后装载者)

This commit is contained in:
DKChan committed 2026-10-29 06:04:40 +08:00
1 parent 6dea23729b
commit 215da31591
23 files changed
+87 -63

No files matched your search

+3 -3
View File
@@ -7,9 +7,9 @@ extends RefCounted
## 三束按域收拢(u21——同 u20 形;views=视图句柄/getters=查询 Callable 活引用/flow=编排 Callable):
## 原 12 参长签名收 4 参——字段即原构造参数逐一同名迁移,键面=消费方改址合同。
var db
var views: Dictionary = {} # {camp_overlay, shop_overlay, toast, start_overlay, logger}
var getters: Dictionary = {} # {meta_get, save_get, runner_get}
var flow: Dictionary = {} # {open_modal, close_modal, refresh_presentations}
var views: Dictionary = {} # {camp_overlay, shop_overlay, toast, start_overlay, logger} # type-hint: ignore(三束异构混载——视图句柄/查询 Callable/编排 Callable)
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 束)
func _init(db_ref, views_bundle: Dictionary, getters_bundle: Dictionary, flow_bundle: Dictionary) -> void:
+3 -3
View File
@@ -7,9 +7,9 @@ extends RefCounted
## 三束按域收拢(u20——views=视图句柄/getters=查询 Callable 活引用〔禁快照〕/flow=编排 Callable):
## 原 16 参长签名收 4 参——字段即原构造参数逐一同名迁移,键面=消费方改址合同。
var db
var views: Dictionary = {} # {curio_overlay, end_overlay, board_view, toast}
var getters: Dictionary = {} # {meta_get, save_get, adventure_get, runner_get, adventure_mode_get}
var flow: Dictionary = {} # {open_modal, open_modal_after_playback, close_modal, refresh_presentations, fatal_screen, gp_summary}
var views: Dictionary = {} # {curio_overlay, end_overlay, board_view, toast} # type-hint: ignore(三束异构混载——视图句柄/查询 Callable/编排 Callable)
var getters: Dictionary = {} # {meta_get, save_get, adventure_get, runner_get, adventure_mode_get} # type-hint: ignore(同上——Callable 束)
var flow: Dictionary = {} # {open_modal, open_modal_after_playback, close_modal, refresh_presentations, fatal_screen, gp_summary} # type-hint: ignore(同上——Callable 束)
func _init(db_ref, views_bundle: Dictionary, getters_bundle: Dictionary, flow_bundle: Dictionary) -> void:
+5 -5
View File
@@ -196,11 +196,11 @@ static func outcome_text(outcome: Dictionary) -> String:
## 统计束收拢(u19——stats 六键 {wins, dmg_all, hp_left_win, hp_boss, rounds_all, death_nodes})
static func tune_sim_report(n: int, atk_pct: int, hp_pct: int, stats: Dictionary, base_hp: int) -> String:
var wins: int = stats.get("wins", 0)
var dmg_all: Array = stats.get("dmg_all", [])
var hp_left_win: Array = stats.get("hp_left_win", [])
var hp_boss: Array = stats.get("hp_boss", [])
var rounds_all: Array = stats.get("rounds_all", [])
var death_nodes: Dictionary = stats.get("death_nodes", {})
var dmg_all: Array = stats.get("dmg_all", []) # type-hint: ignore(stats 束 Variant 出值——元素类型归模拟域写入面,未参数化)
var hp_left_win: Array = stats.get("hp_left_win", []) # type-hint: ignore(同上)
var hp_boss: Array = stats.get("hp_boss", []) # type-hint: ignore(同上)
var rounds_all: Array = stats.get("rounds_all", []) # type-hint: ignore(同上)
var death_nodes: Dictionary = stats.get("death_nodes", {}) # type-hint: ignore(同上——键为败北节点标签)
var lines: Array[String] = []
lines.append("[b]模拟 N=%d(atk+%d%% / hp+%d%%)[/b]" % [n, atk_pct, hp_pct])
lines.append("关卡完成率 [color=#%s]%.0f%%[/color](%d/%d)" % [UiKit.HEX_LOG_WIN, 100.0 * float(wins) / float(maxi(1, n)), wins, n])
+3 -3
View File
@@ -50,10 +50,12 @@ func run(n: int) -> void:
await panel.get_tree().process_frame
logger.close_session()
panel.set_sim_report(HudPresenter.tune_sim_report(n, panel.atk_pct(), panel.hp_pct(), stats, _base_hp))
panel.set_sim_running(false)
_running = false
## 单局模拟域(循环体提函数——结果四桶记账;u19 stats 六键同构承载)
func _run_one_level(autoplay, stats: Dictionary, i: int, panel, logger) -> void:
func _run_one_level(autoplay, stats: Dictionary, i: int, panel, logger) -> void: # type-hint: ignore(驱动/面板/日志件鸭子型注入——同 run 构造缝)
var st = autoplay.run_level(db, SEED_BASE + i, 1, panel.atk_pct(), panel.hp_pct(), false, logger)
(stats["dmg_all"] as Array).append(st.hero_dmg)
(stats["rounds_all"] as Array).append(st.rounds)
@@ -64,5 +66,3 @@ func _run_one_level(autoplay, stats: Dictionary, i: int, panel, logger) -> void:
elif st.result == "defeat":
var key := "%d.%s" % [st.defeat_node_index, st.defeat_node_type]
stats["death_nodes"][key] = int(stats["death_nodes"].get(key, 0)) + 1
panel.set_sim_running(false)
_running = false
+2 -2
View File
@@ -75,7 +75,7 @@ func _build_world_stage() -> void:
## Control 文本半区域(round_label / stage_center / log_view 原样保留——C1 永久 Control)
func _build_text_half(db_ref) -> void:
func _build_text_half(db_ref) -> void: # type-hint: ignore(db 鸭子型注入——单测以最小 stub 构造)
var vb := VBoxContainer.new()
vb.add_theme_constant_override("separation", 4)
vb.set_anchors_preset(Control.PRESET_FULL_RECT)
@@ -124,7 +124,7 @@ func _build_center_row(vb: VBoxContainer) -> void:
## 壳层伴随件层域(最顶——世界站桩之上的 Control 触达面)+主角站桩注册(世界)+ 状态行伴随件(壳层)
func _build_companion_layer(db_ref) -> void:
func _build_companion_layer(db_ref) -> void: # type-hint: ignore(db 鸭子型注入——单测以最小 stub 构造)
_companion_layer = Control.new()
_companion_layer.set_anchors_preset(Control.PRESET_FULL_RECT)
_companion_layer.mouse_filter = Control.MOUSE_FILTER_IGNORE
+4 -4
View File
@@ -478,9 +478,9 @@ func _room_color(node: Dictionary, ctx: Dictionary) -> Color:
## 选路停点(候选非空)非候选通道降透明——金岔路从结构网分离(干线共线重叠缺陷的
## 视觉主因:不同源通道共用同一垂直干线,金边与石色边焊接成「整列可走」假象)
func _draw_passage_layer(canvas: Control, ctx: Dictionary) -> void:
var nodes: Array = ctx["nodes"]
var pos: Dictionary = ctx["pos"]
var cand_ids: Array = ctx["cand_ids"]
var nodes: Array = ctx["nodes"] # type-hint: ignore(ctx 束 Variant 出值——布局缓存数组未参数化)
var pos: Dictionary = ctx["pos"] # type-hint: ignore(同上——节点 id → 坐标)
var cand_ids: Array = ctx["cand_ids"] # type-hint: ignore(同上——候选 id 集)
var dim_passages: bool = not cand_ids.is_empty()
for node in nodes:
var from: Vector2 = pos[node]
@@ -496,7 +496,7 @@ func _draw_passage_layer(canvas: Control, ctx: Dictionary) -> void:
## 房间方块域:底色随行进态+Boss/候选描边+图标/字形+编号+类型文字标签
func _draw_room(canvas: Control, node: Dictionary, ctx: Dictionary) -> void:
var pos: Dictionary = ctx["pos"]
var pos: Dictionary = ctx["pos"] # type-hint: ignore(ctx 束 Variant 出值——节点 id → 坐标)
var p: Vector2 = pos[node]
var t := String(node.get("type", ""))
var nid := _id_of(node)
+9 -9
View File
@@ -134,7 +134,7 @@ func _set_hp(hp: int) -> void:
if st._hp_tween != null and st._hp_tween.is_valid():
st._hp_tween.kill()
st._hp_tween = create_tween()
st._hp_tween.tween_property(self, "st.hp_value", target, UiKit.motion(0.15))
st._hp_tween.tween_property(st, "hp_value", target, UiKit.motion(0.15))
# 主角/敌方共用——状态效果唯一展示面(壳层伴随件转发;空态 = 图标行隐藏不占位)
@@ -205,17 +205,17 @@ func set_pending(ptype: String, pid: String) -> void:
# 三档运动签名互异,灰度/剪影层可辨)。摇定时一次性短动画,随后静帧保持。
func _play_intent_motion() -> void:
var tw := create_tween()
tw.tween_property(self, "st._intent_scale", 1.6, UiKit.motion(0.10))
tw.tween_property(self, "st._intent_scale", 1.0, UiKit.motion(0.16))
tw.parallel().tween_property(self, "st._glyph_rot", 4.0, UiKit.motion(0.10))
tw.tween_property(self, "st._glyph_rot", 0.0, UiKit.motion(0.14))
tw.tween_property(st, "_intent_scale", 1.6, UiKit.motion(0.10))
tw.tween_property(st, "_intent_scale", 1.0, UiKit.motion(0.16))
tw.parallel().tween_property(st, "_glyph_rot", 4.0, UiKit.motion(0.10))
tw.tween_property(st, "_glyph_rot", 0.0, UiKit.motion(0.14))
if _intent_charge:
tw.tween_property(self, "st._intent_scale", 1.22, UiKit.motion(0.28)).set_trans(Tween.TRANS_SINE) # ③蓄力缓推
tw.tween_property(st, "_intent_scale", 1.22, UiKit.motion(0.28)).set_trans(Tween.TRANS_SINE) # ③蓄力缓推
tw.tween_interval(UiKit.motion(0.40)) # 定格微顿
tw.tween_property(self, "st._intent_scale", 1.0, UiKit.motion(0.18))
tw.tween_property(st, "_intent_scale", 1.0, UiKit.motion(0.18))
else:
tw.tween_property(self, "st._intent_scale", 1.26, UiKit.motion(0.11)) # ②二次弹跳(高举)
tw.tween_property(self, "st._intent_scale", 1.0, UiKit.motion(0.13))
tw.tween_property(st, "_intent_scale", 1.26, UiKit.motion(0.11)) # ②二次弹跳(高举)
tw.tween_property(st, "_intent_scale", 1.0, UiKit.motion(0.13))
# 资产挂点:tex 落位后字形隐退、纹理立绘顶位——零代码换装契约;tex=null 回退字形。
+1 -1
View File
@@ -466,7 +466,7 @@ const PANEL_DEFAULT := true # modal_shell 面板哨兵(非 StyleBox 实例
# 面板哨兵解析(六参收拢五参——三态:null=无面板〔原 with_panel=false〕/PANEL_DEFAULT=默认样式盒面板
# 〔原 with_panel=true+panel_sb=null〕/StyleBox 实例=自定义样式盒面板〔原双参形态〕;
# 判别用 is StyleBox——StyleBox 与布尔哨兵直接 != 属异类操作数违例)
static func _resolve_shell_panel(panel_sb) -> PanelContainer:
static func _resolve_shell_panel(panel_sb) -> PanelContainer: # type-hint: ignore(三态哨兵 bool/null/StyleBox 异构形参)
if panel_sb == null:
return null
var panel := PanelContainer.new()