miao-plugin/resources/meta-sr/character/index.js

25 lines
647 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Data, Meta } from '#miao'
import { alias } from './alias.js'
import { wifeCfg } from './extra.js'
import lodash from 'lodash'
let data = Data.readJSON('resources/meta-sr/character/data.json', 'miao')
let meta = Meta.create('sr', 'char')
meta.addData(data)
meta.addAlias(alias)
// 老婆设置同样设置到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 })