1
0
Fork 0

Add carrier parking positions to property tree

This adds the names of the available parking positions/catapults
to the property tree, so we can build a suitable in-sim list
of parking positions for users to select from.
This commit is contained in:
Stuart Buchanan 2020-04-18 18:07:25 +01:00
parent dc1bc21d2f
commit 1d6b6d9753

View file

@ -323,6 +323,12 @@ void FGAICarrier::bind() {
props->setStringValue("sign", sign.c_str());
props->setBoolValue("controls/lighting/deck-lights", false);
props->setDoubleValue("controls/lighting/flood-lights-red-norm", 0);
// Write out a list of the parking positions - useful for the UI to select
// from
for (const auto& ppos : ppositions) {
if (ppos.name != "") props->addChild("parking-pos")->setStringValue("name", ppos.name);
}
}
bool FGAICarrier::getParkPosition(const string& id, SGGeod& geodPos,