koishi-plugin-vsinger-gacha 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/handbook.js CHANGED
@@ -134,12 +134,17 @@ async function render({ game, store, uid, displayName, outDir, tagsDir, thumbsDi
134
134
 
135
135
  // 每池一块(顺序填充)
136
136
  const blocks = [];
137
+ let _lastAct = null;
137
138
  for (const [act, pm] of seriesMap) {
138
139
  for (const [pool, arr] of pm) {
139
140
  arr.sort((a, b) => Number(b.v.rate_pct || 0) - Number(a.v.rate_pct || 0));
140
141
  const rows = Math.max(1, Math.ceil(arr.length / COLS_PER_COL));
141
142
  const got = arr.filter((c) => (owned[c.h] || 0) > 0).length;
142
- blocks.push({ act, pool, arr, got, h: POOL_TITLE_H + rows * ROWH + 12 });
143
+ const isNewSeries = act !== _lastAct;
144
+ // ★ 2026-11-05:系列头也要占高度,否则下一块会压到上一块的卡片上
145
+ const h = POOL_TITLE_H + rows * ROWH + 12 + (isNewSeries ? SERIES_H : 0);
146
+ blocks.push({ act, pool, arr, got, series: isNewSeries, h });
147
+ _lastAct = act;
143
148
  }
144
149
  }
145
150
  const totalH = blocks.reduce((a, b) => a + b.h, 0);
package/lib/render/kit.js CHANGED
@@ -76,16 +76,20 @@ function header(g, o) {
76
76
  const W = o.W;
77
77
 
78
78
  // 圆形图标
79
- const R = 22;
79
+ const R = 24;
80
+ const cx = x + R;
81
+ const cy = y + R;
80
82
  g.save();
81
83
  g.beginPath();
82
- g.arc(x + R, y + R + 4, R, 0, Math.PI * 2);
84
+ g.arc(cx, cy, R, 0, Math.PI * 2);
83
85
  g.fillStyle = COLOR.accent;
84
86
  g.fill();
85
87
  g.fillStyle = '#fff';
86
- g.font = `bold 22px ${FONT}`;
88
+ g.font = `bold 26px ${FONT}`;
89
+ g.textAlign = 'center';
87
90
  g.textBaseline = 'middle';
88
- g.fillText('♪', x + R - 8, y + R + 4);
91
+ g.fillText('♪', cx, cy + 1);
92
+ g.textAlign = 'left';
89
93
  g.restore();
90
94
 
91
95
  g.textBaseline = 'top';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koishi-plugin-vsinger-gacha",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "VSinger 收藏集抽卡 / 签到积分 / 图鉴(Koishi 插件,一次性安装)",
5
5
  "main": "lib/index.js",
6
6
  "files": [