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:
parent
295ae6a650
commit
85bfd27af2
2 changed files with 2 additions and 16 deletions
|
@ -135,12 +135,10 @@ FGAIManager::init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FGAIManager::postinit() {
|
FGAIManager::postinit()
|
||||||
|
{
|
||||||
// postinit, so that it can access the Nasal subsystem
|
// postinit, so that it can access the Nasal subsystem
|
||||||
|
|
||||||
if (!root->getBoolValue("scenarios-enabled", true))
|
|
||||||
return;
|
|
||||||
|
|
||||||
// scenarios enabled, AI subsystem required
|
// scenarios enabled, AI subsystem required
|
||||||
if (!enabled->getBoolValue())
|
if (!enabled->getBoolValue())
|
||||||
enabled->setBoolValue(true);
|
enabled->setBoolValue(true);
|
||||||
|
@ -325,7 +323,6 @@ bool FGAIManager::loadScenarioCommand(const SGPropertyNode* args)
|
||||||
for (; root->hasChild("scenario", index); ++index) {}
|
for (; root->hasChild("scenario", index); ++index) {}
|
||||||
|
|
||||||
SGPropertyNode* scenarioNode = root->getChild("scenario", index, true);
|
SGPropertyNode* scenarioNode = root->getChild("scenario", index, true);
|
||||||
scenarioNode->setAttribute(SGPropertyNode::USERARCHIVE, true);
|
|
||||||
scenarioNode->setStringValue(name);
|
scenarioNode->setStringValue(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1146,16 +1146,6 @@ fgOptScenario( const char *arg )
|
||||||
}
|
}
|
||||||
SGPropertyNode_ptr scenario = ai_node->getNode( "scenario", index + 1, true );
|
SGPropertyNode_ptr scenario = ai_node->getNode( "scenario", index + 1, true );
|
||||||
scenario->setStringValue( arg );
|
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;
|
return FG_OPTIONS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1506,7 +1496,6 @@ struct OptionDesc {
|
||||||
{"min-status", true, OPTION_STRING, "/sim/aircraft-min-status", false, "all", 0 },
|
{"min-status", true, OPTION_STRING, "/sim/aircraft-min-status", false, "all", 0 },
|
||||||
{"livery", true, OPTION_FUNC, "", false, "", fgOptLivery },
|
{"livery", true, OPTION_FUNC, "", false, "", fgOptLivery },
|
||||||
{"ai-scenario", true, OPTION_FUNC | OPTION_MULTI, "", false, "", fgOptScenario },
|
{"ai-scenario", true, OPTION_FUNC | OPTION_MULTI, "", false, "", fgOptScenario },
|
||||||
{"disable-ai-scenarios", false, OPTION_FUNC, "", false, "", fgOptNoScenarios},
|
|
||||||
{"parking-id", true, OPTION_FUNC, "", false, "", fgOptParking },
|
{"parking-id", true, OPTION_FUNC, "", false, "", fgOptParking },
|
||||||
{"version", false, OPTION_FUNC, "", false, "", fgOptVersion },
|
{"version", false, OPTION_FUNC, "", false, "", fgOptVersion },
|
||||||
{"enable-fpe", false, OPTION_IGNORE, "", false, "", 0},
|
{"enable-fpe", false, OPTION_IGNORE, "", false, "", 0},
|
||||||
|
|
Loading…
Add table
Reference in a new issue