mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-30 06:39:41 +00:00
eqeqeq
This commit is contained in:
@@ -76,7 +76,7 @@ export class ControlPanel extends LitElement implements Layer {
|
||||
newAttackRatio = 1;
|
||||
}
|
||||
|
||||
if (newAttackRatio == 0.11 && this.attackRatio == 0.01) {
|
||||
if (newAttackRatio === 0.11 && this.attackRatio === 0.01) {
|
||||
// If we're changing the ratio from 1%, then set it to 10% instead of 11% to keep a consistency
|
||||
newAttackRatio = 0.1;
|
||||
}
|
||||
@@ -92,13 +92,13 @@ export class ControlPanel extends LitElement implements Layer {
|
||||
}
|
||||
|
||||
const player = this.game.myPlayer();
|
||||
if (player == null || !player.isAlive()) {
|
||||
if (player === null || !player.isAlive()) {
|
||||
this.setVisibile(false);
|
||||
return;
|
||||
}
|
||||
|
||||
const popIncreaseRate = player.population() - this._population;
|
||||
if (this.game.ticks() % 5 == 0) {
|
||||
if (this.game.ticks() % 5 === 0) {
|
||||
this._popRateIsIncreasing =
|
||||
popIncreaseRate >= this._lastPopulationIncreaseRate;
|
||||
this._lastPopulationIncreaseRate = popIncreaseRate;
|
||||
|
||||
Reference in New Issue
Block a user