Patterned territory (#786)

## Description:
This is meant to give players more customization options.
Permission handling hasn’t really been implemented yet.
## 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:

aotumuri
This commit is contained in:
Aotumuri
2025-06-22 23:57:24 -04:00
committed by GitHub
parent c5ada4d384
commit b71acdc993
41 changed files with 1001 additions and 14 deletions
+32 -4
View File
@@ -11,7 +11,14 @@ async function checkRange(
const game = await setup(mapName, { infiniteGold: true, instantBuild: true });
const grid = new UnitGrid(game.map());
const player = game.addPlayer(
new PlayerInfo("us", "test_player", PlayerType.Human, null, "test_id"),
new PlayerInfo(
undefined,
"us",
"test_player",
PlayerType.Human,
null,
"test_id",
),
);
const unitTile = game.map().ref(unitPosX, 0);
grid.addUnit(player.buildUnit(UnitType.DefensePost, unitTile, {}));
@@ -34,7 +41,14 @@ async function nearbyUnits(
const game = await setup(mapName, { infiniteGold: true, instantBuild: true });
const grid = new UnitGrid(game.map());
const player = game.addPlayer(
new PlayerInfo("us", "test_player", PlayerType.Human, null, "test_id"),
new PlayerInfo(
undefined,
"us",
"test_player",
PlayerType.Human,
null,
"test_id",
),
);
const unitTile = game.map().ref(unitPosX, 0);
for (const unitType of unitTypes) {
@@ -108,7 +122,14 @@ describe("Unit Grid range tests", () => {
});
const grid = new UnitGrid(game.map());
const player = game.addPlayer(
new PlayerInfo("us", "test_player", PlayerType.Human, null, "test_id"),
new PlayerInfo(
undefined,
"us",
"test_player",
PlayerType.Human,
null,
"test_id",
),
);
const unitTile = game.map().ref(0, 0);
grid.addUnit(player.buildUnit(UnitType.City, unitTile, {}));
@@ -125,7 +146,14 @@ describe("Unit Grid range tests", () => {
});
const grid = new UnitGrid(game.map());
const player = game.addPlayer(
new PlayerInfo("us", "test_player", PlayerType.Human, null, "test_id"),
new PlayerInfo(
undefined,
"us",
"test_player",
PlayerType.Human,
null,
"test_id",
),
);
const unitType = UnitType.City;
const unitTile = game.map().ref(0, 0);