Disable trains in public games (#1342)

## Description:

1. Disable trains in public games
2. add more checks so people can't build trains by bypass the UI.

## 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:

evan
This commit is contained in:
evanpelle
2025-07-04 13:13:38 -07:00
committed by GitHub
parent 0fed0e96f9
commit fc2da5e077
3 changed files with 25 additions and 2 deletions
+8 -1
View File
@@ -1,5 +1,11 @@
import { getServerConfigFromServer } from "../core/configuration/ConfigLoader";
import { Difficulty, GameMapType, GameMode, GameType } from "../core/game/Game";
import {
Difficulty,
GameMapType,
GameMode,
GameType,
UnitType,
} from "../core/game/Game";
import { PseudoRandom } from "../core/PseudoRandom";
import { GameConfig } from "../core/Schemas";
import { logger } from "./Logger";
@@ -61,6 +67,7 @@ export class MapPlaylist {
gameMode: mode,
playerTeams: numPlayerTeams,
bots: 400,
disabledUnits: [UnitType.Train, UnitType.Factory],
} satisfies GameConfig;
}