2023-10-20 08:59:06 +00:00
|
|
|
|
import { Data, Meta } from '#miao'
|
2023-12-27 19:17:53 +00:00
|
|
|
|
import { alias, abbr } from './alias.js'
|
2023-11-06 19:52:55 +00:00
|
|
|
|
import { wifeCfg } from './extra.js'
|
|
|
|
|
import lodash from 'lodash'
|
2023-10-20 08:59:06 +00:00
|
|
|
|
|
|
|
|
|
let data = Data.readJSON('resources/meta-sr/character/data.json', 'miao')
|
2023-10-21 18:54:45 +00:00
|
|
|
|
let meta = Meta.create('sr', 'char')
|
2023-10-20 08:59:06 +00:00
|
|
|
|
meta.addData(data)
|
|
|
|
|
meta.addAlias(alias)
|
2023-12-27 19:17:53 +00:00
|
|
|
|
lodash.forEach(data, (ds) => {
|
|
|
|
|
abbr[ds.name] = abbr[ds.name] || ds.name
|
|
|
|
|
})
|
|
|
|
|
meta.addAbbr(abbr)
|
2023-11-06 19:52:55 +00:00
|
|
|
|
|
|
|
|
|
// 老婆设置同样设置到gs下,通用数据
|
|
|
|
|
let gsMeta = Meta.create('gs', 'char')
|
|
|
|
|
let { wifeData } = gsMeta.getMeta()
|
|
|
|
|
lodash.forEach(wifeCfg, (txt, type) => {
|
|
|
|
|
wifeData[type] = wifeData[type] || {}
|
|
|
|
|
Data.eachStr(txt, (name) => {
|
|
|
|
|
let id = meta.getId(name)
|
|
|
|
|
if (id) {
|
|
|
|
|
wifeData[type][id] = true
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
gsMeta.addMeta({ wifeData })
|