@sjtdev/koishi-plugin-dota2tracker 1.2.11 → 1.2.12
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/index.js +6 -1
- package/package.json +1 -1
- package/template/match/match_2.ejs +41 -21
package/lib/index.js
CHANGED
|
@@ -207,10 +207,14 @@ function MATCH_INFO(matchId) {
|
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
constants {
|
|
210
|
-
facets {
|
|
210
|
+
facets (language: S_CHINESE) {
|
|
211
|
+
name
|
|
211
212
|
id
|
|
212
213
|
color
|
|
213
214
|
icon
|
|
215
|
+
language {
|
|
216
|
+
displayName
|
|
217
|
+
}
|
|
214
218
|
}
|
|
215
219
|
}
|
|
216
220
|
}
|
|
@@ -784,6 +788,7 @@ function getFormattedMatchData(data) {
|
|
|
784
788
|
}
|
|
785
789
|
if (player.variant != null) {
|
|
786
790
|
player.facet = constants.facets.find((facet) => facet.id == player.hero.facets[player.variant - 1].facetId);
|
|
791
|
+
player.facet.name = player.facet.language.displayName ?? player.facet.name;
|
|
787
792
|
}
|
|
788
793
|
});
|
|
789
794
|
let ComparisonMode;
|
package/package.json
CHANGED
|
@@ -231,38 +231,56 @@
|
|
|
231
231
|
content: "IV";
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
.player > .
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
left: 0;
|
|
238
|
-
bottom: 0;
|
|
239
|
-
width: 16px;
|
|
234
|
+
.player > .facet {
|
|
235
|
+
color: #fff;
|
|
236
|
+
width: 100%;
|
|
240
237
|
height: 16px;
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
238
|
+
grid-row: 4;
|
|
239
|
+
grid-column: 1;
|
|
240
|
+
display: grid;
|
|
241
|
+
grid-template-columns: 16px auto;
|
|
244
242
|
z-index: 1;
|
|
243
|
+
position: relative;
|
|
244
|
+
top: -5px;
|
|
245
245
|
}
|
|
246
|
-
.player > .
|
|
246
|
+
.player > .facet > img {
|
|
247
|
+
padding: 2px;
|
|
247
248
|
width: 12px;
|
|
248
249
|
height: 12px;
|
|
250
|
+
background-color: #4444;
|
|
251
|
+
}
|
|
252
|
+
.player > .facet > span {
|
|
253
|
+
display: block;
|
|
254
|
+
padding: 0 2px;
|
|
255
|
+
line-height: 1;
|
|
256
|
+
display: grid;
|
|
257
|
+
place-items: center;
|
|
258
|
+
align-items: center;
|
|
259
|
+
justify-content: center;
|
|
260
|
+
height: 100%;
|
|
261
|
+
}
|
|
262
|
+
.player > .facet > span > * {
|
|
263
|
+
max-width: 100%;
|
|
264
|
+
overflow: hidden;
|
|
265
|
+
text-overflow: ellipsis;
|
|
266
|
+
white-space: nowrap;
|
|
249
267
|
}
|
|
250
|
-
.player > .
|
|
268
|
+
.player > .facet.Red {
|
|
251
269
|
background: linear-gradient(to right, #9f3c3c, #4a2026);
|
|
252
270
|
}
|
|
253
|
-
.player > .
|
|
271
|
+
.player > .facet.Yellow {
|
|
254
272
|
background: linear-gradient(to right, #c8a45c, #6f3d21);
|
|
255
273
|
}
|
|
256
|
-
.player > .
|
|
274
|
+
.player > .facet.Green {
|
|
257
275
|
background: linear-gradient(to right, #a2b23e, #2d5a18);
|
|
258
276
|
}
|
|
259
|
-
.player > .
|
|
277
|
+
.player > .facet.Blue {
|
|
260
278
|
background: linear-gradient(to right, #547ea6, #2a385e);
|
|
261
279
|
}
|
|
262
|
-
.player > .
|
|
280
|
+
.player > .facet.Purple {
|
|
263
281
|
background: linear-gradient(to right, #675cae, #261c44);
|
|
264
282
|
}
|
|
265
|
-
.player > .
|
|
283
|
+
.player > .facet.Gray {
|
|
266
284
|
background: linear-gradient(to right, #adb6be, #4e5557);
|
|
267
285
|
}
|
|
268
286
|
|
|
@@ -288,7 +306,7 @@
|
|
|
288
306
|
|
|
289
307
|
.player > .titles {
|
|
290
308
|
grid-row: 4;
|
|
291
|
-
grid-column:
|
|
309
|
+
grid-column: 3;
|
|
292
310
|
/* text-shadow: 1px 1px 0 #333; 设置阴影颜色及偏移 */
|
|
293
311
|
}
|
|
294
312
|
.player > .titles > span {
|
|
@@ -522,14 +540,16 @@
|
|
|
522
540
|
<div class="player ${player.team}${player.hero.id==80?" bear":""}" style="order: ${player.team==="radiant"?1:100};">
|
|
523
541
|
<div class="hero_avatar row-1${player.partyId != null ? " party_" + match.party[player.partyId] : ""}">
|
|
524
542
|
<img src="${utils.getImageUrl(player.hero.shortName, ImageType.Heroes)}" />
|
|
525
|
-
|
|
526
|
-
<div class="facet ${player.facet.color}">
|
|
527
|
-
<img src="${utils.getImageUrl(player.facet.icon, ImageType.IconsFacets)}">
|
|
528
|
-
</div>` : ""}
|
|
543
|
+
|
|
529
544
|
<p class="level">${player.level}</p>
|
|
530
545
|
<p class="party_line"></p>
|
|
531
546
|
<p class="party_mark"></p>
|
|
532
547
|
</div>
|
|
548
|
+
${player.facet ? `
|
|
549
|
+
<div class="facet ${player.facet.color}">
|
|
550
|
+
<img src="${utils.getImageUrl(player.facet.icon, ImageType.IconsFacets)}">
|
|
551
|
+
<span style="font-size: ${player.facet.name?.length>4?8:11}px;"><p>${player.facet.name??""}</p></span>
|
|
552
|
+
</div>` : ""}
|
|
533
553
|
<div class="rank">
|
|
534
554
|
<img
|
|
535
555
|
src="${utils.getImageUrl('medal_' +(player.inTop100??player.rank.medal))}"
|