mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 19:50:38 +02:00
Merge pull request #16148 from MiladNazeri/bugz-1395/persistent-emoji-after-shutdown
Bugz 1395/persistent emoji after shutdown
This commit is contained in:
commit
adb266e065
3 changed files with 22 additions and 3 deletions
|
@ -79,7 +79,6 @@ function pruneOldAvimojis() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function maybeClearTimeoutDelete() {
|
function maybeClearTimeoutDelete() {
|
||||||
if (defaultTimeout) {
|
if (defaultTimeout) {
|
||||||
Script.clearTimeout(defaultTimeout);
|
Script.clearTimeout(defaultTimeout);
|
||||||
|
@ -157,6 +156,7 @@ function handleSelectedEmoji(emojiFilename) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function onDomainChanged() {
|
function onDomainChanged() {
|
||||||
resetEmojis();
|
resetEmojis();
|
||||||
}
|
}
|
||||||
|
@ -167,6 +167,14 @@ function onScaleChanged() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function onAddingWearable(id) {
|
||||||
|
var props = Entities.getEntityProperties(id, ["name"]);
|
||||||
|
if (props.name.toLowerCase().indexOf("avimoji") > -1) {
|
||||||
|
Entities.deleteEntity(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// #endregion
|
// #endregion
|
||||||
// *************************************
|
// *************************************
|
||||||
// END ui_handlers
|
// END ui_handlers
|
||||||
|
@ -179,7 +187,13 @@ function onScaleChanged() {
|
||||||
|
|
||||||
|
|
||||||
// what happens when we need to add an emoji over a user
|
// what happens when we need to add an emoji over a user
|
||||||
|
var firstEmojiMadeOnStartup = false;
|
||||||
function addEmoji(emojiFilename) {
|
function addEmoji(emojiFilename) {
|
||||||
|
if (!firstEmojiMadeOnStartup) {
|
||||||
|
firstEmojiMadeOnStartup = true;
|
||||||
|
Entities.addingWearable.disconnect(onAddingWearable);
|
||||||
|
}
|
||||||
|
|
||||||
if (currentEmoji) {
|
if (currentEmoji) {
|
||||||
resetEmojis();
|
resetEmojis();
|
||||||
}
|
}
|
||||||
|
@ -418,6 +432,7 @@ function startup() {
|
||||||
Script.scriptEnding.connect(unload);
|
Script.scriptEnding.connect(unload);
|
||||||
Window.domainChanged.connect(onDomainChanged);
|
Window.domainChanged.connect(onDomainChanged);
|
||||||
MyAvatar.scaleChanged.connect(onScaleChanged);
|
MyAvatar.scaleChanged.connect(onScaleChanged);
|
||||||
|
Entities.addingWearable.connect(onAddingWearable);
|
||||||
signalsConnected = true;
|
signalsConnected = true;
|
||||||
|
|
||||||
function AviMoji() {
|
function AviMoji() {
|
||||||
|
@ -457,6 +472,10 @@ function unload() {
|
||||||
if (signalsConnected) {
|
if (signalsConnected) {
|
||||||
Window.domainChanged.disconnect(onDomainChanged);
|
Window.domainChanged.disconnect(onDomainChanged);
|
||||||
MyAvatar.scaleChanged.disconnect(onScaleChanged);
|
MyAvatar.scaleChanged.disconnect(onScaleChanged);
|
||||||
|
if (!firstEmojiMadeOnStartup) {
|
||||||
|
Entities.addingWearable.disconnect(onAddingWearable);
|
||||||
|
}
|
||||||
|
|
||||||
signalsConnected = false;
|
signalsConnected = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -543,7 +543,7 @@ function onDisplayModeChanged(isHMDMode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var emojiAPI = Script.require("./emojiApp/simplifiedEmoji.js");
|
var emojiAPI = Script.require("./emojiApp/simplifiedEmoji.js?" + Date.now());
|
||||||
var keyPressSignalsConnected = false;
|
var keyPressSignalsConnected = false;
|
||||||
var emojiCodeMap;
|
var emojiCodeMap;
|
||||||
var customEmojiCodeMap;
|
var customEmojiCodeMap;
|
||||||
|
|
|
@ -584,7 +584,7 @@ function restoreLODSettings() {
|
||||||
|
|
||||||
|
|
||||||
var nametag = Script.require("./simplifiedNametag/simplifiedNametag.js?" + Date.now());
|
var nametag = Script.require("./simplifiedNametag/simplifiedNametag.js?" + Date.now());
|
||||||
var si = Script.require("./simplifiedStatusIndicator/simplifiedStatusIndicator.js?" + Date.now())
|
var si = Script.require("./simplifiedStatusIndicator/simplifiedStatusIndicator.js?" + Date.now());
|
||||||
var emote = Script.require("../simplifiedEmote/simplifiedEmote.js?" + Date.now());
|
var emote = Script.require("../simplifiedEmote/simplifiedEmote.js?" + Date.now());
|
||||||
var oldShowAudioTools;
|
var oldShowAudioTools;
|
||||||
var oldShowBubbleTools;
|
var oldShowBubbleTools;
|
||||||
|
|
Loading…
Reference in a new issue