mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-23 06:49:37 +00:00
Comment updates
This commit is contained in:
@@ -419,9 +419,7 @@ export class ClientGameRunner {
|
||||
this.myPlayer = myPlayer;
|
||||
}
|
||||
this.myPlayer.actions(tile, TransportShipFilter.Only).then((actions) => {
|
||||
// if (this.myPlayer === null) return; //--> redundant check as set above?, but need to add ! below to stop error 'can be null'
|
||||
if (actions.canAttack) {
|
||||
//-->maybe only get actions.canAttack + transportship from buildableunits? Not everything else?
|
||||
this.eventBus.emit(
|
||||
new SendAttackIntentEvent(
|
||||
this.gameView.owner(tile).id(),
|
||||
@@ -517,7 +515,6 @@ export class ClientGameRunner {
|
||||
}
|
||||
|
||||
this.myPlayer.actions(tile, TransportShipFilter.Only).then((actions) => {
|
||||
//-->> maybe only get transportship from buildableunits? Not everything else?
|
||||
if (this.canBoatAttack(actions) !== false) {
|
||||
this.sendBoatAttackIntent(tile);
|
||||
}
|
||||
|
||||
@@ -103,7 +103,6 @@ export class UnitDisplay extends LitElement implements Layer {
|
||||
tick() {
|
||||
const player = this.game?.myPlayer();
|
||||
player?.actions(undefined, TransportShipFilter.Exclude).then((actions) => {
|
||||
// player?.actions(undefined, TransportShipFilter.Default).then((actions) => {
|
||||
this.playerActions = actions;
|
||||
});
|
||||
if (!player) return;
|
||||
|
||||
@@ -861,8 +861,9 @@ export interface NameViewData {
|
||||
size: number;
|
||||
}
|
||||
|
||||
// Filter for buildableUnits
|
||||
export enum TransportShipFilter {
|
||||
Default = "default", // Include TransportShip with all units
|
||||
Exclude = "exclude", // Skip TransportShip in the unit list
|
||||
Only = "only", // Only check TransportShip
|
||||
Default = "default", // Include
|
||||
Exclude = "exclude", // Exclude
|
||||
Only = "only", // TransportShip only
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user