mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-13 19:07:09 +00:00
Multi src astar (#594)
## Description: Samples border shore tiles and uses multi-a* for determining the transport ship spawn cell. ## Please complete the following: - [x] I have added screenshots for all UI updates - [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: <DISCORD USERNAME> evan --------- Co-authored-by: evan <openfrontio@gmail.com>
This commit is contained in:
@@ -387,8 +387,9 @@ export class RadialMenu implements Layer {
|
||||
// BestTransportShipSpawn is an expensive operation, so
|
||||
// we calculate it here and send the spawn tile to other clients.
|
||||
myPlayer.bestTransportShipSpawn(tile).then((spawn) => {
|
||||
if (spawn == false) {
|
||||
return;
|
||||
let spawnTile: Cell | null = null;
|
||||
if (spawn !== false) {
|
||||
spawnTile = new Cell(this.g.x(spawn), this.g.y(spawn));
|
||||
}
|
||||
|
||||
this.eventBus.emit(
|
||||
@@ -396,7 +397,7 @@ export class RadialMenu implements Layer {
|
||||
this.g.owner(tile).id(),
|
||||
this.clickedCell,
|
||||
this.uiState.attackRatio * myPlayer.troops(),
|
||||
new Cell(this.g.x(spawn), this.g.y(spawn)),
|
||||
spawnTile,
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user