迭代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:
1 parent
957a0dbbc9
commit
51d5e89994
16 files changed
+101
-101
No files matched your search
+28
-28
@@ -41,7 +41,7 @@ var hero_hp: int:
|
||||
var gp: int: # GP 冒险钱包(局内货币——冒险开始 = 0、收束清零;不入存档不入摘要)
|
||||
get: return _wallet.gp
|
||||
set(v): _wallet.gp = v
|
||||
var _shop: ShopSession = null # 商店件(_init 建;双模式货架/定价/购买/刷新唯一宿主)
|
||||
var shop: ShopSession = null # 商店件(_init 建;双模式货架/定价/购买/刷新唯一宿主)
|
||||
# 协作对象私有(E1/E3 封装收口):settlement 读取经 current_battle() 成文出口
|
||||
var _settlement: BattleOrchestrator = null # 当前战斗编排器(关卡结束置 null)
|
||||
var treasure_inventory: TreasureItems = null # 秘宝 关卡域库存(TreasureItems;跨战斗延续,
|
||||
@@ -96,10 +96,10 @@ func _init(db_ref: ConfigDb, rng_ref: RngServiceCore, ctx: Dictionary = {}) -> v
|
||||
_hero_armor_type = String(ctx.get("hero_armor_type", ""))
|
||||
_voucher_rap = maxi(0, int(ctx.get("voucher_rap", 0)))
|
||||
_voucher_time_sand = maxi(0, int(ctx.get("voucher_time_sand", 0)))
|
||||
_shop = ShopSession.new(db, rng)
|
||||
shop = ShopSession.new(db, rng)
|
||||
var pool: Dictionary[Variant, Variant] = ctx.get("pool_wiring", {}) as Dictionary
|
||||
if String(ctx.get("shop_mode", "")) == "pool" and not pool.is_empty():
|
||||
_shop.set_shop_pool(pool.get("deck", []) as Array, pool.get("consume", Callable()) as Callable,
|
||||
shop.set_shop_pool(pool.get("deck", []) as Array, pool.get("consume", Callable()) as Callable,
|
||||
pool.get("ticket", Callable()) as Callable, pool.get("cap", Callable()) as Callable)
|
||||
_bind_shop()
|
||||
|
||||
@@ -302,8 +302,8 @@ func breakpoint_fragment() -> Dictionary[Variant, Variant]:
|
||||
"node_id": current_node_id(),
|
||||
"visited_ids": visited_ids(),
|
||||
"aux_items": treasure_snapshot,
|
||||
"shop_shelf": _shop.shop_bp_shelf(),
|
||||
"shop_visit_buys": _shop.shop_bp_visit_buys(),
|
||||
"shop_shelf": shop.shop_bp_shelf(),
|
||||
"shop_visit_buys": shop.shop_bp_visit_buys(),
|
||||
}
|
||||
|
||||
|
||||
@@ -504,8 +504,8 @@ func _enter_node(node: Dictionary) -> bool:
|
||||
# 商店房兑付:到达即开店(覆盖层归呈现层),购买出账/
|
||||
# 离开归玩家意图——零自动推进;离开确认经 continue_after_node 回选路口
|
||||
var payload := {"gp": gp} # legacy 固定三件(off 对照承载——零 RNG 零池消费)
|
||||
if _shop.pool_mode:
|
||||
_shop.open_pool() # 进店抽 3(恰一 shop_draw scope;买后全重抽同签)
|
||||
if shop.pool_mode:
|
||||
shop.open_pool() # 进店抽 3(恰一 shop_draw scope;买后全重抽同签)
|
||||
payload = {"gp": gp, "shelf": true}
|
||||
node_entered.emit(node, payload)
|
||||
return true
|
||||
@@ -701,7 +701,7 @@ func continue_after_node() -> bool:
|
||||
if t != "reward" and t != "rest" and t != "shop":
|
||||
return false
|
||||
if t == "shop":
|
||||
_shop.leave() # 离开店面货架态清零(断点快照 shop_shelf 键随离开落空架合法态)
|
||||
shop.leave() # 离开店面货架态清零(断点快照 shop_shelf 键随离开落空架合法态)
|
||||
return _present_choices()
|
||||
|
||||
|
||||
@@ -726,7 +726,7 @@ func close_wallet() -> void:
|
||||
|
||||
# 件注入(建件与宿主引用换代时调用——钱包/主角账三件/图行/装配集为共享引用,出账直接落同一引用)
|
||||
func _bind_shop() -> void:
|
||||
_shop.bind({
|
||||
shop.bind({
|
||||
"wallet": _wallet,
|
||||
"journal": _journal,
|
||||
"level_row": level_row,
|
||||
@@ -749,80 +749,80 @@ func _gain_max_hp_flat(flat: int) -> void:
|
||||
|
||||
|
||||
func shop_products() -> Array:
|
||||
return _shop.shop_products()
|
||||
return shop.shop_products()
|
||||
|
||||
|
||||
func current_price(prow: Dictionary) -> int:
|
||||
return _shop.current_price(prow)
|
||||
return shop.current_price(prow)
|
||||
|
||||
|
||||
func purchased_tier(product_id: String) -> int:
|
||||
return _shop.purchased_tier(product_id)
|
||||
return shop.purchased_tier(product_id)
|
||||
|
||||
|
||||
func buy_product(product_id: String) -> bool:
|
||||
return _shop.buy_product(product_id)
|
||||
return shop.buy_product(product_id)
|
||||
|
||||
|
||||
func player_request_refresh() -> bool:
|
||||
return _shop.player_request_refresh()
|
||||
return shop.player_request_refresh()
|
||||
|
||||
|
||||
# 散折价单点(测试取数面沿用本类调用名)
|
||||
func _spend_discounted(price: int) -> int:
|
||||
return _shop._spend_discounted(price)
|
||||
return shop._spend_discounted(price)
|
||||
|
||||
|
||||
# 注入(AdventureRunner._start_current_level 唯一调用方——pool 模式专用):令牌库共享引用 +
|
||||
# 池消费 handler + 专长凭证判定 + cap 检查回调(cap 满 kind 剔出货架候选视图)。
|
||||
func set_shop_pool(deck_ref: Array, consume_handler: Callable, ticket_consider: Callable = Callable(), cap_check: Callable = Callable()) -> void:
|
||||
_shop.set_shop_pool(deck_ref, consume_handler, ticket_consider, cap_check)
|
||||
shop.set_shop_pool(deck_ref, consume_handler, ticket_consider, cap_check)
|
||||
|
||||
|
||||
# 货架抽签白盒入口(测试取数面沿用本类调用名)
|
||||
func _shop_draw_shelf() -> void:
|
||||
_shop._draw_shelf()
|
||||
shop._draw_shelf()
|
||||
|
||||
|
||||
func pool_stock(kind: String) -> int:
|
||||
return _shop.pool_stock(kind)
|
||||
return shop.pool_stock(kind)
|
||||
|
||||
|
||||
func pool_price(kind: String) -> int:
|
||||
return _shop.pool_price(kind)
|
||||
return shop.pool_price(kind)
|
||||
|
||||
|
||||
func shop_shelf() -> Array:
|
||||
return _shop.shop_shelf()
|
||||
return shop.shop_shelf()
|
||||
|
||||
|
||||
func shop_refresh_free_left() -> int:
|
||||
return _shop.shop_refresh_free_left()
|
||||
return shop.shop_refresh_free_left()
|
||||
|
||||
|
||||
func shop_refresh_cost() -> int:
|
||||
return _shop.shop_refresh_cost()
|
||||
return shop.shop_refresh_cost()
|
||||
|
||||
|
||||
func shop_refresh() -> bool:
|
||||
return _shop.shop_refresh()
|
||||
return shop.shop_refresh()
|
||||
|
||||
|
||||
func spend_gp(amount: int) -> bool:
|
||||
return _shop.spend_gp(amount)
|
||||
return shop.spend_gp(amount)
|
||||
|
||||
|
||||
func buy_pool_item(kind: String) -> bool:
|
||||
return _shop.buy_pool_item(kind)
|
||||
return shop.buy_pool_item(kind)
|
||||
|
||||
|
||||
func is_shop_pool() -> bool:
|
||||
return _shop.is_shop_pool()
|
||||
return shop.is_shop_pool()
|
||||
|
||||
|
||||
func shop_bp_shelf() -> Array:
|
||||
return _shop.shop_bp_shelf()
|
||||
return shop.shop_bp_shelf()
|
||||
|
||||
|
||||
func shop_bp_visit_buys() -> int:
|
||||
return _shop.shop_bp_visit_buys()
|
||||
return shop.shop_bp_visit_buys()
|
||||
Reference in new issue
Block a user