mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-13 21:08:59 +00:00
Allow railroad loops (#1274)
## Description: This change enables loop formation in the station network, allowing for enhanced connectivity. However, it can sometimes result in clustered areas as a trade-off. To mitigate excessive clustering, loops are only permitted when there are at least 5 intermediary stations between the source and destination stations.  Also a few fixes for `.dev` players. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors
This commit is contained in:
@@ -302,7 +302,7 @@ export class DefaultConfig implements Config {
|
||||
return Math.min(50, Math.round(10 * Math.pow(numberOfPorts, 0.6)));
|
||||
}
|
||||
trainSpawnRate(numberOfStations: number): number {
|
||||
return Math.round(50 * Math.pow(numberOfStations, 0.8));
|
||||
return Math.min(1400, Math.round(60 * Math.pow(numberOfStations, 0.8)));
|
||||
}
|
||||
trainGold(): Gold {
|
||||
return BigInt(10_000);
|
||||
@@ -363,6 +363,7 @@ export class DefaultConfig implements Config {
|
||||
territoryBound: true,
|
||||
constructionDuration: this.instantBuild() ? 0 : 2 * 10,
|
||||
upgradable: true,
|
||||
canBuildTrainStation: true,
|
||||
};
|
||||
case UnitType.AtomBomb:
|
||||
return {
|
||||
@@ -452,6 +453,7 @@ export class DefaultConfig implements Config {
|
||||
territoryBound: true,
|
||||
constructionDuration: this.instantBuild() ? 0 : 2 * 10,
|
||||
upgradable: true,
|
||||
canBuildTrainStation: true,
|
||||
};
|
||||
case UnitType.Factory:
|
||||
return {
|
||||
@@ -466,6 +468,7 @@ export class DefaultConfig implements Config {
|
||||
),
|
||||
territoryBound: true,
|
||||
constructionDuration: this.instantBuild() ? 0 : 2 * 10,
|
||||
canBuildTrainStation: true,
|
||||
};
|
||||
case UnitType.Construction:
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user