miao-plugin/models/index.js
2024-07-05 02:57:19 +08:00

48 lines
1.1 KiB
JavaScript

import fs from 'node:fs'
import Base from './Base.js'
import Character from './Character.js'
import Artifact from './Artifact.js'
import ArtifactSet from './ArtifactSet.js'
import Abyss from './Abyss.js'
import RoleCombat from './RoleCombat.js'
import Player from './Player.js'
import Avatar from './Avatar.js'
import ProfileDmg from './ProfileDmg.js'
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'
import Button from './Button.js'
import { miaoPath } from '#miao.path'
for (let game of ['gs', 'sr']) {
for (let type of ['artifact', 'character', 'material', 'weapon']) {
let file = `${miaoPath}/resources/meta-${game}/${type}/index.js`
if (fs.existsSync(file)) {
try {
await import(`file://${file}`)
} catch (e) {
console.log(e)
}
}
}
}
export {
Base,
Abyss,
RoleCombat,
Button,
Character,
Artifact,
ArtifactSet,
Avatar,
ProfileDmg,
ProfileRank,
Material,
Weapon,
User,
MysApi,
Player
}