@ohd-tools/utils
Version:
Utilities for OHD-RCON
54 lines (53 loc) • 1.97 kB
TypeScript
import Maps from '../definitions/Maps';
export type MapQueryProps = {
Map: Maps;
Game: string | null;
BluforFaction: string;
OpforFaction: string;
MinPlayers: number;
MaxPlayers: number;
AutoFillHuman: null | 0 | 1;
bDisableKitRestrictions: boolean;
bBotAutofill: boolean;
BluforNumBots: number;
OpforNumBots: number;
BluforNumTickets: number;
OpforNumTickets: number;
};
/**
* Builder for OHD Map Strings
*/
export default class MapQuery {
/**What map to set the server to */
Map: MapQueryProps['Map'];
/**Exclusive to Modded Gamemodes */
Game: MapQueryProps['Game'];
/**Blue Team Faction */
BluforFaction: MapQueryProps['BluforFaction'];
/**Red Team Faction*/
OpforFaction: MapQueryProps['OpforFaction'];
/**Minimum number of players to start a game. If bBotAutofill is enables, bots will spawn to this point */
MinPlayers: MapQueryProps['MinPlayers'];
/**Max number of players */
MaxPlayers: MapQueryProps['MaxPlayers'];
/**Allow All players to choose all kits, without limitation */
bDisableKitRestrictions: MapQueryProps['bDisableKitRestrictions'];
/**Auto fill the server with bots up to MinPlayers */
bBotAutofill: MapQueryProps['bBotAutofill'];
/**How many bots should the Blue Team have */
BluforNumBots: MapQueryProps['BluforNumBots'];
/**How many bots should the Red Team have */
OpforNumBots: MapQueryProps['OpforNumBots'];
/**How many Reinforcements should the Blue Team have */
BluforNumTickets: MapQueryProps['BluforNumTickets'];
/**How many Reinforcements should the Red Team have */
OpforNumTickets: MapQueryProps['OpforNumTickets'];
/**What Team to force players to. */
AutoFillHuman: MapQueryProps['AutoFillHuman'];
constructor($b?: Partial<MapQueryProps>);
static parse(query: string): Partial<MapQueryProps>;
/**
* Generate the Level String
*/
toString(): string;
}