Show player relations in player info overlay

This commit is contained in:
Evan
2024-12-30 09:40:16 -08:00
parent a159c50160
commit f4c98318b6
11 changed files with 90 additions and 30 deletions
+2 -1
View File
@@ -1,5 +1,5 @@
import { consolex } from "../Consolex";
import {AllPlayers, Execution, MutableGame, MutablePlayer, PlayerID} from "../game/Game";
import { Execution, MutableGame, MutablePlayer, PlayerID } from "../game/Game";
export class DonateExecution implements Execution {
@@ -26,6 +26,7 @@ export class DonateExecution implements Execution {
tick(ticks: number): void {
if (this.sender.canDonate(this.recipient)) {
this.sender.donate(this.recipient, this.troops)
this.recipient.updateRelation(this.sender, 50)
} else {
consolex.warn(`cannot send tropps from ${this.sender} to ${this.recipient}`)
}