mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-23 04:02:14 -08:00
18 lines
629 B
JavaScript
18 lines
629 B
JavaScript
const {AssetGuard} = require('./assetguard.js')
|
|
const ConfigManager = require('./configmanager.js')
|
|
const path = require('path')
|
|
|
|
console.log('Preloading')
|
|
|
|
// Load ConfigManager
|
|
ConfigManager.load()
|
|
|
|
// Ensure Distribution is downloaded and cached.
|
|
AssetGuard.retrieveDistributionDataSync(ConfigManager.getGameDirectory(), false)
|
|
|
|
// Resolve the selected server if its value has yet to be set.
|
|
if(ConfigManager.getSelectedServer() == null){
|
|
console.log('Determining default selected server..')
|
|
ConfigManager.setSelectedServer(AssetGuard.resolveSelectedServer(ConfigManager.getGameDirectory()))
|
|
ConfigManager.save()
|
|
} |