Skip to content

Commit

Permalink
Merge pull request Longwelwind#1785 from gereon77/remove-auto-vote-ye…
Browse files Browse the repository at this point in the history
…s-of-replaced-player

Don't auto vote for the replaced player anymore
  • Loading branch information
gereon77 committed Jun 15, 2023
2 parents 9e57df1 + 4827f37 commit 00b5c6f
Showing 1 changed file with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,16 +382,6 @@ export class ReplacePlayer extends VoteType {
this.forHouse = forHouse;
}

onVoteCreated(vote: Vote): void {
if (!this.replaced.connected && vote.ingame.entireGame.gameSettings.pbem && vote.ingame.players.size >= 5) {
// Let the player to be replaced automatically vote with accept when he is offline
// to make it easier to replace quitters. But only do it if there are more than 4 players
// left in game because with 4 players only and one auto vote, just one other vote would be required
vote.votes.set(this.forHouse, true);
vote.checkVoteFinished();
}
}

verb(): string {
return `replace ${this.replaced.name} (${this.forHouse.name})`;
}
Expand Down Expand Up @@ -487,16 +477,6 @@ export class ReplacePlayerByVassal extends VoteType {
this.forHouse = forHouse;
}

onVoteCreated(vote: Vote): void {
if (!this.replaced.connected && vote.ingame.entireGame.gameSettings.pbem && vote.ingame.players.size >= 5) {
// Let the player to be replaced automatically vote with accept when he is offline
// to make it easier to replace quitters. But only do it if there are more than 4 players
// left in game because with 4 players only and one auto vote, just one other vote would be required
vote.votes.set(this.forHouse, true);
vote.checkVoteFinished();
}
}

verb(): string {
return `replace ${this.replaced.name} (${this.forHouse.name}) with a vassal`;
}
Expand Down

0 comments on commit 00b5c6f

Please sign in to comment.