Files
aklive2d/libs/config.js
Haoyu Xu 7e2a2a1d40 feat(aklive2d): many changes
- generalized env_generator
- fixed content_processor
- updated config to add fields
- removed redundant fields in config
2023-02-25 21:36:54 -05:00

20 lines
623 B
JavaScript

import path from 'path'
import { read } from './yaml.js'
export default function () {
return process(read(path.join(__projetRoot, 'config.yaml')))
}
function process(config) {
for (const [operatorName, operator] of Object.entries(config.operators)) {
// add title
operator.title = `${config.share.title["en-US"]}${operator.codename["en-US"]} - ${config.share.title["zh-CN"]}${operator.codename["zh-CN"]}`
// add type
operator.type = operator.codename["zh-CN"].includes('·') ? 'operator' : 'skin'
// add link
operator.link = operatorName
}
return config
}