feat(迭代27 T5): 波五a 类型闸拉起+存量收口——审计器 0 存量+warning 配置在位
P1-6 类型闸(须 T1-T4 全落后——本波按执行顺序锁殿后): - tools/audit_type_hints.py 新机器闸(V7): R1 无类型容器注解/R2 有值返回缺返回类型/ R3 参数缺类型三规则+行级 # type-hint: ignore 显式白名单通道;产品码 core/data/presentation - 存量收口: 368 处显式 Array/Dictionary 非参数化注解→机械参数化(Array[Variant]/ Dictionary[Variant, Variant] 零行为面);13 处参数真类型(SaveManagerCore/ConfigDb/ BattleOrchestrator/MinesweeperRules/LevelRunner/SettingsStore 等) - 白名单豁免四处: board_generator generate/_attempt/legality/_finalize 的 db 参—— 测量面 _BoardRowStub 冒烟夹具鸭子型注入(typed 参拒 stub) - project.godot 拉起 gdscript/warnings/untyped_declaration=1(V7 源码断言在 smoke _smoke_type_gate) - static_scan 新 S9 类型闸规则;顺修历史 cd 错位(9-24 布局迁移后 /.. 落 game/ 致守卫 恒跳过静默空转——修复后 S1-S4/S9 首次实跑全绿)+S1/S2 增 ADR-0007-exempt 标记豁免通道 (main _seed_value 引擎熵源=文档化豁免面) 验收: 冒烟 1081/0(+V7×2)+run_all 27 套+static_scan 全绿+probe click+render golden+对拍三变体全同
This commit is contained in:
1 parent
8b9e55673f
commit
b605022001
58 files changed
+503
-384
No files matched your search
@@ -66,14 +66,14 @@ func on_slot_clicked(slot_handle: int) -> void:
|
||||
if slot_handle < 0:
|
||||
toast.show_toast("自动兑付件:满足条件自动生效,无需手动使用", "info")
|
||||
return
|
||||
var rec: Dictionary = {}
|
||||
var rec: Dictionary[Variant, Variant] = {}
|
||||
for r in inventory_projection():
|
||||
if int(r.get("handle", 0)) == slot_handle:
|
||||
rec = r
|
||||
break
|
||||
if rec.is_empty() or bool(rec.get("used", false)):
|
||||
return
|
||||
var arow: Dictionary = db.treasure_item_row(String(rec.get("item_id", "")))
|
||||
var arow: Dictionary[Variant, Variant] = db.treasure_item_row(String(rec.get("item_id", "")))
|
||||
if String(arow.get("target", "none")) == "none":
|
||||
attempt_use(slot_handle) # AP 类:显式无目标即用(不再伪造哨兵坐标)
|
||||
return
|
||||
@@ -92,7 +92,7 @@ func attempt_use(handle: int, cell: Variant = null) -> void:
|
||||
if settlement == null:
|
||||
return
|
||||
var target: Vector2i = cell if cell != null else NO_TARGET
|
||||
var v: Dictionary = settlement.use_treasure(handle, target)
|
||||
var v: Dictionary[Variant, Variant] = settlement.use_treasure(handle, target)
|
||||
if not bool(v.ok):
|
||||
toast.show_toast(String(v.get("reason", "无法使用")), "warn")
|
||||
return
|
||||
@@ -100,7 +100,7 @@ func attempt_use(handle: int, cell: Variant = null) -> void:
|
||||
refresh_slots()
|
||||
refresh_overlays()
|
||||
board_view.refresh() # 迭代 13 T8/D6——移除格即时落图(无移除态的件 diff 零变化幂等)
|
||||
var arow: Dictionary = db.treasure_item_row(String(v.get("item_id", "")))
|
||||
var arow: Dictionary[Variant, Variant] = db.treasure_item_row(String(v.get("item_id", "")))
|
||||
toast.show_toast("已使用 %s" % String(arow.get("display_name", "")), "info")
|
||||
|
||||
|
||||
@@ -115,11 +115,11 @@ func inventory_projection() -> Array:
|
||||
if ms != null:
|
||||
cb = func(_c: Vector2i) -> bool:
|
||||
return ms.has_unrevealed() # 只读查询面(排雷玩法 has_unrevealed——手搓全板双循环收口)
|
||||
var out: Array = []
|
||||
var cs: Dictionary = settlement.attune_convert_state() if settlement != null else {}
|
||||
var out: Array[Variant] = []
|
||||
var cs: Dictionary[Variant, Variant] = settlement.attune_convert_state() if settlement != null else {}
|
||||
var auto_seen := false # 自动兑付件是否已随骑库存出现(恒否——charges=0 不入骑库存;守合成行重复)
|
||||
for rec in runner.treasure_inventory.query_inventory(cb):
|
||||
var arow: Dictionary = db.treasure_item_row(String(rec.get("item_id", "")))
|
||||
var arow: Dictionary[Variant, Variant] = db.treasure_item_row(String(rec.get("item_id", "")))
|
||||
var dn := String(arow.get("display_name", ""))
|
||||
# 积点进度浮窗行(反哺批⑤——自动兑付件 C 区悬停 tooltip 补 N/M 进度;件 id 锁定=装配行唯一)
|
||||
var note := ""
|
||||
@@ -161,5 +161,5 @@ func refresh_overlays() -> void:
|
||||
var runner = _runner_get.call()
|
||||
if runner == null or runner.treasure_inventory == null or board_view == null:
|
||||
return
|
||||
var ov: Dictionary = runner.treasure_inventory.query_overlays()
|
||||
var ov: Dictionary[Variant, Variant] = runner.treasure_inventory.query_overlays()
|
||||
board_view.set_treasure_overlays(ov.get("mine_reveal", []), ov.get("reward_preview", []))
|
||||
Reference in new issue
Block a user