mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-30 23:02:03 +00:00
update gcs write logic, fix build cost bug
This commit is contained in:
@@ -90,12 +90,12 @@ export class DefaultConfig implements Config {
|
||||
}
|
||||
case UnitType.DefensePost:
|
||||
return {
|
||||
cost: (p: Player) => Math.pow(2, p.units(UnitType.Port).length) * 100_000,
|
||||
cost: (p: Player) => Math.pow(2, p.units(UnitType.DefensePost).length) * 100_000,
|
||||
territoryBound: true
|
||||
}
|
||||
case UnitType.City:
|
||||
return {
|
||||
cost: (p: Player) => Math.pow(2, p.units(UnitType.Port).length) * 250_000,
|
||||
cost: (p: Player) => Math.pow(2, p.units(UnitType.City).length) * 250_000,
|
||||
territoryBound: true
|
||||
}
|
||||
default:
|
||||
|
||||
@@ -147,7 +147,8 @@ export class GameServer {
|
||||
}
|
||||
});
|
||||
try {
|
||||
if (this.turns.length > 100 && this.clients.length > 0) {
|
||||
if (this.turns.length > 350) {
|
||||
console.log(`writing game ${this.id} to gcs`)
|
||||
const bucket = storage.bucket(this.config.gameStorageBucketName());
|
||||
const file = bucket.file(this.id);
|
||||
const game = {
|
||||
|
||||
Reference in New Issue
Block a user