iter41-卡1:核心数据面结构收敛批:85键全清——三族拆域+config_db归位容器+存档拆件+meta瘦身+adventure拆段+spawn束化;行为零变化,8新件在阈
This commit is contained in:
1 parent
bda377eb16
commit
a613a3cb90
157 files changed
+7453
-4288
No files matched your search
@@ -104,13 +104,13 @@ static func isolate_save(main, tag: String, mark_first_done: bool = false, with_
|
||||
var iso = SaveManagerScript.new(save_path)
|
||||
iso.load_from_disk()
|
||||
if mark_first_done:
|
||||
iso.mark_first_adventure_done()
|
||||
iso.meta_state.mark_first_adventure_done()
|
||||
# --script 模式无裸 autoload 标识符(run_all.gd 头注)——经 main 节点路径解析
|
||||
var sm = main.get_node("/root/SaveManager")
|
||||
if swap_save:
|
||||
sm.attach_path(save_path)
|
||||
sm.slots.attach_path(save_path)
|
||||
if mark_first_done:
|
||||
sm.mark_first_adventure_done()
|
||||
sm.meta_state.mark_first_adventure_done()
|
||||
iso = sm
|
||||
else:
|
||||
main.get_node("/root/MetaProgression").save = iso # 只换 meta 侧(营地段语义)——SaveManager 全局不动
|
||||
@@ -123,10 +123,10 @@ static func isolate_save(main, tag: String, mark_first_done: bool = false, with_
|
||||
# 驱动后写盘目标=隔离槽文件(持久化断言读 user://<tag>_slot_1.json)。返回 false=新档钮缺失(驱动中断)。
|
||||
static func open_camp_via_savesel(main, tag: String) -> bool:
|
||||
var sm = main.get_node("/root/SaveManager")
|
||||
sm.attach_slot_template("user://%s_slot_%%d.json" % tag)
|
||||
sm.slots.attach_slot_template("user://%s_slot_%%d.json" % tag)
|
||||
for i in range(1, 4): # 夹具清场——空槽起(陈旧槽文件会翻有档态、新档钮缺席)
|
||||
for suf in ["", ".tmp", ".corrupt.bak"]:
|
||||
var sp: String = sm.slot_path(i) + suf
|
||||
var sp: String = sm.slots.slot_path(i) + suf
|
||||
if FileAccess.file_exists(sp):
|
||||
DirAccess.remove_absolute(sp)
|
||||
main._open_save_select()
|
||||
|
||||
@@ -132,7 +132,7 @@ func _step_camp_back_to_menu() -> void:
|
||||
# 返回钮真实信号路径关闭→ESC 语境不响应(卡⑤ 契约 2 范围外——零实现即断言)。----
|
||||
func _step_save_select_open_back() -> void:
|
||||
ProbeUiUtil.isolate_save(main, "smoke_screen_flow_savesel", false, false, true)
|
||||
main.save_manager.attach_slot_template("user://smoke_screen_flow_savesel_slot_%d.json")
|
||||
main.save_manager.slots.attach_slot_template("user://smoke_screen_flow_savesel_slot_%d.json")
|
||||
var esb: Button = ProbeUiUtil.find_button(main._start_overlay, "进入存档", "prefix")
|
||||
if esb == null:
|
||||
_problems.append("[savesel] mn3 进入存档钮缺失(卡② 交付物)")
|
||||
|
||||
@@ -71,7 +71,7 @@ func _ready() -> void:
|
||||
_problems.append("树淬炼柜台购买钮缺失(点击路径——四柜台重排后树=主界面)")
|
||||
else:
|
||||
# 树钮句柄用后即取(refresh_camp 随刷重建树行板——旧钮 queue_free,跨刷新句柄必失效)
|
||||
iso_c.add_keystone(9999)
|
||||
iso_c.meta_state._add_keystone(9999)
|
||||
main.camp_overlay.refresh_camp(main._camp_data())
|
||||
await get_tree().process_frame
|
||||
var buy_btn: Button = null
|
||||
@@ -81,15 +81,15 @@ func _ready() -> void:
|
||||
if buy_btn == null:
|
||||
_problems.append("脊柱生命行缺失(点击路径)")
|
||||
else:
|
||||
var bal_before: int = iso_c.keystone_balance()
|
||||
var price: int = int(main.db.tree_node("sp_hp").get("price", 0))
|
||||
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.keystone_balance()) != bal_before - price:
|
||||
_problems.append("营地树购买未出账(%d→%d 应 −%d)" % [bal_before, iso_c.keystone_balance(), price])
|
||||
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])
|
||||
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.tree_level("sp_hp")) != 1:
|
||||
if int(iso_chk.meta_state.tree_state().nodes.get("sp_hp", 0)) != 1:
|
||||
_problems.append("营地树购买未持久(reload 后级 != 1)")
|
||||
# Fork 双态切换点击路径(V20——购=解锁默认 A,钮切 B;前置=同调位 1,先点亮)
|
||||
var socket_btn: Button = null
|
||||
@@ -123,7 +123,7 @@ func _ready() -> void:
|
||||
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.fork_side("fg_posture")) != "b":
|
||||
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 刷新行)----
|
||||
@@ -189,7 +189,7 @@ func _ready() -> void:
|
||||
if FileAccess.file_exists(cp):
|
||||
DirAccess.remove_absolute(cp)
|
||||
ProbeUiUtil.isolate_save(main, "smoke_click_probe_savesel", true, false, true)
|
||||
main.save_manager.attach_slot_template(csel_tpl)
|
||||
main.save_manager.slots.attach_slot_template(csel_tpl)
|
||||
var f_c2 := FileAccess.open(csel_tpl % 2, FileAccess.WRITE)
|
||||
f_c2.store_string(JSON.stringify({"version": 7, "meta": {"keystone_balance": 100,
|
||||
"adventure_total": 3, "adventure_cleared": 1, "tree_nodes": {}, "fork_sides": {}, "tree_struct": 2}}))
|
||||
@@ -215,8 +215,8 @@ func _ready() -> void:
|
||||
_problems.append("[savesel] sl12 动线序违约:选档隐藏帧营地层未可见(先关后开=回闪形态)")
|
||||
elif samples[0][2]:
|
||||
_problems.append("[savesel] sl12 动线序违约:开始层在落点帧恢复(回闪一帧)")
|
||||
if main.save_manager.active_slot() != 1 or not FileAccess.file_exists(csel_tpl % 1):
|
||||
_problems.append("[savesel] sl5 新档链失守(active=%d 应=1 且槽1 白板应落盘)" % main.save_manager.active_slot())
|
||||
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._modals._occluded.get(main.camp_overlay, [])
|
||||
if not occluded.has(main.save_select_overlay):
|
||||
_problems.append("[savesel] sl12 选档层被关闭而非栈记账挂起(先关后开形态——遮挡挂起中间态钉死)")
|
||||
@@ -233,8 +233,8 @@ func _ready() -> void:
|
||||
else:
|
||||
load_btn.pressed.emit()
|
||||
await get_tree().process_frame
|
||||
if main.save_manager.active_slot() != 2:
|
||||
_problems.append("[savesel] sl6 进档链失守(active=%d 应=2——激活该槽)" % main.save_manager.active_slot())
|
||||
if main.save_manager.slots.active_slot() != 2:
|
||||
_problems.append("[savesel] sl6 进档链失守(active=%d 应=2——激活该槽)" % main.save_manager.slots.active_slot())
|
||||
if not main.camp_overlay.visible or main.save_select_overlay.visible:
|
||||
_problems.append("[savesel] sl6 落点未开营地层或选档未隐藏")
|
||||
main._on_camp_closed()
|
||||
@@ -834,7 +834,7 @@ func _run_modal_probes_once() -> void:
|
||||
var oracle: Array = []
|
||||
for rec in rnr.treasure_inventory.query_inventory(Callable()):
|
||||
var rr: Dictionary = rec
|
||||
oracle.append({"name": String(main.db.treasure_item_row(String(rr.get("item_id", ""))).get("display_name", "")),
|
||||
oracle.append({"name": String(main.db.crossrun.treasure_items.row_by_id(String(rr.get("item_id", ""))).get("display_name", "")),
|
||||
"used": bool(rr.get("used", false))})
|
||||
var sd_curios: Array = (sd as Dictionary).get("curios", [])
|
||||
var curios_ok: bool = (sd_curios as Array).size() == (oracle as Array).size()
|
||||
@@ -896,7 +896,7 @@ func _run_modal_probes_once() -> void:
|
||||
var used_now: int = int(main.run_scope.settlement.presentation_snapshot().get("refresh_used", 0))
|
||||
if used_now != 1:
|
||||
_problems.append("刷新轮内计数错误(%d)" % used_now)
|
||||
var remain_expect: int = maxi(0, int(main.db.action_economy.refresh_cap_per_round) - used_now)
|
||||
var remain_expect: int = maxi(0, int(main.db.run.action_economy.refresh_cap_per_round) - used_now)
|
||||
if not main.ap_bar.refresh_remaining_text().contains(str(remain_expect)):
|
||||
_problems.append("HUD 刷新余量与快照推导失符(HUD='%s' 应含 %d)" % [main.ap_bar.refresh_remaining_text(), remain_expect])
|
||||
|
||||
|
||||
@@ -475,7 +475,7 @@ func _ready() -> void:
|
||||
# attune_param_sum 只读出口→set_fog_glow_bonus〕→视野 +4 生效与卸装复原。
|
||||
# settlement.attunement 手动注入=模拟 begin_battle enc 注入后的运行态〔注入面本体归
|
||||
# 冒烟+单测覆盖〕;不重启冒险——case⑯ 起既有板面继续用)
|
||||
main.save_manager.set_attunement_equipped(["wide_scout_band"])
|
||||
main.save_manager.meta_state.set_attunement_equipped(["wide_scout_band"])
|
||||
var p_lantern: Dictionary = main.build_adventure_params(main.save_manager, main.meta)
|
||||
if not (p_lantern.get("attunement", []) as Array).has("wide_scout_band"):
|
||||
_problems.append("case⑮ 装配未进开局参数面(attunement=%s 应含 wide_scout_band)" % str(p_lantern.get("attunement", [])))
|
||||
@@ -491,7 +491,7 @@ func _ready() -> void:
|
||||
_problems.append("case⑮ 卸装后视野未复原(lantern 应=0——契约复原语义显式重算)")
|
||||
if int(bv.cells_probe()[ring_cell].fog_state) == 0:
|
||||
_problems.append("case⑮ 卸装后 dist==R+1 格未复原遮蔽")
|
||||
main.save_manager.set_attunement_equipped([])
|
||||
main.save_manager.meta_state.set_attunement_equipped([])
|
||||
# ---- case⑯ 状态面板输入锁语义(R3——开层锁棋盘、关层恢复无残留;真实 push_input
|
||||
# 路径:入口角标本体 press+release 真点击 → 状态面板开;锁期挖掘点击零穿透;「继续」关层后
|
||||
# 同格挖掘重新到达——锁语义与既有模态同款,无状态残留。置于全 case 之尾:取格若需前沿移位
|
||||
|
||||
@@ -99,7 +99,7 @@ func _ready() -> void:
|
||||
problems.append("B 区轮次·阶段指示缺失(%s)" % main.stage.round_label.text)
|
||||
if main.stage.enemy_box.get_child_count() < 1:
|
||||
problems.append("B 区敌方站桩未构建(%d 个)" % main.stage.enemy_box.get_child_count())
|
||||
if main.ap_bar._dots.get_child_count() != int(main.db.action_economy.ap_per_round):
|
||||
if main.ap_bar._dots.get_child_count() != int(main.db.run.action_economy.ap_per_round):
|
||||
problems.append("D 区 AP 点阵数量错误(%d)" % main.ap_bar._dots.get_child_count())
|
||||
if main.ap_bar.refresh_remaining_text() == "":
|
||||
problems.append("D 区弃图刷新按钮文案缺失")
|
||||
|
||||
@@ -81,7 +81,7 @@ func _ready() -> void:
|
||||
if FileAccess.file_exists(spp):
|
||||
DirAccess.remove_absolute(spp)
|
||||
ProbeUiUtil.isolate_save(main, "smoke_ui_struct_probe_savesel", true, false, true)
|
||||
main.save_manager.attach_slot_template(ssel_tpl) # 注入口(激活态回零——sl9 重启链同构态)
|
||||
main.save_manager.slots.attach_slot_template(ssel_tpl) # 注入口(激活态回零——sl9 重启链同构态)
|
||||
var f_s1 := FileAccess.open(ssel_tpl % 1, FileAccess.WRITE)
|
||||
f_s1.store_string(JSON.stringify({"version": 7, "meta": {"keystone_balance": 555,
|
||||
"adventure_total": 7, "adventure_cleared": 2, "tree_nodes": {}, "fork_sides": {}, "tree_struct": 2}}))
|
||||
@@ -89,7 +89,7 @@ func _ready() -> void:
|
||||
var f_s3 := FileAccess.open(ssel_tpl % 3, FileAccess.WRITE)
|
||||
f_s3.store_string("broken json not a save{{{") # 槽3 坏档(窥视 readable=false→按空呈现)
|
||||
f_s3.close()
|
||||
if main.save_manager.active_slot() != 0:
|
||||
if main.save_manager.slots.active_slot() != 0:
|
||||
problems.append("[savesel] 开层前激活态非零(sl9 重启链——boot/注入面后应无激活)")
|
||||
main._open_save_select()
|
||||
_settle()
|
||||
@@ -201,8 +201,8 @@ func _ready() -> void:
|
||||
], 20)
|
||||
_settle()
|
||||
var ticket_row: Dictionary = main.shop_overlay._shelf_rows[0]
|
||||
if String(main.db.shop_pool_row("feat_ticket").get("display_name", "")) != "专长获取":
|
||||
problems.append("[shop_term] shop.tres 专长凭证件名未换代(现=%s)" % String(main.db.shop_pool_row("feat_ticket").get("display_name", "")))
|
||||
if String(main.db.run.shop.pool_row("feat_ticket").get("display_name", "")) != "专长获取":
|
||||
problems.append("[shop_term] shop.tres 专长凭证件名未换代(现=%s)" % String(main.db.run.shop.pool_row("feat_ticket").get("display_name", "")))
|
||||
if ticket_row.card.name_l.text != "专长获取":
|
||||
problems.append("[shop_term] 专长凭证件名未用物品名「专长获取」(现=%s)" % ticket_row.card.name_l.text)
|
||||
if ticket_row.btn.get_parent() != ticket_row.card.body or ticket_row.btn.get_index() >= ticket_row.card.foot_l.get_index():
|
||||
|
||||
@@ -36,8 +36,8 @@ func _ready() -> void:
|
||||
await get_tree().process_frame
|
||||
var problems: Array = []
|
||||
# 基线读表(表值驱动——不写字面量)
|
||||
var base_atk := int(main.db.hero.atk)
|
||||
var base_hp := int(main.db.hero.max_hp)
|
||||
var base_atk := int(main.db.combat.hero.atk)
|
||||
var base_hp := int(main.db.combat.hero.max_hp)
|
||||
var boosted_atk := base_atk * 2 # 攻击滑条 100 → ×2
|
||||
var boosted_hp := int(round(base_hp * 1.5)) # 生命滑条 50 → +50%
|
||||
# ① 全局浮层角标开窗(调试入口=UI 最顶层浮层,任何 UI 不遮挡——
|
||||
@@ -86,8 +86,8 @@ func _ready() -> void:
|
||||
if main.debug_overlay.visible or not main._start_overlay.visible:
|
||||
problems.append("关闭后层级状态错误")
|
||||
# ⑦ hero 表运行期不可变(E4 收口回归断言:任何代码 reintroduce 表写在此被抓获——原"表值残留"断言语义升级)
|
||||
if int(main.db.hero.atk) != base_atk or int(main.db.hero.max_hp) != base_hp:
|
||||
problems.append("hero 表被运行时改写(E4 违例:atk=%s hp=%s,期望恒基线 %d/%d)" % [str(main.db.hero.atk), str(main.db.hero.max_hp), base_atk, base_hp])
|
||||
if int(main.db.combat.hero.atk) != base_atk or int(main.db.combat.hero.max_hp) != base_hp:
|
||||
problems.append("hero 表被运行时改写(E4 违例:atk=%s hp=%s,期望恒基线 %d/%d)" % [str(main.db.combat.hero.atk), str(main.db.combat.hero.max_hp), base_atk, base_hp])
|
||||
# ⑧ 单次加成生效回归断言:应用加成 + 启动单场战斗 → 呈现快照 hero 必须是"基线 × 单次加成"
|
||||
# (攻击 ×2 / 生命 +50%)——旧缺陷(残留值被当基线再乘)在 encounter 参数链上同样被抓获
|
||||
# 存档隔离(停点断点写盘随 main.save_manager;探针禁碰真实档,同族探针隔离纪律;
|
||||
@@ -165,11 +165,11 @@ func _ready() -> void:
|
||||
# SaveManager 是 autoload 单例——换注走原地 attach(首局态挂载+恢复隔离档);
|
||||
# --script 模式无裸 autoload 标识符——经 main 节点路径解析
|
||||
var sm = main.get_node("/root/SaveManager")
|
||||
sm.attach_path("user://smoke_tune_probe_seed.json") # 全新空档——first_adventure_done=false(首局态;新档缺省面)
|
||||
sm.slots.attach_path("user://smoke_tune_probe_seed.json") # 全新空档——first_adventure_done=false(首局态;新档缺省面)
|
||||
main.debug_overlay.seed_edit.text = ""
|
||||
if main._seed_value() != 42:
|
||||
problems.append("首局空框种子 != 42(P5 甲失守——教学态可复现破约)")
|
||||
sm.attach_path("user://smoke_tune_probe_save.json") # 恢复隔离档(非首局态——isolate_save 已建档置位)
|
||||
sm.slots.attach_path("user://smoke_tune_probe_save.json") # 恢复隔离档(非首局态——isolate_save 已建档置位)
|
||||
var draws: Array[int] = []
|
||||
for i in range(4):
|
||||
draws.append(main._seed_value())
|
||||
|
||||
Reference in new issue
Block a user