refactor: 统一将 pool_lv 重命名为 card_lv 并清理废弃代码

本次提交完成了全项目范围内的术语统一重构:
1.  将所有`pool_lv`相关变量、字段、注释替换为`card_lv`,对齐卡牌等级的业务含义
2.  移除了配置中冗余的默认`pool_lv`赋值,简化数据结构
3.  删除了废弃的`HlistComp.ts`组件及其元文件
4.  修正了多处逻辑错误,确保卡牌等级正确驱动背景框切换
5.  更新了相关注释和文档,保持代码一致性
This commit is contained in:
pan
2026-07-27 15:54:53 +08:00
parent 62264deeed
commit 9f2599e9ec
21 changed files with 137 additions and 467 deletions

View File

@@ -116,7 +116,7 @@ export class HerosListComp extends CCComp {
this.cards_node.removeAllChildren()
const sorted = [...HeroList].sort((a, b) => {
return (HeroInfo[a]?.pool_lv ?? 1) - (HeroInfo[b]?.pool_lv ?? 1);
return (HeroInfo[a]?.card_lv ?? 1) - (HeroInfo[b]?.card_lv ?? 1);
});
for (const uuid of sorted) {
@@ -136,7 +136,7 @@ export class HerosListComp extends CCComp {
})
const comp = cardNode.getComponent(CardLiteComp) || cardNode.addComponent(CardLiteComp)
comp.setHeroByUuid(uuid, hero.pool_lv ?? 1)
comp.setHeroByUuid(uuid, hero.card_lv ?? 1)
comp.onClickCallback = (cardComp: CardLiteComp) => {
this.onCardSelect(uuid)
this.highlightCard(cardNode)
@@ -209,7 +209,7 @@ export class HerosListComp extends CCComp {
if (infoLabel) infoLabel.string = desc || hero.info || ""
}
this.updatePoolLvBg(hero.pool_lv ?? 1)
this.updatePoolLvBg(hero.card_lv ?? 1)
this.updateLvDisplay(hero)
this.updateTypeDisplay(hero)
this.updateHeroAnimation(uuid)
@@ -237,7 +237,7 @@ export class HerosListComp extends CCComp {
private updateLvDisplay(hero: typeof HeroInfo[number]) {
if (!this.lv_node) return
const cardLvStr = `lv${hero.pool_lv ?? 1}`
const cardLvStr = `lv${hero.card_lv ?? 1}`
this.lv_node.active = true
this.lv_node.children.forEach(child => {