miao-plugin/models/index.js

47 lines
991 B
JavaScript
Raw Normal View History

2023-10-20 08:59:06 +00:00
import fs from 'node:fs'
2022-08-22 20:53:31 +00:00
import Base from './Base.js'
2022-08-18 10:13:42 +00:00
import Character from './Character.js'
import Artifact from './Artifact.js'
import ArtifactSet from './ArtifactSet.js'
2022-08-18 10:13:42 +00:00
import Abyss from './Abyss.js'
2023-02-08 20:55:54 +00:00
import Player from './Player.js'
2023-10-18 17:01:11 +00:00
import Avatar from './Avatar.js'
2022-08-18 10:13:42 +00:00
import ProfileDmg from './ProfileDmg.js'
2022-11-07 20:08:24 +00:00
import ProfileRank from './ProfileRank.js'
import Material from './Material.js'
import Weapon from './Weapon.js'
import User from './User.js'
import MysApi from './MysApi.js'
2022-08-18 10:13:42 +00:00
2023-10-24 19:34:36 +00:00
for (let game of ['gs', 'sr']) {
2023-10-20 08:59:06 +00:00
for (let type of ['artifact', 'character', 'material', 'weapon']) {
2023-10-24 19:34:36 +00:00
let file = `./plugins/miao-plugin/resources/meta-${game}/${type}/index.js`
2023-10-20 08:59:06 +00:00
if (fs.existsSync(file)) {
try {
await import(`file://${process.cwd()}/${file}`)
} catch (e) {
console.log(e)
}
}
}
}
export {
Base,
Abyss,
Character,
Artifact,
ArtifactSet,
2023-10-18 17:01:11 +00:00
Avatar,
ProfileDmg,
2022-11-07 20:08:24 +00:00
ProfileRank,
Material,
Weapon,
User,
2023-02-08 20:55:54 +00:00
MysApi,
Player
}
2023-10-20 08:59:06 +00:00