1
0
Fork 0

Non-sticky scenarios, simpler UX for everyone.

If you want a scenario in a particular session of the sim, ask for
it on the command line / config files, or enable in the GUI.

Note if you had previously 'sticky' scenarios in your autosave.xml, you
will still get them until you clean your autosave, or disable them in
the GUI.
This commit is contained in:
James Turner 2013-04-05 17:20:22 +01:00
parent 295ae6a650
commit 85bfd27af2
2 changed files with 2 additions and 16 deletions

View file

@ -135,12 +135,10 @@ FGAIManager::init() {
}
void
FGAIManager::postinit() {
FGAIManager::postinit()
{
// postinit, so that it can access the Nasal subsystem
if (!root->getBoolValue("scenarios-enabled", true))
return;
// scenarios enabled, AI subsystem required
if (!enabled->getBoolValue())
enabled->setBoolValue(true);
@ -325,7 +323,6 @@ bool FGAIManager::loadScenarioCommand(const SGPropertyNode* args)
for (; root->hasChild("scenario", index); ++index) {}
SGPropertyNode* scenarioNode = root->getChild("scenario", index, true);
scenarioNode->setAttribute(SGPropertyNode::USERARCHIVE, true);
scenarioNode->setStringValue(name);
}

View file

@ -1146,16 +1146,6 @@ fgOptScenario( const char *arg )
}
SGPropertyNode_ptr scenario = ai_node->getNode( "scenario", index + 1, true );
scenario->setStringValue( arg );
ai_node->setBoolValue( "scenarios-enabled", true );
return FG_OPTIONS_OK;
}
static int
fgOptNoScenarios( const char *arg )
{
SGPropertyNode_ptr ai_node = fgGetNode( "/sim/ai", true );
ai_node->removeChildren("scenario",false);
ai_node->setBoolValue( "scenarios-enabled", false );
return FG_OPTIONS_OK;
}
@ -1506,7 +1496,6 @@ struct OptionDesc {
{"min-status", true, OPTION_STRING, "/sim/aircraft-min-status", false, "all", 0 },
{"livery", true, OPTION_FUNC, "", false, "", fgOptLivery },
{"ai-scenario", true, OPTION_FUNC | OPTION_MULTI, "", false, "", fgOptScenario },
{"disable-ai-scenarios", false, OPTION_FUNC, "", false, "", fgOptNoScenarios},
{"parking-id", true, OPTION_FUNC, "", false, "", fgOptParking },
{"version", false, OPTION_FUNC, "", false, "", fgOptVersion },
{"enable-fpe", false, OPTION_IGNORE, "", false, "", 0},