mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 21:30:33 +02:00
Make notices respect domain mute settings.
This commit is contained in:
parent
bec293b8c7
commit
b64c44f5ee
1 changed files with 26 additions and 12 deletions
|
@ -629,27 +629,41 @@ function avatarJoinsDomain(sessionID) {
|
||||||
Script.setTimeout(function () {
|
Script.setTimeout(function () {
|
||||||
var messageText = AvatarManager.getPalData([sessionID]).data[0].sessionDisplayName + " has joined."
|
var messageText = AvatarManager.getPalData([sessionID]).data[0].sessionDisplayName + " has joined."
|
||||||
var messageColor = {red: 122, green: 122, blue: 122};
|
var messageColor = {red: 122, green: 122, blue: 122};
|
||||||
playNotificationSound();
|
|
||||||
addToLog(messageText, "Notice", messageColor, "Domain");
|
addToLog(messageText, "Notice", messageColor, "Domain");
|
||||||
|
|
||||||
|
if (!mutedAudio["Domain"]) {
|
||||||
|
playNotificationSound();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!muted["Domain"]) {
|
||||||
Messages.sendLocalMessage(FLOOF_NOTIFICATION_CHANNEL, JSON.stringify({
|
Messages.sendLocalMessage(FLOOF_NOTIFICATION_CHANNEL, JSON.stringify({
|
||||||
sender: "(D)",
|
sender: "(D)",
|
||||||
text: messageText,
|
text: messageText,
|
||||||
colour: {text: messageColor}
|
colour: {text: messageColor}
|
||||||
}));
|
}));
|
||||||
|
}
|
||||||
}, 500); // Wait 500ms for the avatar to load to properly get info about them.
|
}, 500); // Wait 500ms for the avatar to load to properly get info about them.
|
||||||
}
|
}
|
||||||
|
|
||||||
function avatarLeavesDomain(sessionID) {
|
function avatarLeavesDomain(sessionID) {
|
||||||
var messageText = AvatarManager.getPalData([sessionID]).data[0].sessionDisplayName + " has left."
|
var messageText = AvatarManager.getPalData([sessionID]).data[0].sessionDisplayName + " has left."
|
||||||
var messageColor = {red: 122, green: 122, blue: 122};
|
var messageColor = {red: 122, green: 122, blue: 122};
|
||||||
playNotificationSound();
|
|
||||||
addToLog(messageText, "Notice", messageColor, "Domain");
|
addToLog(messageText, "Notice", messageColor, "Domain");
|
||||||
|
|
||||||
|
if (!mutedAudio["Domain"]) {
|
||||||
|
playNotificationSound();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!muted["Domain"]) {
|
||||||
Messages.sendLocalMessage(FLOOF_NOTIFICATION_CHANNEL, JSON.stringify({
|
Messages.sendLocalMessage(FLOOF_NOTIFICATION_CHANNEL, JSON.stringify({
|
||||||
sender: "(D)",
|
sender: "(D)",
|
||||||
text: messageText,
|
text: messageText,
|
||||||
colour: {text: messageColor}
|
colour: {text: messageColor}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function keyPressEvent(event) {
|
function keyPressEvent(event) {
|
||||||
if (event.key === H_KEY && !event.isAutoRepeat && event.isControl) {
|
if (event.key === H_KEY && !event.isAutoRepeat && event.isControl) {
|
||||||
|
|
Loading…
Reference in a new issue