mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-17 08:49:29 +00:00
Executions dont switch owner (#326)
when an building is taken over by another player the execution for it doesnt change its owner this makes it so when a sam is captured it tries to intercept your own nukes and doesnt intercept the ones by the previous player this change makes executions of buildings automaticly switch their owner
This commit is contained in:
@@ -156,7 +156,6 @@ export interface Execution {
|
||||
activeDuringSpawnPhase(): boolean;
|
||||
init(mg: Game, ticks: number): void;
|
||||
tick(ticks: number): void;
|
||||
owner(): Player;
|
||||
}
|
||||
|
||||
export interface Attack {
|
||||
@@ -375,7 +374,6 @@ export interface Player {
|
||||
executeRetreat(attackID: string): void;
|
||||
|
||||
// Misc
|
||||
executions(): Execution[];
|
||||
toUpdate(): PlayerUpdate;
|
||||
playerProfile(): PlayerProfile;
|
||||
canBoat(tile: TileRef): boolean;
|
||||
|
||||
@@ -285,11 +285,6 @@ export class PlayerImpl implements Player {
|
||||
isAlive(): boolean {
|
||||
return this._tiles.size > 0;
|
||||
}
|
||||
executions(): Execution[] {
|
||||
return this.mg
|
||||
.executions()
|
||||
.filter((exec) => exec.owner().id() == this.id());
|
||||
}
|
||||
|
||||
incomingAllianceRequests(): AllianceRequest[] {
|
||||
return this.mg.allianceRequests.filter((ar) => ar.recipient() == this);
|
||||
|
||||
Reference in New Issue
Block a user