diff --git a/app/assets/js/assetguard.js b/app/assets/js/assetguard.js index f75ea8a0..aca6e980 100644 --- a/app/assets/js/assetguard.js +++ b/app/assets/js/assetguard.js @@ -1562,6 +1562,7 @@ class AssetGuard extends EventEmitter { if(concurrentDlQueue.length === 0){ return false } else { + console.debug('DLQueue', concurrentDlQueue) async.eachLimit(concurrentDlQueue, limit, (asset, cb) => { let count = 0; mkpath.sync(path.join(asset.to, "..")) diff --git a/app/assets/js/configmanager.js b/app/assets/js/configmanager.js index 9b987374..59c848c6 100644 --- a/app/assets/js/configmanager.js +++ b/app/assets/js/configmanager.js @@ -38,7 +38,8 @@ const DEFAULT_CONFIG = { resWidth: 1280, resHeight: 720, fullscreen: false, - autoConnect: true + autoConnect: true, + launchDetached: true }, launcher: {} }, @@ -78,9 +79,36 @@ exports.load = function(){ exports.save() } else { config = JSON.parse(fs.readFileSync(filePath, 'UTF-8')) + config = validateKeySet(DEFAULT_CONFIG, config) + exports.save() } } +/** + * Validate that the destination object has at least every field + * present in the source object. Assign a default value otherwise. + * + * @param {Object} srcObj The source object to reference against. + * @param {Object} destObj The destination object. + * @returns {Object} A validated destination object. + */ +function validateKeySet(srcObj, destObj){ + if(srcObj == null){ + srcObj = {} + } + const validationBlacklist = ['authenticationDatabase'] + const keys = Object.keys(srcObj) + console.log(keys) + for(let i=0; i { console.log('Minecraft:', data.toString('utf8')) }) diff --git a/app/assets/js/scripts/uibinder.js b/app/assets/js/scripts/uibinder.js index 1b74c72e..7d23cce8 100644 --- a/app/assets/js/scripts/uibinder.js +++ b/app/assets/js/scripts/uibinder.js @@ -72,7 +72,7 @@ function showMainUI(){ $('#loadingContainer').fadeOut(500, () => { $('#loadSpinnerImage').removeClass('rotating') }) - }, 500) + }, 250) }, 750) initNews() @@ -160,6 +160,12 @@ async function validateSelectedAccount(){ } } +/** + * Temporary function to update the selected account along + * with the relevent UI elements. + * + * @param {string} uuid The UUID of the account. + */ function setSelectedAccount(uuid){ const authAcc = ConfigManager.setSelectedAccount(uuid) ConfigManager.save() diff --git a/app/assets/westeroscraft.json b/app/assets/westeroscraft.json index 5f50db88..6b55deed 100644 --- a/app/assets/westeroscraft.json +++ b/app/assets/westeroscraft.json @@ -15,7 +15,7 @@ "name": "WesterosCraft Production Server", "description": "Main WesterosCraft server. Connect to enter the Realm.", "icon_url": "http://mc.westeroscraft.com/WesterosCraftLauncher/files/server-prod.png", - "revision": "3.7.1", + "revision": "3.7.2", "server_ip": "mc.westeroscraft.com", "mc_version": "1.11.2", "discord": { @@ -238,12 +238,12 @@ ] }, { - "id": "net.optifine:optifine:1.11.2_HD_U_C3", - "name": "Optifine (1.11.2_HD_U_C3)", + "id": "net.optifine:optifine:1.11.2_HD_U_C7", + "name": "Optifine (1.11.2_HD_U_C7)", "type": "forgemod", "artifact": { - "size": 2106193, - "MD5": "82f495594cd50e1fda7a8aa0246239fc", + "size": 2254712, + "MD5": "0dd7761e908f9b245bb0dc0fac5649f5", "extension": ".jar", "url": "http://mc.westeroscraft.com/WesterosCraftLauncher/prod-1.11.2/mods/OptiFine.jar" } diff --git a/app/overlay.ejs b/app/overlay.ejs index bfbe486d..f413874d 100644 --- a/app/overlay.ejs +++ b/app/overlay.ejs @@ -17,14 +17,6 @@ Select an Account
- -