Skip to content

Commit d7b81e5

Browse files
committed
- Added some canSendEmoji() because I saw some "cannot send emoji" warnings in the console
1 parent 1042164 commit d7b81e5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/core/execution/nation/NationEmojiBehavior.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ export class NationEmojiBehavior {
263263

264264
sendEmoji(otherPlayer: Player | typeof AllPlayers, emojisList: number[]) {
265265
if (!this.shouldSendEmoji(otherPlayer, false)) return;
266+
if (!this.player.canSendEmoji(otherPlayer)) return;
266267

267268
this.game.addExecution(
268269
new EmojiExecution(
@@ -301,6 +302,7 @@ export function respondToEmoji(
301302
if (recipient === AllPlayers || recipient.type() !== PlayerType.Nation) {
302303
return;
303304
}
305+
if (!recipient.canSendEmoji(sender)) return;
304306

305307
if (emojiString === "🖕") {
306308
recipient.updateRelation(sender, -100);
@@ -346,6 +348,7 @@ export function respondToMIRV(
346348
mirvTarget: Player,
347349
) {
348350
if (!random.chance(8)) return;
351+
if (!mirvTarget.canSendEmoji(AllPlayers)) return;
349352

350353
game.addExecution(
351354
new EmojiExecution(

0 commit comments

Comments
 (0)