Add carrier-take-off and carrier-approach overlays
Adds support for carrier variants of the take-off and approach overlays, with Automatic selection if requested.
This commit is contained in:
parent
968fbd82e0
commit
e1f9f6707c
2 changed files with 18 additions and 7 deletions
|
@ -389,6 +389,10 @@ QString LauncherController::selectAircraftStateAutomatically()
|
|||
}
|
||||
}
|
||||
|
||||
if (m_location->isCarrier() && m_location->isAirborneLocation() && m_selectedAircraftInfo->hasState("carrier-approach")) {
|
||||
return "carrier-approach";
|
||||
}
|
||||
|
||||
if (m_location->isAirborneLocation() && m_selectedAircraftInfo->hasState("approach")) {
|
||||
return "approach";
|
||||
}
|
||||
|
@ -400,9 +404,13 @@ QString LauncherController::selectAircraftStateAutomatically()
|
|||
if (m_selectedAircraftInfo->hasState("parking")) {
|
||||
return "parking";
|
||||
}
|
||||
} else {
|
||||
// also try 'engines-running'?
|
||||
if (m_selectedAircraftInfo->hasState("take-off"))
|
||||
}
|
||||
|
||||
if (m_location->isCarrier() && m_selectedAircraftInfo->hasState("carrier-take-off")) {
|
||||
return "carrier-take-off";
|
||||
}
|
||||
|
||||
if (m_selectedAircraftInfo->hasState("take-off")) {
|
||||
return "take-off";
|
||||
}
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ QString humanNameFromStateTag(const std::string& tag)
|
|||
{
|
||||
if (tag == "approach") return QObject::tr("On approach");
|
||||
if ((tag == "take-off") || (tag == "takeoff"))
|
||||
return QObject::tr("Ready for Take-off");
|
||||
return QObject::tr("Ready for take-off");
|
||||
if ((tag == "parked") || (tag == "parking") || (tag == "cold-and-dark"))
|
||||
return QObject::tr("Parked, cold & dark");
|
||||
if (tag == "auto")
|
||||
|
@ -152,6 +152,10 @@ QString humanNameFromStateTag(const std::string& tag)
|
|||
return QObject::tr("Cruise");
|
||||
if (tag == "taxi")
|
||||
return QObject::tr("Ready to taxi");
|
||||
if (tag == "carrier-approach")
|
||||
return QObject::tr("On approach to a carrier");
|
||||
if (tag == "carrier-take-off")
|
||||
return QObject::tr("Ready for catapult launch");
|
||||
|
||||
qWarning() << Q_FUNC_INFO << "add translation / string for" << QString::fromStdString(tag);
|
||||
// no mapping, let's use the tag directly
|
||||
|
@ -879,4 +883,3 @@ bool QmlAircraftInfo::hasTag(QString tag) const
|
|||
}
|
||||
|
||||
#include "QmlAircraftInfo.moc"
|
||||
|
||||
|
|
Loading…
Reference in a new issue