Inject common/instance dir.

pull/270/head
Daniel Scalzi 2023-02-25 03:28:40 -05:00
parent b32857e7de
commit 9a4129c11a
No known key found for this signature in database
GPG Key ID: 9E3E2AFE45328AA5
3 changed files with 8 additions and 0 deletions

View File

@ -6,6 +6,8 @@ exports.REMOTE_DISTRO_URL = 'http://mc.westeroscraft.com/WesterosCraftLauncher/d
const api = new DistributionAPI(
ConfigManager.getLauncherDirectory(),
null, // Injected forcefully by the preloader.
null, // Injected forcefully by the preloader.
exports.REMOTE_DISTRO_URL,
false
)

View File

@ -17,6 +17,11 @@ logger.info('Loading..')
// Load ConfigManager
ConfigManager.load()
// Yuck!
// TODO Fix this
DistroAPI['commonDir'] = ConfigManager.getCommonDirectory()
DistroAPI['instanceDir'] = ConfigManager.getInstanceDirectory()
// Load Strings
LangLoader.loadLanguage('en_US')

View File

@ -515,6 +515,7 @@ async function dlAsync(login = true) {
const fullRepairModule = new FullRepair(
ConfigManager.getCommonDirectory(),
ConfigManager.getInstanceDirectory(),
ConfigManager.getLauncherDirectory(),
ConfigManager.getSelectedServer(),
DistroAPI.isDevMode()