From 4800e0dd29e39a44274d1d273601034cb31578d5 Mon Sep 17 00:00:00 2001 From: Evan Date: Sun, 5 Jan 2025 12:59:14 -0800 Subject: [PATCH] NPCs only send emojis to players --- src/core/execution/FakeHumanExecution.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/core/execution/FakeHumanExecution.ts b/src/core/execution/FakeHumanExecution.ts index 105418072..f7212cd7c 100644 --- a/src/core/execution/FakeHumanExecution.ts +++ b/src/core/execution/FakeHumanExecution.ts @@ -169,7 +169,9 @@ export class FakeHumanExecution implements Execution { this.player.updateRelation(target.ally, -20) this.enemy = target.t this.lastEnemyUpdateTick = this.mg.ticks() - this.mg.addExecution(new EmojiExecution(this.player.id(), target.ally.id(), "👍")) + if (target.ally.type() == PlayerType.Human) { + this.mg.addExecution(new EmojiExecution(this.player.id(), target.ally.id(), "👍")) + } } if (this.enemy == null) { @@ -177,13 +179,15 @@ export class FakeHumanExecution implements Execution { if (mostHated != null && mostHated.relation == Relation.Hostile) { this.enemy = mostHated.player this.lastEnemyUpdateTick = this.mg.ticks() - this.mg.addExecution( - new EmojiExecution( - this.player.id(), - this.enemy.id(), - this.random.randElement(["🤡", "😡"]) + if (this.enemy.type() == PlayerType.Human) { + this.mg.addExecution( + new EmojiExecution( + this.player.id(), + this.enemy.id(), + this.random.randElement(["🤡", "😡"]) + ) ) - ) + } } }