index.js 708 B

123456789101112131415161718192021222324
  1. 'use strict'
  2. const PRELOAD = ['./core', './commands'],
  3. OBSOLETE_MODS = []
  4. for(let name of ['cooldowns', 'lockons', 'lockons-light', 'fastfire', 'fast-fire', 'fast-block'])
  5. OBSOLETE_MODS.push(name, name + '-master', name + '.js')
  6. const path = require('path'),
  7. fs = require('fs')
  8. for(let name of fs.readdirSync(path.join(__dirname, '../..')))
  9. if(OBSOLETE_MODS.includes(name.toLowerCase())) {
  10. console.error(`ERROR: Skill Prediction is not compatible with the obsolete mod "${name}", please remove it and try again.`)
  11. return
  12. }
  13. const subMod = require('./require')
  14. for(let name of PRELOAD) require(name)
  15. module.exports = function SkillPrediction(mod) {
  16. for(let name of PRELOAD) subMod(mod, name)
  17. }