mirror of
https://github.com/overte-org/overte.git
synced 2025-07-22 17:54:15 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into voxel-paint-opti
This commit is contained in:
commit
e3dbc53643
1 changed files with 5 additions and 27 deletions
|
@ -20,7 +20,7 @@ var DEFAULT_SCRIPTS = [
|
||||||
"system/bubble.js",
|
"system/bubble.js",
|
||||||
"system/snapshot.js",
|
"system/snapshot.js",
|
||||||
"system/help.js",
|
"system/help.js",
|
||||||
"system/pal.js", //"system/mod.js", // older UX, if you prefer
|
"system/pal.js", // "system/mod.js", // older UX, if you prefer
|
||||||
"system/goto.js",
|
"system/goto.js",
|
||||||
"system/marketplaces/marketplaces.js",
|
"system/marketplaces/marketplaces.js",
|
||||||
"system/edit.js",
|
"system/edit.js",
|
||||||
|
@ -54,9 +54,6 @@ if (previousSetting === true || previousSetting === 'true') {
|
||||||
previousSetting = true;
|
previousSetting = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (Menu.menuExists(MENU_CATEGORY) && !Menu.menuItemExists(MENU_CATEGORY, MENU_ITEM)) {
|
if (Menu.menuExists(MENU_CATEGORY) && !Menu.menuItemExists(MENU_CATEGORY, MENU_ITEM)) {
|
||||||
Menu.addMenuItem({
|
Menu.addMenuItem({
|
||||||
menuName: MENU_CATEGORY,
|
menuName: MENU_CATEGORY,
|
||||||
|
@ -78,11 +75,11 @@ function runDefaultsSeparately() {
|
||||||
Script.load(DEFAULT_SCRIPTS[i]);
|
Script.load(DEFAULT_SCRIPTS[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// start all scripts
|
// start all scripts
|
||||||
if (Menu.isOptionChecked(MENU_ITEM)) {
|
if (Menu.isOptionChecked(MENU_ITEM)) {
|
||||||
// we're debugging individual default scripts
|
// we're debugging individual default scripts
|
||||||
// so we load each into its own ScriptEngine instance
|
// so we load each into its own ScriptEngine instance
|
||||||
debuggingDefaultScripts = true;
|
|
||||||
runDefaultsSeparately();
|
runDefaultsSeparately();
|
||||||
} else {
|
} else {
|
||||||
// include all default scripts into this ScriptEngine
|
// include all default scripts into this ScriptEngine
|
||||||
|
@ -90,32 +87,14 @@ if (Menu.isOptionChecked(MENU_ITEM)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function menuItemEvent(menuItem) {
|
function menuItemEvent(menuItem) {
|
||||||
if (menuItem == MENU_ITEM) {
|
if (menuItem === MENU_ITEM) {
|
||||||
|
var isChecked = Menu.isOptionChecked(MENU_ITEM);
|
||||||
isChecked = Menu.isOptionChecked(MENU_ITEM);
|
|
||||||
if (isChecked === true) {
|
if (isChecked === true) {
|
||||||
Settings.setValue(SETTINGS_KEY, true);
|
Settings.setValue(SETTINGS_KEY, true);
|
||||||
} else if (isChecked === false) {
|
} else if (isChecked === false) {
|
||||||
Settings.setValue(SETTINGS_KEY, false);
|
Settings.setValue(SETTINGS_KEY, false);
|
||||||
}
|
}
|
||||||
Window.alert('You must reload all scripts for this to take effect.')
|
Menu.triggerOption("Reload All Scripts");
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function stopLoadedScripts() {
|
|
||||||
// remove debug script loads
|
|
||||||
var runningScripts = ScriptDiscoveryService.getRunning();
|
|
||||||
for (var i in runningScripts) {
|
|
||||||
var scriptName = runningScripts[i].name;
|
|
||||||
for (var j in DEFAULT_SCRIPTS) {
|
|
||||||
if (DEFAULT_SCRIPTS[j].slice(-scriptName.length) === scriptName) {
|
|
||||||
ScriptDiscoveryService.stopScript(runningScripts[i].url);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,7 +105,6 @@ function removeMenuItem() {
|
||||||
}
|
}
|
||||||
|
|
||||||
Script.scriptEnding.connect(function() {
|
Script.scriptEnding.connect(function() {
|
||||||
stopLoadedScripts();
|
|
||||||
removeMenuItem();
|
removeMenuItem();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue