mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 11:20:45 +00:00
update gcs write logic, fix build cost bug
This commit is contained in:
@@ -215,6 +215,8 @@
|
||||
* add bug report button in game
|
||||
* bugfix: destroyers can't find path to dst and freeze
|
||||
* record single player game stats
|
||||
* alert on attack
|
||||
* alert on unit captured or destroyed
|
||||
* stop requesting lobby when playing game
|
||||
* nuking an enemy and accidentally destroying a trade ship shouldn't break the alliance and make you a traitor
|
||||
* you should get a notification and a reward (some money) for eliminating an enemy (perhaps take wtvr gold the enemy had)
|
||||
|
||||
@@ -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