refactor: rename Bot to Tribe in internal execution code (#3372)

## Description

Follows up on #3290 which renamed the user-facing "Bots" to "Tribes".
This renames the internal implementation to match:

- `BotExecution` → `TribeExecution`
- `BotSpawner` → `TribeSpawner`
- `BotNames` → `TribeNames` (`BOT_NAME_*` → `TRIBE_NAME_*`)

All callers updated accordingly. `PlayerType.Bot` and `ColoredTeams.Bot`
are intentionally left unchanged as they are serialised wire-format
values.

Closes #3335

## Please complete the following:
- [x] My changes do not break existing functionality
- [x] I have tested my changes

## Please put your Discord username so you can be contacted if a bug or
regression is found:
Just reply here

---------

Co-authored-by: PGray <PGrayCS@users.noreply.github.com>
This commit is contained in:
PGray
2026-03-10 04:31:18 +00:00
committed by GitHub
parent 13a965a9c5
commit be9ea14fe9
10 changed files with 77 additions and 86 deletions
+4 -4
View File
@@ -8,7 +8,6 @@ import { AllianceRequestExecution } from "./alliance/AllianceRequestExecution";
import { BreakAllianceExecution } from "./alliance/BreakAllianceExecution";
import { AttackExecution } from "./AttackExecution";
import { BoatRetreatExecution } from "./BoatRetreatExecution";
import { BotSpawner } from "./BotSpawner";
import { ConstructionExecution } from "./ConstructionExecution";
import { DeleteUnitExecution } from "./DeleteUnitExecution";
import { DonateGoldExecution } from "./DonateGoldExecution";
@@ -26,6 +25,7 @@ import { RetreatExecution } from "./RetreatExecution";
import { SpawnExecution } from "./SpawnExecution";
import { TargetPlayerExecution } from "./TargetPlayerExecution";
import { TransportShipExecution } from "./TransportShipExecution";
import { TribeSpawner } from "./TribeSpawner";
import { UpgradeStructureExecution } from "./UpgradeStructureExecution";
import { PlayerSpawner } from "./utils/PlayerSpawner";
@@ -38,7 +38,7 @@ export class Executor {
private gameID: GameID,
private clientID: ClientID | undefined,
) {
// Add one to avoid id collisions with bots.
// Add one to avoid id collisions with tribes.
this.random = new PseudoRandom(simpleHash(gameID) + 1);
}
@@ -126,8 +126,8 @@ export class Executor {
}
}
spawnBots(numBots: number): SpawnExecution[] {
return new BotSpawner(this.mg, this.gameID).spawnBots(numBots);
spawnTribes(numTribes: number): SpawnExecution[] {
return new TribeSpawner(this.mg, this.gameID).spawnTribes(numTribes);
}
spawnPlayers(): SpawnExecution[] {