Merge pull request #15890 from zfox23/SUI/noAutoLOD

BUGZ-930: No more auto-LOD adjustment for SimplifiedUI users
This commit is contained in:
Shannon Romano 2019-07-08 07:57:55 -07:00 committed by GitHub
commit cc57e92a81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -483,6 +483,25 @@ function maybeUpdateOutputDeviceMutedOverlay() {
}
var oldAutomaticLODAdjust;
var oldLODLevel;
var DEFAULT_AUTO_LOD_ADJUST = false;
var DEFAULT_LOD_LEVEL = 0.5;
function modifyLODSettings() {
oldAutomaticLODAdjust = LODManager.automaticLODAdjust;
oldLODLevel = LODManager.lodQualityLevel;
LODManager.automaticLODAdjust = DEFAULT_AUTO_LOD_ADJUST;
LODManager.lodQualityLevel = DEFAULT_LOD_LEVEL;
}
function restoreLODSettings() {
LODManager.automaticLODAdjust = oldAutomaticLODAdjust;
LODManager.lodQualityLevel = oldLODLevel;
}
var simplifiedNametag = Script.require("./simplifiedNametag/simplifiedNametag.js?" + Date.now());
var SimplifiedStatusIndicator = Script.require("./simplifiedStatusIndicator/simplifiedStatusIndicator.js?" + Date.now());
var si;
@ -491,6 +510,7 @@ var oldShowBubbleTools;
var keepExistingUIAndScriptsSetting = Settings.getValue("simplifiedUI/keepExistingUIAndScripts", false);
function startup() {
maybeRemoveDesktopMenu();
modifyLODSettings();
if (!keepExistingUIAndScriptsSetting) {
pauseCurrentScripts();
@ -541,6 +561,7 @@ function restoreScripts() {
function shutdown() {
restoreScripts();
restoreLODSettings();
if (!keepExistingUIAndScriptsSetting) {
console.log("The Simplified UI script has been shut down. If you notice any strangeness with user interface, please restart this application.");