增加提纳里、柯莱、多莉的角色图片
使用临时图标代替暂缺的天赋命座等资源
@ -17,9 +17,12 @@ export const customCharacters = {
|
||||
// roleid请参见Yunzai roleId.js
|
||||
10000026: ["魈", "风夜叉"],
|
||||
10000059: ["鹿野院平藏", "小鹿"],
|
||||
10000100: ["提纳里", "驴"], // ID暂无
|
||||
10000101: ["柯莱", "柯来", "科莱", "科来"],
|
||||
|
||||
// ID暂无,使用临时ID代替
|
||||
10000100: ["提纳里", "提那里", "驴"],
|
||||
10000101: ["柯莱", "柯来", "科莱", "科来", "小天使"],
|
||||
10000102: ["多莉", "多利", "多力"],
|
||||
|
||||
// 以下为新增自定义角色,角色id请以小写英文定义
|
||||
paimon: ["派蒙", "应急食物", "应急食品", "吉祥物", "宠物", "外置器官", "会说话的动物", "矮堇瓜", "飞行矮堇瓜", "最好的伙伴"],
|
||||
sb: ["散兵", "国崩", "雷电国崩", "大炮", "雷电大炮", "雷大炮", "伞兵"],
|
||||
|
BIN
resources/character-img/多莉/01.jpg
Normal file
After Width: | Height: | Size: 462 KiB |
BIN
resources/character-img/提纳里/01.jpg
Normal file
After Width: | Height: | Size: 343 KiB |
BIN
resources/character-img/提纳里/02.jpg
Normal file
After Width: | Height: | Size: 220 KiB |
BIN
resources/character-img/提纳里/03.jpg
Normal file
After Width: | Height: | Size: 575 KiB |
BIN
resources/character-img/提纳里/04.jpg
Normal file
After Width: | Height: | Size: 636 KiB |
BIN
resources/character-img/提纳里/05.jpg
Normal file
After Width: | Height: | Size: 475 KiB |
BIN
resources/character-img/柯莱/01.jpg
Normal file
After Width: | Height: | Size: 333 KiB |
BIN
resources/character-img/柯莱/02.jpg
Normal file
After Width: | Height: | Size: 311 KiB |
BIN
resources/character-img/柯莱/03.jpg
Normal file
After Width: | Height: | Size: 255 KiB |
BIN
resources/character-img/柯莱/04.jpg
Normal file
After Width: | Height: | Size: 181 KiB |
BIN
resources/character-img/柯莱/05.jpg
Normal file
After Width: | Height: | Size: 157 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 262 KiB After Width: | Height: | Size: 230 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 262 KiB After Width: | Height: | Size: 395 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 262 KiB After Width: | Height: | Size: 272 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 15 KiB |
@ -2,7 +2,7 @@ import fs from "fs";
|
||||
import cheerio from "cheerio";
|
||||
import lodash from "lodash";
|
||||
import fetch from "node-fetch";
|
||||
import {roleId, abbr} from "../../../config/genshin/roleId.js";
|
||||
import { roleId, abbr } from "../../../config/genshin/roleId.js";
|
||||
|
||||
const _path = process.cwd();
|
||||
let roleIdMap = {};
|
||||
@ -220,9 +220,9 @@ async function saveCharData(url, key, name) {
|
||||
|
||||
name = name || data.name;
|
||||
|
||||
if(!name){
|
||||
console.log("角色名不存在"+url);
|
||||
return ;
|
||||
if (!name) {
|
||||
console.log("角色名不存在" + url);
|
||||
return;
|
||||
}
|
||||
|
||||
let charPath = `${_path}/plugins/miao-plugin/resources/meta/character/${data.name}/`
|
||||
@ -235,7 +235,7 @@ async function saveCharData(url, key, name) {
|
||||
}
|
||||
|
||||
async function down() {
|
||||
// const url = "https://genshin.honeyhunterworld.com/db/char/characters/?lang=CHS";
|
||||
//const url = "https://genshin.honeyhunterworld.com/db/char/characters/?lang=CHS";
|
||||
const url = "https://genshin.honeyhunterworld.com/db/char/unreleased-and-upcoming-characters/?lang=CHS";
|
||||
let req = await fetch(url);
|
||||
let txt = await req.text();
|
||||
@ -254,15 +254,17 @@ async function down() {
|
||||
|
||||
if (tRet) {
|
||||
if (tRet[1] === "girl") {
|
||||
name = {anemo: "风", geo: "岩", electro: "雷"}[tRet[2]] + "主";
|
||||
name = { anemo: "风", geo: "岩", electro: "雷" }[tRet[2]] + "主";
|
||||
} else {
|
||||
return
|
||||
}
|
||||
}
|
||||
if (key === "heizo") {
|
||||
name = "鹿野院平藏"
|
||||
let nameMap = { dori: "多莉", tighnari: "提纳里", collei: "柯莱" }
|
||||
if (nameMap[key]) {
|
||||
name = nameMap[key];
|
||||
}
|
||||
|
||||
|
||||
await saveCharData(url, key, name);
|
||||
}
|
||||
});
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Data} from "../components/index.js";
|
||||
import { Data } from "../components/index.js";
|
||||
import lodash from "lodash";
|
||||
import fs from "fs";
|
||||
import request from "request";
|
||||
@ -31,6 +31,12 @@ lodash.forEach(readDir, (c) => {
|
||||
let char = Data.readJSON(`${_cRoot}/${c}/`, 'data.json');
|
||||
|
||||
if (char.name) {
|
||||
|
||||
let nameMap = { dori: "多莉", tighnari: "提纳里", collei: "柯莱" }
|
||||
if (!lodash.values(nameMap).includes(char.name)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 正面
|
||||
|
||||
// 角色条
|
||||
|