mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 01:29:50 +00:00
Allow to set the biome with the autostart command.
Basically a patch by: @wraitii Differential revision: https://code.wildfiregames.com/D4976 Comments by: @bb, @sera Accepted by: @Langbart Fixes #6521 This was SVN commit r27692.
This commit is contained in:
@@ -8,6 +8,7 @@ Basic gameplay:
|
||||
|
||||
Autostart:
|
||||
-autostart="TYPEDIR/MAPNAME" enables autostart and sets MAPNAME; TYPEDIR is skirmishes, scenarios, or random
|
||||
-autostart-biome=BIOME sets BIOME for a random map
|
||||
-autostart-seed=SEED sets randomization seed value (default 0, use -1 for random)
|
||||
-autostart-ai=PLAYER:AI sets the AI for PLAYER (e.g. 2:petra)
|
||||
-autostart-aidiff=PLAYER:DIFF sets the DIFFiculty of PLAYER's AI (default 3, 0: sandbox, 5: very hard)
|
||||
|
||||
@@ -800,6 +800,7 @@ CParamNode GetTemplate(const std::string& templateName)
|
||||
*
|
||||
* -autostart="TYPEDIR/MAPNAME" enables autostart and sets MAPNAME;
|
||||
* TYPEDIR is skirmishes, scenarios, or random
|
||||
* -autostart-biome=BIOME sets BIOME for a random map
|
||||
* -autostart-seed=SEED sets randomization seed value (default 0, use -1 for random)
|
||||
* -autostart-ai=PLAYER:AI sets the AI for PLAYER (e.g. 2:petra)
|
||||
* -autostart-aidiff=PLAYER:DIFF sets the DIFFiculty of PLAYER's AI
|
||||
@@ -958,6 +959,12 @@ bool Autostart(const CmdLineArgs& args)
|
||||
|
||||
Script::SetProperty(rq, settings, "Size", mapSize); // Random map size (in patches)
|
||||
|
||||
if (args.Has("autostart-biome"))
|
||||
{
|
||||
CStr biome = args.Get("autostart-biome");
|
||||
Script::SetProperty(rq, settings, "Biome", biome);
|
||||
}
|
||||
|
||||
// Get optional number of players (default 2)
|
||||
size_t numPlayers = 2;
|
||||
if (args.Has("autostart-players"))
|
||||
|
||||
Reference in New Issue
Block a user