miao-plugin/models/index.js

48 lines
1.1 KiB
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'
2024-07-04 18:57:19 +00:00
import RoleCombat from './RoleCombat.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'
2024-02-04 01:46:00 +00:00
import Button from './Button.js'
2024-05-21 18:19:36 +00:00
import { miaoPath } from '#miao.path'
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']) {
2024-05-21 18:19:36 +00:00
let file = `${miaoPath}/resources/meta-${game}/${type}/index.js`
2023-10-20 08:59:06 +00:00
if (fs.existsSync(file)) {
try {
2024-05-21 18:19:36 +00:00
await import(`file://${file}`)
2023-10-20 08:59:06 +00:00
} catch (e) {
console.log(e)
}
}
}
}
export {
Base,
Abyss,
2024-07-04 18:57:19 +00:00
RoleCombat,
2024-02-04 01:46:00 +00:00
Button,
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
}