mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-24 09:05:04 +00:00
Disable nukes option (#237)
This makes it possible to disable all nukes as well as missile silos from the game in privat lobbies and singleplayer games
This commit is contained in:
@@ -34,6 +34,7 @@ export class GameManager {
|
||||
gameType: GameType.Private,
|
||||
difficulty: Difficulty.Medium,
|
||||
disableNPCs: false,
|
||||
disableNukes: false,
|
||||
infiniteGold: false,
|
||||
infiniteTroops: false,
|
||||
instantBuild: false,
|
||||
|
||||
@@ -71,6 +71,9 @@ export class GameServer {
|
||||
if (gameConfig.disableNPCs != null) {
|
||||
this.gameConfig.disableNPCs = gameConfig.disableNPCs;
|
||||
}
|
||||
if (gameConfig.disableNukes != null) {
|
||||
this.gameConfig.disableNukes = gameConfig.disableNukes;
|
||||
}
|
||||
if (gameConfig.bots != null) {
|
||||
this.gameConfig.bots = gameConfig.bots;
|
||||
}
|
||||
|
||||
@@ -233,6 +233,7 @@ async function schedulePublicGame() {
|
||||
infiniteTroops: false,
|
||||
instantBuild: false,
|
||||
disableNPCs: false,
|
||||
disableNukes: false,
|
||||
bots: 400,
|
||||
} as GameConfig;
|
||||
|
||||
|
||||
@@ -164,6 +164,7 @@ export function startWorker() {
|
||||
instantBuild: req.body.instantBuild,
|
||||
bots: req.body.bots,
|
||||
disableNPCs: req.body.disableNPCs,
|
||||
disableNukes: req.body.disableNukes,
|
||||
});
|
||||
res.status(200).json({ success: true });
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user