feat(aklive2d): many changes
- generalized env_generator - fixed content_processor - updated config to add fields - removed redundant fields in config
This commit is contained in:
@@ -2,5 +2,19 @@ import path from 'path'
|
||||
import { read } from './yaml.js'
|
||||
|
||||
export default function () {
|
||||
return read(path.join(__projetRoot, 'config.yaml'))
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user