mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-28 09:30:34 +00:00
emoji icons show above players (just fire emoji for now)
This commit is contained in:
@@ -219,10 +219,12 @@ export class PlayerImpl implements MutablePlayer {
|
||||
}
|
||||
|
||||
outgoingEmojis(): EmojiMessage[] {
|
||||
return null
|
||||
return this.outgoingEmojis_
|
||||
.filter(e => this.gs.ticks() - e.createdAt < this.gs.config().emojiMessageDuration())
|
||||
.sort((a, b) => b.createdAt - a.createdAt)
|
||||
}
|
||||
|
||||
canSendEmoji(recipient: Player | null): boolean {
|
||||
canSendEmoji(recipient: Player | typeof AllPlayers): boolean {
|
||||
const prevMsgs = this.outgoingEmojis_.filter(msg => msg.recipient == recipient)
|
||||
for (const msg of prevMsgs) {
|
||||
if (this.gs.ticks() - msg.createdAt < this.gs.config().emojiMessageCooldown()) {
|
||||
|
||||
Reference in New Issue
Block a user