mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:27:48 +02:00
Apply suggestions from code review
Co-authored-by: David Rowe <david@ctrlaltstudio.com>
This commit is contained in:
parent
b64c44f5ee
commit
cc43112bf3
2 changed files with 6 additions and 6 deletions
|
@ -628,7 +628,7 @@ function setVisible(_visible) {
|
||||||
function avatarJoinsDomain(sessionID) {
|
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 };
|
||||||
|
|
||||||
addToLog(messageText, "Notice", messageColor, "Domain");
|
addToLog(messageText, "Notice", messageColor, "Domain");
|
||||||
|
|
||||||
|
@ -640,7 +640,7 @@ function avatarJoinsDomain(sessionID) {
|
||||||
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.
|
||||||
|
@ -648,7 +648,7 @@ function avatarJoinsDomain(sessionID) {
|
||||||
|
|
||||||
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 };
|
||||||
|
|
||||||
addToLog(messageText, "Notice", messageColor, "Domain");
|
addToLog(messageText, "Notice", messageColor, "Domain");
|
||||||
|
|
||||||
|
@ -660,7 +660,7 @@ function avatarLeavesDomain(sessionID) {
|
||||||
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 }
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,7 +181,7 @@ Controller.mousePressEvent.connect(function (event) {
|
||||||
var overlay = Overlays.getOverlayAtPoint({ x: event.x, y: event.y });
|
var overlay = Overlays.getOverlayAtPoint({ x: event.x, y: event.y });
|
||||||
if (overlay) {
|
if (overlay) {
|
||||||
for (var i = 0; i < notificationList.length; i++) {
|
for (var i = 0; i < notificationList.length; i++) {
|
||||||
if (overlay == notificationList[i].id) {
|
if (overlay === notificationList[i].id) {
|
||||||
Overlays.deleteOverlay(notificationList[i].id)
|
Overlays.deleteOverlay(notificationList[i].id)
|
||||||
Messages.sendMessage(MAIN_CHAT_APP_CHANNEL, JSON.stringify({
|
Messages.sendMessage(MAIN_CHAT_APP_CHANNEL, JSON.stringify({
|
||||||
type: "ShowChatWindow",
|
type: "ShowChatWindow",
|
||||||
|
@ -191,4 +191,4 @@ Controller.mousePressEvent.connect(function (event) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Script.scriptEnding.connect(cleanUp);
|
Script.scriptEnding.connect(cleanUp);
|
||||||
|
|
Loading…
Reference in a new issue