mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 07:22:31 +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) {
|
||||
Script.setTimeout(function () {
|
||||
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");
|
||||
|
||||
|
@ -640,7 +640,7 @@ function avatarJoinsDomain(sessionID) {
|
|||
Messages.sendLocalMessage(FLOOF_NOTIFICATION_CHANNEL, JSON.stringify({
|
||||
sender: "(D)",
|
||||
text: messageText,
|
||||
colour: {text: messageColor}
|
||||
colour: { text: messageColor }
|
||||
}));
|
||||
}
|
||||
}, 500); // Wait 500ms for the avatar to load to properly get info about them.
|
||||
|
@ -648,7 +648,7 @@ function avatarJoinsDomain(sessionID) {
|
|||
|
||||
function avatarLeavesDomain(sessionID) {
|
||||
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");
|
||||
|
||||
|
@ -660,7 +660,7 @@ function avatarLeavesDomain(sessionID) {
|
|||
Messages.sendLocalMessage(FLOOF_NOTIFICATION_CHANNEL, JSON.stringify({
|
||||
sender: "(D)",
|
||||
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 });
|
||||
if (overlay) {
|
||||
for (var i = 0; i < notificationList.length; i++) {
|
||||
if (overlay == notificationList[i].id) {
|
||||
if (overlay === notificationList[i].id) {
|
||||
Overlays.deleteOverlay(notificationList[i].id)
|
||||
Messages.sendMessage(MAIN_CHAT_APP_CHANNEL, JSON.stringify({
|
||||
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