1
0
Fork 0

Warn when Nasal module not set in defaults.xml

This commit is contained in:
Stuart Buchanan 2020-02-19 20:32:22 +00:00
parent 9553577397
commit 1f0c21a371

View file

@ -1173,8 +1173,14 @@ void FGNasalSys::addModule(string moduleName, simgear::PathList scripts)
if (!module_node->hasChild("enabled",0))
{
SGPropertyNode* node = module_node->getChild("enabled",0,true);
node->setBoolValue(true);
node->setAttribute(SGPropertyNode::USERARCHIVE,true);
node->setBoolValue(false);
node->setAttribute(SGPropertyNode::USERARCHIVE,false);
SG_LOG(SG_NASAL, SG_ALERT, "Nasal module " <<
moduleName <<
" present in FGDATA/Nasal but not configured in defaults.xml. " <<
" Please add an entry to defaults.xml, and set "
<< node->getPath() <<
"=true to load the module on-demand at runtime when required.");
}
}
}