mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 07:37:31 +02:00
Update tutorial to disable away.js right away
This commit is contained in:
parent
0234747ec3
commit
b9bc9bb802
2 changed files with 14 additions and 4 deletions
|
@ -185,3 +185,5 @@ OwnershipToken.prototype = {
|
||||||
Script.setTimeout(checkOwnershipRequest.bind(this), 2000);
|
Script.setTimeout(checkOwnershipRequest.bind(this), 2000);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
debug("Returning from ownershipToken");
|
||||||
|
|
|
@ -27,10 +27,14 @@ if (!Function.prototype.bind) {
|
||||||
}
|
}
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var ownershipTokenPath = Script.resolvePath("ownershipToken.js");
|
Script.include("ownershipToken.js");
|
||||||
var tutorialPath = Script.resolvePath("tutorial.js");
|
Script.include("tutorial.js");
|
||||||
Script.include(ownershipTokenPath);
|
|
||||||
Script.include(tutorialPath);
|
var CHANNEL_AWAY_ENABLE = "Hifi-Away-Enable";
|
||||||
|
function setAwayEnabled(value) {
|
||||||
|
var message = value ? 'enable' : 'disable';
|
||||||
|
Messages.sendLocalMessage(CHANNEL_AWAY_ENABLE, message);
|
||||||
|
}
|
||||||
|
|
||||||
var TutorialZone = function() {
|
var TutorialZone = function() {
|
||||||
print("TutorialZone | Creating");
|
print("TutorialZone | Creating");
|
||||||
|
@ -65,7 +69,9 @@ if (!Function.prototype.bind) {
|
||||||
if (!this.token) {
|
if (!this.token) {
|
||||||
print("TutorialZone | Creating token");
|
print("TutorialZone | Creating token");
|
||||||
// The start zone has been entered, hide the overlays immediately
|
// The start zone has been entered, hide the overlays immediately
|
||||||
|
setAwayEnabled(false);
|
||||||
Menu.setIsOptionChecked("Overlays", false);
|
Menu.setIsOptionChecked("Overlays", false);
|
||||||
|
MyAvatar.shouldRenderLocally = false;
|
||||||
this.token = new OwnershipToken(Math.random() * 100000, this.entityID, {
|
this.token = new OwnershipToken(Math.random() * 100000, this.entityID, {
|
||||||
onGainedOwnership: function(token) {
|
onGainedOwnership: function(token) {
|
||||||
print("TutorialZone | GOT OWNERSHIP");
|
print("TutorialZone | GOT OWNERSHIP");
|
||||||
|
@ -100,6 +106,8 @@ if (!Function.prototype.bind) {
|
||||||
// re-enable the HUD/Overlays
|
// re-enable the HUD/Overlays
|
||||||
if (!self.tutorialManager) {
|
if (!self.tutorialManager) {
|
||||||
Menu.setIsOptionChecked("Overlays", true);
|
Menu.setIsOptionChecked("Overlays", true);
|
||||||
|
MyAvatar.shouldRenderLocally = true;
|
||||||
|
setAwayEnabled(true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue