mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 13:20:43 +00:00
Merge branch 'main' into biome
This commit is contained in:
@@ -62,13 +62,9 @@ export class TrainStationExecution implements Execution {
|
||||
|
||||
private spawnTrain(station: TrainStation, currentTick: number) {
|
||||
if (this.mg === undefined) throw new Error("Not initialized");
|
||||
if (!this.spawnTrains) return;
|
||||
if (this.random === undefined) throw new Error("Not initialized");
|
||||
if (
|
||||
!this.spawnTrains ||
|
||||
currentTick - this.lastSpawnTick < this.ticksCooldown
|
||||
) {
|
||||
return;
|
||||
}
|
||||
if (currentTick < this.lastSpawnTick + this.ticksCooldown) return;
|
||||
const cluster = station.getCluster();
|
||||
if (cluster === null) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user