mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-18 13:35:12 +00:00
30 lines
625 B
JavaScript
30 lines
625 B
JavaScript
import { Data } from '../../../components/index.js'
|
|
import lodash from 'lodash'
|
|
import { abbr, attrMap } from './meta.js'
|
|
import calc from './calc.js'
|
|
|
|
let artiSetMap = {}
|
|
let artiMap = {}
|
|
|
|
let artis = Data.readJSON('resources/meta/artifact/data.json')
|
|
|
|
lodash.forEach(artis, (ds) => {
|
|
let artiSet = {
|
|
name: ds.name,
|
|
effect: ds.effect,
|
|
sets: {}
|
|
}
|
|
artiSetMap[ds.name] = artiSet
|
|
lodash.forEach(ds.sets, (as, idx) => {
|
|
if (as.name) {
|
|
artiMap[as.name] = {
|
|
set: ds.name,
|
|
idx
|
|
}
|
|
artiSet.sets[idx] = as.name
|
|
}
|
|
})
|
|
})
|
|
|
|
export { abbr, artiMap, artiSetMap, attrMap, calc }
|