mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-28 16:44:16 +00:00
feat: more trade when there are few ports worldwide (#242)
This commit is contained in:
@@ -66,7 +66,10 @@ export class PortExecution implements Execution {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.random.chance(this.mg.config().tradeShipSpawnRate())) {
|
||||
const totalNbOfPorts = this.mg.units(UnitType.Port).length;
|
||||
if (
|
||||
!this.random.chance(this.mg.config().tradeShipSpawnRate(totalNbOfPorts))
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user