feat(tuning): configure tuning for each game copy
This commit is contained in:
1 parent
61255f5473
commit
893d60854f
15 files changed
+440
-9
No files matched your search
@@ -29,10 +29,8 @@ export interface BattleTuning {
|
||||
|
||||
export function readBattleTuning(reader: TuningReader): BattleTuning {
|
||||
const maxPlayers = reader.int('maxPlayers', { min: 2, max: 64 });
|
||||
const maxBots = reader.int('maxBots', { min: 1, max: 63 });
|
||||
if (maxBots >= maxPlayers) {
|
||||
throw new TuningError(`tuning file battle.jsonc: maxBots (${maxBots}) must be less than maxPlayers (${maxPlayers})`);
|
||||
}
|
||||
// Keep one slot for the player when the launcher lowers the session capacity.
|
||||
const maxBots = Math.min(reader.int('maxBots', { min: 1, max: 63 }), maxPlayers - 1);
|
||||
const smallTeamsMaxPlayers = reader.int('smallTeamsMaxPlayers', { min: 2, max: 64 });
|
||||
if (smallTeamsMaxPlayers > maxPlayers) {
|
||||
throw new TuningError(
|
||||
|
||||
Reference in new issue
Block a user