mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-02 03:28:27 +00:00
Automatic train stations (#1353)
## Description:
Train stations are now built automatically when a factory is
constructed.
Changes:
- When a factory is built, nearby structures are connected to the rail
network
- When a city is built near a factory, it is connected to the rail
network
- All structures behave the same when a train stops: to be defined
- Removed station badge
- Gold income is now related to the structure's level
## 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
## Please put your Discord username so you can be contacted if a bug or
regression is found:
IngloriousTom
This commit is contained in:
@@ -21,7 +21,7 @@ import {
|
||||
} from "../core/Schemas";
|
||||
import { createGameRecord } from "../core/Util";
|
||||
import { GameEnv, ServerConfig } from "../core/configuration/Config";
|
||||
import { GameType, UnitType } from "../core/game/Game";
|
||||
import { GameType } from "../core/game/Game";
|
||||
import { archive } from "./Archive";
|
||||
import { Client } from "./Client";
|
||||
import { gatekeeper } from "./Gatekeeper";
|
||||
@@ -222,15 +222,6 @@ export class GameServer {
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (
|
||||
clientMsg.intent.type === "create_station" &&
|
||||
this.gameConfig.disabledUnits?.includes(UnitType.Train)
|
||||
) {
|
||||
this.log.warn(
|
||||
`create_station is disabled, client: ${client.clientID}`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
this.addIntent(clientMsg.intent);
|
||||
}
|
||||
if (clientMsg.type === "ping") {
|
||||
|
||||
Reference in New Issue
Block a user