have core/ directory use consolex for remote logging

This commit is contained in:
evanpelle
2024-12-18 12:00:00 -08:00
parent 642d5dc4ca
commit ff02d9d8b6
31 changed files with 91 additions and 66 deletions
@@ -1,3 +1,4 @@
import { consolex } from "../Consolex";
import { Execution, MutableGame, MutablePlayer, PlayerID } from "../game/Game";
export class SetTargetTroopRatioExecution implements Execution {
@@ -15,7 +16,7 @@ export class SetTargetTroopRatioExecution implements Execution {
tick(ticks: number): void {
if (this.targetTroopsRatio < 0 || this.targetTroopsRatio > 1) {
console.warn(`target troop ratio of ${this.targetTroopsRatio} for player ${this.player} invalid`)
consolex.warn(`target troop ratio of ${this.targetTroopsRatio} for player ${this.player} invalid`)
} else {
this.player.setTargetTroopRatio(this.targetTroopsRatio)
}