Lobby status change event, fix moderation in player list

This commit is contained in:
Natsumi
2022-02-13 10:30:26 +13:00
parent 33a8b079ab
commit 9349dc3fad
4 changed files with 141 additions and 50 deletions

View File

@@ -573,22 +573,21 @@ Vue.component('marquee-text', MarqueeText);
};
$app.methods.addEntryHudFeed = function (json) {
var {displayName, text, color, avatar, inCache} = JSON.parse(json);
var data = JSON.parse(json);
var combo = 1;
this.hudFeed.forEach((item) => {
if (item.displayName === displayName && item.text === text) {
if (
item.displayName === data.displayName &&
item.text === data.text
) {
combo = item.combo + 1;
removeFromArray(this.hudFeed, item);
}
});
this.hudFeed.unshift({
time: Date.now(),
displayName,
text,
combo,
color,
avatar,
inCache
...data
});
this.cleanHudFeed();
};