mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 23:45:35 +08:00
Add X-Plane object version into the model description
This commit is contained in:
committed by
Klaus Basan
parent
01779183c4
commit
dbbc459dbc
@@ -288,7 +288,10 @@ namespace BlackMisc
|
||||
model.setLivery(livery);
|
||||
|
||||
model.setSimulator(CSimulatorInfo::xplane());
|
||||
model.setDescription("[CSL]");
|
||||
QString modelDescription("[CSL]");
|
||||
if (plane.objectVersion == CSLPlane::OBJ7) { modelDescription += "[OBJ7]"; }
|
||||
else if (plane.objectVersion == CSLPlane::OBJ8) { modelDescription += "[OBJ8]"; }
|
||||
model.setDescription(modelDescription);
|
||||
installedModels.push_back(model);
|
||||
}
|
||||
}
|
||||
@@ -421,6 +424,7 @@ namespace BlackMisc
|
||||
package.planes.back().objectName = fileInfo.completeBaseName();
|
||||
package.planes.back().textureName = texture;
|
||||
package.planes.back().filePath = fullPath;
|
||||
package.planes.back().objectVersion = CSLPlane::OBJ7;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -512,6 +516,7 @@ namespace BlackMisc
|
||||
package.planes.back().dirNames = dirNames;
|
||||
package.planes.back().objectName = fileInfo.completeBaseName();
|
||||
package.planes.back().filePath = fullPath;
|
||||
package.planes.back().objectVersion = CSLPlane::OBJ8;
|
||||
|
||||
if (tokens.size() >= 5)
|
||||
{
|
||||
|
||||
@@ -64,6 +64,12 @@ namespace BlackMisc
|
||||
//! CSL Plane data
|
||||
struct CSLPlane
|
||||
{
|
||||
enum ObjectVersion
|
||||
{
|
||||
OBJ7,
|
||||
OBJ8
|
||||
};
|
||||
|
||||
QString getModelName() const;
|
||||
|
||||
// Model name parts
|
||||
@@ -75,6 +81,8 @@ namespace BlackMisc
|
||||
QString icao; //!< Icao type of this model
|
||||
QString airline; //!< Airline identifier. Can be empty.
|
||||
QString livery; //!< Livery identifier. Can be empty.
|
||||
|
||||
ObjectVersion objectVersion;
|
||||
};
|
||||
|
||||
//! CSL package
|
||||
|
||||
Reference in New Issue
Block a user