迭代42-卡2-T0: 商店委托调用面直连(壳在位中间态)——level_runner私有_shop更名公开shop(28处词级更名,_bind_shop装配面保留:65注释/:104调用/:728定义);产品码六件改址(camp_shop_presenter 14调用/main_adventure_flow 6/main_overlay_flow 2/main.gd 773一处/curio_interact_controller spend_gp/shop_overlay_view注释2处);sim改址level_autoplay 6调用+335/356注释随sed同步;测试面七件改址(level_shop_economy 25+白盒r8.shop._draw_shelf×2/hero_ledger 2/adventure_feats 1/pool_case_d 3含白盒lr.shop._draw_shelf/treasure_effects 2/curio_refresh_paid 3/meta_progression_forge 4)+tree_rules_v11头注_spend_discounted指址同步shop_session;跨类同名面零触碰(deck().pool_stock与settlement.player_request_refresh原样,grep全量核对零残留)。验证:冒烟15项0失败;全量65套件55绿10红——10红经stash对照法master原状逐一同值复现坐实存量红(iter41特许移交合回未跑遗留:config_db cattr解析/config_db_fatal_oob与run_time_fatal退出码2/table_structure_guard meta_state/treasure_items crossrun/standee_fx set_trans/forge_workbench挂死/tree_requires row_by_id/save_manager _migrate_legacy_save/theme_projection _recent_list),本批七件相关套件全绿;level_runner三键读数:公开方法50持平/类变量30持平/_enter_node键已随卡1-T2归绿——只降不升达标

This commit is contained in:
DKChan committed 2026-10-29 08:01:58 +08:00
1 parent 957a0dbbc9
commit 51d5e89994
16 files changed
+101 -101

No files matched your search

+8 -8
View File
@@ -332,13 +332,13 @@ static func _on_adventure_curio_resolved(result: Dictionary, st: Dictionary, adr
# 商店贪心买齐:GP 局内死钱——买得起就买( affordable 集里挑最便宜的
# 反复买到达不上任何商品为止,guard 防死循环)。确定性(零随机流);购买出账/加算区入账全走
# runner.buy_product 核心编排(与呈现层购买同一出账路径,wallet_changed 信号照常采集)。
# runner.shop.buy_product 核心编排(与呈现层购买同一出账路径,wallet_changed 信号照常采集)。
static func _autoplay_shop(r, st: Dictionary) -> void:
var guard := 30
while guard > 0:
guard -= 1
var affordable: Array = []
for p in r.shop_products():
for p in r.shop.shop_products():
if r.gp >= int(p.get("price", 1 << 30)):
affordable.append(p)
if affordable.is_empty():
@@ -347,20 +347,20 @@ static func _autoplay_shop(r, st: Dictionary) -> void:
for p in affordable:
if int(p.get("price", 1 << 30)) < int(pick.get("price", 1 << 30)):
pick = p
if not r.buy_product(String(pick.get("product_id", ""))):
if not r.shop.buy_product(String(pick.get("product_id", ""))):
return
st.shop_buys = int(st.get("shop_buys", 0)) + 1
# 商店共享池贪心:货架三选一同构面贪心买齐——affordable 集挑最便宜反复买
# (每次买后全重抽、货架随买随换,枯竭/不可负担即止,guard 防死循环)。购买走 runner.buy_pool_item
# (每次买后全重抽、货架随买随换,枯竭/不可负担即止,guard 防死循环)。购买走 runner.shop.buy_pool_item
# 核心编排(与呈现层购买同一出账+池消费路径,wallet_changed 信号照常采集)。确定性(零随机流)。
static func _autoplay_shop_pool(r, st: Dictionary) -> void:
var guard := 30
while guard > 0:
guard -= 1
var affordable: Array = []
for c in r.shop_shelf():
for c in r.shop.shop_shelf():
if r.gp >= int(c.get("price", 1 << 30)):
affordable.append(c)
if affordable.is_empty():
@@ -369,7 +369,7 @@ static func _autoplay_shop_pool(r, st: Dictionary) -> void:
for c in affordable:
if int(c.get("price", 1 << 30)) < int(pick.get("price", 1 << 30)):
pick = c
if not r.buy_pool_item(String(pick.get("kind_id", ""))):
if not r.shop.buy_pool_item(String(pick.get("kind_id", ""))):
return
st.shop_buys = int(st.get("shop_buys", 0)) + 1
@@ -415,10 +415,10 @@ static func _route_pick(runner, route: String, st: Dictionary) -> int:
s = 10.0
var cheapest := 1 << 30
if String(st.get("shop_mode", "legacy")) == "pool":
for c in runner.shop_shelf(): # pool 面:货架现价
for c in runner.shop.shop_shelf(): # pool 面:货架现价
cheapest = mini(cheapest, int(c.get("price", 1 << 30)))
else:
for p in runner.shop_products():
for p in runner.shop.shop_products():
cheapest = mini(cheapest, int(p.get("price", 1 << 30)))
if cheapest < (1 << 30) and runner.gp >= cheapest:
s = 80.0