From ba31171a10da6abde4d6e40006c7d3784c481b86 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Wed, 26 Jul 2017 15:13:40 +0200 Subject: [PATCH] Ref T111, allow to alter plugin info (needed for dummy driver) --- src/blackcore/simulatorcommon.cpp | 6 ++++++ src/blackcore/simulatorcommon.h | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/src/blackcore/simulatorcommon.cpp b/src/blackcore/simulatorcommon.cpp index 64a48816f..ca11785b2 100644 --- a/src/blackcore/simulatorcommon.cpp +++ b/src/blackcore/simulatorcommon.cpp @@ -115,6 +115,12 @@ namespace BlackCore return false; } + void CSimulatorCommon::setNewPluginInfo(const CSimulatorPluginInfo &info, const CAircraftModel &defaultModel) + { + m_simulatorPluginInfo = info; + m_defaultModel = defaultModel; + } + int CSimulatorCommon::maxAirportsInRange() const { // might change in future or become a setting or such diff --git a/src/blackcore/simulatorcommon.h b/src/blackcore/simulatorcommon.h index 130299930..025c5e572 100644 --- a/src/blackcore/simulatorcommon.h +++ b/src/blackcore/simulatorcommon.h @@ -156,6 +156,10 @@ namespace BlackCore virtual bool logicallyRemoveRemoteAircraft(const BlackMisc::Aviation::CCallsign &callsign) override; //! @} + //! New plugin info + //! \remark normally only used by + void setNewPluginInfo(const BlackMisc::Simulation::CSimulatorPluginInfo &info, const BlackMisc::Simulation::CAircraftModel &defaultModel); + //! Max.airports in range int maxAirportsInRange() const;