mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
refs #799, use message settings
This commit is contained in:
@@ -351,7 +351,16 @@ namespace BlackMisc
|
||||
return this->getRelayedTextMessageTypes().testFlag(TextMessagesCom2);
|
||||
}
|
||||
|
||||
bool CSettingsSimulatorMessages::isRelayedTextMessage(const Network::CTextMessage &msg, const BlackMisc::Simulation::CSimulatedAircraft &aircraft) const
|
||||
bool CSettingsSimulatorMessages::relayThisStatusMessage(const CStatusMessage &message) const
|
||||
{
|
||||
if (message.isEmpty()) { return false; }
|
||||
if (!this->isGloballyEnabled()) { return false; }
|
||||
if (!this->isRelayedTechnicalMessages()) { return false; }
|
||||
int s = static_cast<int>(message.getSeverity());
|
||||
return (s >= this->m_technicalLogLevel);
|
||||
}
|
||||
|
||||
bool CSettingsSimulatorMessages::relayThisTextMessage(const Network::CTextMessage &msg, const BlackMisc::Simulation::CSimulatedAircraft &aircraft) const
|
||||
{
|
||||
if (msg.isEmpty()) { return false; }
|
||||
if (!this->isGloballyEnabled()) { return false; }
|
||||
|
||||
@@ -246,15 +246,18 @@ namespace BlackMisc
|
||||
//! Relay UNICOM messages
|
||||
bool isRelayedUnicomTextMessages() const;
|
||||
|
||||
//! Relay given text message
|
||||
bool isRelayedTextMessage(const BlackMisc::Network::CTextMessage &msg, const BlackMisc::Simulation::CSimulatedAircraft &aircraft) const;
|
||||
|
||||
//! Relay COM1 text message
|
||||
bool isRelayedCom1TextMessages() const;
|
||||
|
||||
//! Relay COM2 text message
|
||||
bool isRelayedCom2TextMessages() const;
|
||||
|
||||
//! Relay given text message
|
||||
bool relayThisTextMessage(const BlackMisc::Network::CTextMessage &msg, const BlackMisc::Simulation::CSimulatedAircraft &aircraft) const;
|
||||
|
||||
//! Relay this particular message
|
||||
bool relayThisStatusMessage(const BlackMisc::CStatusMessage &message) const;
|
||||
|
||||
//! Relayed text messages
|
||||
CSettingsSimulatorMessages::TextMessageType getRelayedTextMessageTypes() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user