角色图像增加小清新开关,默认关闭
对自带的部分角色图像进行了更改 修正`#喵喵日历`祈愿时间获取错误的问题
14
CHANGELOG.md
@ -1,4 +1,14 @@
|
||||
# 1.7.6
|
||||
# 1.7.7
|
||||
|
||||
* 角色图像增加小清新开关,默认关闭
|
||||
* 对自带的部分角色图像进行了更改
|
||||
* 对增量包内的角色图像进行分级,较为清凉的图像独立管理
|
||||
* 安装了增量包的小伙伴请使用`#喵喵更新图像`先获取最新版增量包图像
|
||||
* 勇士们可使用 `#喵喵设置小清新开启` 启用
|
||||
* 自行添加的图像请添加到 **resources/character-img/** 的对应角色目录下
|
||||
* 修正`#喵喵日历`祈愿时间获取错误的问题,Again..
|
||||
|
||||
# 1.7.5 ~ 1.7.6
|
||||
|
||||
* `#角色面板`现在支持B服角色数据获取
|
||||
* 数据来自喵喵API,部分功能尚未完全稳定,如有问题请反馈给喵喵
|
||||
@ -10,7 +20,7 @@
|
||||
* ACE档的评分档位由>50降低为>49.5 (理论最高分的75%)
|
||||
* `#圣遗物列表` 根据新版圣遗物评分规则进行词条高亮
|
||||
|
||||
# 1.7.1 ~ 1.7.5
|
||||
# 1.7.1 ~ 1.7.4
|
||||
|
||||
* 增加`#原图`命令,可获取喵喵角色卡片原图,感谢 **@牧星长** 提供功能
|
||||
* 对由`#老婆``#刻晴`发出的角色卡片图回复`#原图`可获取对应图像
|
||||
|
@ -13,6 +13,7 @@ let cfgMap = {
|
||||
"角色": "char.char",
|
||||
"面板": "char.profile",
|
||||
"老婆": "char.wife",
|
||||
"小清新": "char.se",
|
||||
"查他人": "char.queryOther",
|
||||
"图鉴": "wiki.wiki",
|
||||
"图片": "wiki.pic",
|
||||
@ -89,6 +90,7 @@ export async function sysCfg(e, { render }) {
|
||||
chars: getStatus("char.char"),
|
||||
profile: getStatus("char.profile"),
|
||||
wife: getStatus("char.wife"),
|
||||
se: getStatus("char.se", false),
|
||||
other: getStatus("char.queryOther"),
|
||||
wiki: getStatus("wiki.wiki"),
|
||||
pic: getStatus("wiki.pic"),
|
||||
|
@ -384,7 +384,7 @@ async function renderCard(e, avatar, render, renderType = "card") {
|
||||
if (!char) {
|
||||
return false;
|
||||
}
|
||||
let bg = char.getCardImg();
|
||||
let bg = char.getCardImg(Cfg.get("char.se", false));
|
||||
|
||||
if (renderType === "photo") {
|
||||
e.reply(segment.image(process.cwd() + "/plugins/miao-plugin/resources/" + bg.img));
|
||||
@ -917,7 +917,7 @@ export async function getArtis(e, { render }) {
|
||||
}
|
||||
|
||||
|
||||
let usefulMark;
|
||||
let usefulMark;
|
||||
if (isNewScore) {
|
||||
let charCfg = Reliquaries2.getCharCfg(name);
|
||||
usefulMark = charCfg.titleWeight;
|
||||
|
@ -3,6 +3,7 @@ import { Character } from "../components/models.js";
|
||||
import lodash from "lodash";
|
||||
import Calendar from "../components/Calendar.js";
|
||||
import Common from "../components/Common.js";
|
||||
import { Cfg } from "../components/index.js";
|
||||
|
||||
|
||||
let action = {
|
||||
@ -43,7 +44,7 @@ export async function wiki(e, { render }) {
|
||||
}
|
||||
|
||||
if (mode === "pic") {
|
||||
let img = char.getCardImg(false);
|
||||
let img = char.getCardImg(Cfg.get("char.se", false),false);
|
||||
if (img && img.img) {
|
||||
e.reply(segment.image(process.cwd() + "/plugins/miao-plugin/resources/" + img.img));
|
||||
} else {
|
||||
|
@ -60,7 +60,7 @@ let Cal = {
|
||||
let annTime = [];
|
||||
|
||||
// 第一种简单格式
|
||||
let timeRet = /(?:活动时间)?(?:〓|\s)*([0-9\\/\\: ~]*)/.exec(content);
|
||||
let timeRet = /(?:活动时间)?(?:〓|\s)*([0-9\\/\\: ~]+)/.exec(content);
|
||||
if (timeRet && timeRet[1]) {
|
||||
annTime = timeRet[1].split("~");
|
||||
} else if (/\d\.\d版本更新后/.test(content)) {
|
||||
|
@ -28,40 +28,41 @@ class Character extends Base {
|
||||
}
|
||||
}
|
||||
|
||||
getCardImg(def = true) {
|
||||
|
||||
getCardImg(se = false, def = true) {
|
||||
let name = this.name;
|
||||
|
||||
const charImgPath = `./plugins/miao-plugin/resources/character-img/${name}/`;
|
||||
|
||||
if (!fs.existsSync(charImgPath)) {
|
||||
fs.mkdirSync(charImgPath);
|
||||
|
||||
let list = [];
|
||||
|
||||
let addImg = function (charImgPath, disable = false) {
|
||||
let dirPath = `./plugins/miao-plugin/resources/${charImgPath}`;
|
||||
|
||||
if (!fs.existsSync(dirPath)) {
|
||||
fs.mkdirSync(dirPath);
|
||||
}
|
||||
if (disable) {
|
||||
return
|
||||
}
|
||||
|
||||
let imgs = fs.readdirSync(dirPath);
|
||||
imgs = imgs.filter((img) => /\.(png|jpg|webp|jpeg)/i.test(img));
|
||||
lodash.forEach(imgs, (img) => {
|
||||
list.push(`${charImgPath}/${img}`);
|
||||
});
|
||||
}
|
||||
|
||||
let list = {};
|
||||
let imgs = fs.readdirSync(charImgPath);
|
||||
imgs = imgs.filter((img) => /\.(png|jpg|webp|jpeg)/i.test(img));
|
||||
|
||||
lodash.forEach(imgs, (img) => {
|
||||
list[img] = `character-img/${name}/${img}`
|
||||
});
|
||||
addImg(`character-img/${name}`);
|
||||
addImg(`character-img/${name}/se`, !se)
|
||||
|
||||
const plusPath = `./plugins/miao-plugin/resources/miao-res-plus/`;
|
||||
if (fs.existsSync(plusPath)) {
|
||||
const charImgPlusPath = `${plusPath}/character-img/${name}/`;
|
||||
if (!fs.existsSync(charImgPlusPath)) {
|
||||
fs.mkdirSync(charImgPlusPath);
|
||||
}
|
||||
|
||||
imgs = fs.readdirSync(charImgPlusPath);
|
||||
imgs = imgs.filter((img) => /\.(png|jpg|webp|jpeg)/i.test(img));
|
||||
|
||||
lodash.forEach(imgs, (img) => {
|
||||
list[img] = `miao-res-plus/character-img/${name}/${img}`
|
||||
});
|
||||
addImg(`miao-res-plus/character-img/${name}`);
|
||||
addImg(`miao-res-plus/character-img/${name}/se`, !se);
|
||||
}
|
||||
|
||||
let img = lodash.sample(lodash.values(list));
|
||||
|
||||
let img = lodash.sample(list);
|
||||
|
||||
if (!img) {
|
||||
if (def) {
|
||||
|
@ -82,6 +82,14 @@
|
||||
</div>
|
||||
<div class="cfg-desc">角色图片的扩展包,包含更多的角色图片</div>
|
||||
</li>
|
||||
<li class="cfg-li">
|
||||
<div class="cfg-line">
|
||||
小清新角色图
|
||||
<span class="cfg-hint"> #喵喵设置小清新 + 开启/关闭</span>
|
||||
{{@se}}
|
||||
</div>
|
||||
<div class="cfg-desc">启用后会启用角色图及增量包中的小清新图像,勇士啊,你准备好了吗</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="cfg-box">
|
||||
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 477 KiB |
BIN
resources/character-img/九条裟罗/04.jpg
Normal file
After Width: | Height: | Size: 331 KiB |
Before Width: | Height: | Size: 506 KiB After Width: | Height: | Size: 780 KiB |
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 208 KiB |
Before Width: | Height: | Size: 330 KiB After Width: | Height: | Size: 438 KiB |
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 402 KiB |
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 371 KiB |
BIN
resources/character-img/埃洛伊/05.jpg
Normal file
After Width: | Height: | Size: 525 KiB |
BIN
resources/character-img/夜兰/05.JPG
Normal file
After Width: | Height: | Size: 182 KiB |
BIN
resources/character-img/早柚/04.jpeg
Normal file
After Width: | Height: | Size: 250 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 295 KiB |
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 490 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 365 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 293 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 313 KiB After Width: | Height: | Size: 340 KiB |
BIN
resources/character-img/砂糖/05.jpg
Normal file
After Width: | Height: | Size: 429 KiB |
BIN
resources/character-img/空/02.jpg
Normal file
After Width: | Height: | Size: 292 KiB |
BIN
resources/character-img/空/03.jpg
Normal file
After Width: | Height: | Size: 478 KiB |
BIN
resources/character-img/空/04.jpg
Normal file
After Width: | Height: | Size: 284 KiB |
BIN
resources/character-img/空/05.jpg
Normal file
After Width: | Height: | Size: 149 KiB |
BIN
resources/character-img/罗莎莉亚/05.jpg
Normal file
After Width: | Height: | Size: 369 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 373 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 399 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 627 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 471 KiB |
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 271 KiB |
@ -65,7 +65,6 @@ body {
|
||||
}
|
||||
.log-cont .new:before {
|
||||
content: "NEW";
|
||||
font-family: Number;
|
||||
display: inline-block;
|
||||
transform: scale(0.6);
|
||||
transform-origin: 0 0;
|
||||
|
@ -85,7 +85,6 @@ body {
|
||||
|
||||
.new:before {
|
||||
content: "NEW";
|
||||
font-family: Number;
|
||||
display: inline-block;
|
||||
transform: scale(0.6);
|
||||
transform-origin: 0 0;
|
||||
|
@ -83,6 +83,7 @@ body {
|
||||
.cal-list {
|
||||
position: relative;
|
||||
padding-top: 80px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.cal-list .cal-item {
|
||||
margin-bottom: 15px;
|
||||
|
@ -106,6 +106,7 @@ body {
|
||||
.cal-list {
|
||||
position: relative;
|
||||
padding-top: 80px;
|
||||
overflow: hidden;
|
||||
|
||||
|
||||
.cal-item {
|
||||
|