mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-30 15:02:12 +00:00
[Cleanup] Pass Player into execution constructor instead of PlayerID (#1022)
## Description: Answering issue: #1017 [Cleanup] Pass Player into the execution constructor instead of PlayerID I have tested the changes running and playing a full game. I do not know other way to test the changes, please inform me ❤️ ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: Lele --------- Co-authored-by: lva <lva@rovsing.dk>
This commit is contained in:
@@ -41,7 +41,7 @@ export class BotBehavior {
|
||||
private emoji(player: Player, emoji: number) {
|
||||
if (player.type() !== PlayerType.Human) return;
|
||||
this.game.addExecution(
|
||||
new EmojiExecution(this.player.id(), player.id(), emoji),
|
||||
new EmojiExecution(this.player, player.id(), emoji),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ export class BotBehavior {
|
||||
this.game.addExecution(
|
||||
new AttackExecution(
|
||||
troops,
|
||||
this.player.id(),
|
||||
this.player,
|
||||
target.isPlayer() ? target.id() : null,
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user