iter52-卡2:迭代52卡②(孤儿函数清退): 判死六件删除(has_effect_on/_bp_read_int/_find_token/has_open/set_feedback_state/stop_resolved)——级联留存复核全≥1在役,六文件新增孤儿扫描零命中,单测域80套件全绿,零残留grep落审计; 验收档中
This commit is contained in:
1 parent
8aec7dbff1
commit
f2c3a3887d
6 files changed
+3
-52
No files matched your search
@@ -247,11 +247,6 @@ func continue_to_next_level() -> bool:
|
||||
# 停点空候选消化(池空=三选一环节整体跳过——呈现层跳开选择面;编排归停点件)
|
||||
# ---- 提升三选一(选择停点零自动推进、重复兑付被拒;兑付恰一件、未选项零生效)----
|
||||
|
||||
# 候选令牌匹配(身份键恒等——属性加成型特性 kind+tier、规则改写型特性 feat_id)
|
||||
func _find_token(candidates: Array, kind: String, tier: String, feat_id: String = "") -> Dictionary:
|
||||
return _curio.find_token(candidates, kind, tier, feat_id)
|
||||
|
||||
|
||||
# 玩家点选兑付(state 守卫留应用层——编排归停点件;呈现层直调面 T5 改 stop())
|
||||
# 特性持有集读面(效果接线/求值/摘要唯一取数口——副本防外部改写)
|
||||
func feats_held() -> Array:
|
||||
|
||||
@@ -208,17 +208,6 @@ func _bp_strategy(key: String) -> String:
|
||||
return String((BREAKPOINT_FIELDS.get(key, {}) as Dictionary).get("strategy", "plain"))
|
||||
|
||||
|
||||
# 数值类读侧(clamp 夹 ≥0 / params_fallback 断点缺键回退参数面整额注入 / plain 直取)
|
||||
func _bp_read_int(key: String, bp: Dictionary, fallback: int, params: Dictionary = {}) -> int:
|
||||
match _bp_strategy(key):
|
||||
"clamp":
|
||||
return maxi(0, int(bp.get(key, fallback)))
|
||||
"params_fallback":
|
||||
return maxi(0, int(bp.get(key, int(params.get(key, fallback)))))
|
||||
_:
|
||||
return int(bp.get(key, fallback))
|
||||
|
||||
|
||||
# ---- 断点域六成员公开读写面(5.1 封装修复——宿主私取清零:方法体一律一行转发自有成员,零逻辑增量)----
|
||||
|
||||
# 断点承载注入(宿主构造后接线——save_manager 后绑)
|
||||
|
||||
@@ -300,11 +300,6 @@ func curio_stop_pending() -> bool:
|
||||
return not _pending.is_empty() or not _node_pending.is_empty()
|
||||
|
||||
|
||||
# 放行谓词(宿主关序受理——已兑付待推进且无在途停点)
|
||||
func stop_resolved() -> bool:
|
||||
return not _resolved.is_empty() and _pending.is_empty()
|
||||
|
||||
|
||||
func _refresh_curio_common(paid: bool) -> bool:
|
||||
if not curio_stop_pending():
|
||||
return false
|
||||
|
||||
@@ -200,18 +200,6 @@ func _push_trigger(source: String, id: String, tr: Dictionary, row: Dictionary)
|
||||
_triggers.append(t)
|
||||
|
||||
|
||||
## 订阅查询面(发射点缺省行为仲裁用——round_end 走 RAP 转存)
|
||||
func has_effect_on(event: String, kind: String, mode: String = "") -> bool:
|
||||
for tr in _triggers:
|
||||
if String(tr.on) != event:
|
||||
continue
|
||||
var d: Dictionary[Variant, Variant] = tr.do
|
||||
if String(d.get("kind", "")) == kind and (mode == "" or String(d.get("mode", "")) == mode):
|
||||
# 有 when 时不能预判命中(发射点缺省行为保守按「可能命中」计——命中由 dispatch 定夺)
|
||||
return true
|
||||
return false
|
||||
|
||||
|
||||
## 事件分发(发射点唯一入口):返回命中效果列表(装载序=声明序;零命中=空数组零扰动)。
|
||||
## ctx = 四桶引用束(引擎不自持状态,计数器读写全经 ctx);
|
||||
## payload = 事件现场(fact 取值第一优先源);facts = 补充事实面(运行态读数 Callable)。
|
||||
|
||||
@@ -9,7 +9,7 @@ var _occluded := {} # modal → 被其隐藏的上方层(关闭恢复)
|
||||
var _tags := {} # modal → 排除组标签集(互斥域随层登记)
|
||||
|
||||
# 排除组封闭词表(组合根登记用——新标签=改此处+评审,防调用点拼装回潮)
|
||||
const TAG_NON_LOCKING := "non_locking" # 开态不计入棋盘输入锁与角标置灰(调试浮窗默认开×遮挡复活×has_open 组合=棋盘永久锁死)
|
||||
const TAG_NON_LOCKING := "non_locking" # 开态不计入棋盘输入锁与角标置灰(调试浮窗默认开×遮挡复活×开态计入输入锁的组合=棋盘永久锁死)
|
||||
const TAG_SCREEN_STATE := "screen_state" # 常驻屏态(关卡地图屏——自身开态不计入本屏角标判据)
|
||||
|
||||
|
||||
@@ -53,18 +53,9 @@ func close(m: Control) -> void:
|
||||
_occluded.erase(m)
|
||||
|
||||
|
||||
# 开态查询(组合根输入锁唯一判据:登记册上是否有任一层处于开态;
|
||||
# 可见性即开态,与 open/close 记账同源——组合根不再手工罗列各层)
|
||||
func has_open() -> bool:
|
||||
for m in _list:
|
||||
if is_instance_valid(m) and m.visible:
|
||||
return true
|
||||
return false
|
||||
|
||||
|
||||
# 排除组开态查询(模态协议内聚:排除语义随层登记(register tags),
|
||||
# 查询按组名集合表达,禁在调用点拼装 has_open_excluding/has_open_excluding_any。
|
||||
# 只读查询零副作用——登记序/开合记账语义不变;空标签集=全计(与 has_open 同形)。
|
||||
# 只读查询零副作用——登记序/开合记账语义不变;空标签集=全计。
|
||||
func has_open_excluding_tags(exclude_tags: Array) -> bool:
|
||||
for m in _list:
|
||||
if is_instance_valid(m) and m.visible:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
## 布局唯一事实源 = db.presentation.camp_scene_layout(构造注入,本视图禁自载表路径);
|
||||
## 子节点序 = 表内数组序 = z 序(Control 根+TextureRect 层——禁 CanvasLayer/z_index/Sprite2D)。
|
||||
## 输入单点:根 _gui_input 集中命中判定(层节点全 IGNORE),点击只发 object_pressed 信号,路由归组合根。
|
||||
## 零核心写调用:视图不读 MetaProgression,禁用态由组合根经 set_feedback_state 推送。
|
||||
## 零核心写调用:视图不读 MetaProgression,禁用态经 _apply_state 自持基态面呈现。
|
||||
class_name CampSceneView
|
||||
extends Control
|
||||
|
||||
@@ -85,13 +85,6 @@ func get_hotspot_rect(key: StringName) -> Rect2:
|
||||
return rect
|
||||
|
||||
|
||||
func set_feedback_state(key: StringName, state: FeedbackState) -> void:
|
||||
if not _base_states.has(key):
|
||||
return
|
||||
_base_states[key] = state # 持久基态只收 NORMAL/DISABLED;HOVER/PRESSED 为视图内瞬态
|
||||
_apply_state(key, _base_state(key))
|
||||
|
||||
|
||||
func set_hud_band(band: Control) -> void:
|
||||
if _hud_slot != null:
|
||||
_hud_slot.add_child(band)
|
||||
|
||||
Reference in new issue
Block a user