Boost file format version to 1.7 when saving simulation extensions
This commit is contained in:
parent
7aca75f053
commit
e6b5248a0c
@ -47,3 +47,6 @@ The following file format versions exist:
|
|||||||
1.6: Introduced with OpenRocket 13.04. Added component Appearances (decals & paint)
|
1.6: Introduced with OpenRocket 13.04. Added component Appearances (decals & paint)
|
||||||
Added configurable parameters to recovery devices, motor ignition and separation.
|
Added configurable parameters to recovery devices, motor ignition and separation.
|
||||||
|
|
||||||
|
1.7: Introduces with OpenRocket >14.11. Added simulation extensions and related
|
||||||
|
configuration.
|
||||||
|
|
||||||
@ -219,6 +219,9 @@ public class OpenRocketSaver extends RocketSaver {
|
|||||||
*/
|
*/
|
||||||
private int calculateNecessaryFileVersion(OpenRocketDocument document, StorageOptions opts) {
|
private int calculateNecessaryFileVersion(OpenRocketDocument document, StorageOptions opts) {
|
||||||
/*
|
/*
|
||||||
|
* File version 1.7 is required for:
|
||||||
|
* - simulation extensions
|
||||||
|
*
|
||||||
* File version 1.6 is required for:
|
* File version 1.6 is required for:
|
||||||
* - saving files using appearances and textures, flight configurations.
|
* - saving files using appearances and textures, flight configurations.
|
||||||
*
|
*
|
||||||
@ -238,6 +241,16 @@ public class OpenRocketSaver extends RocketSaver {
|
|||||||
* Otherwise use version 1.0.
|
* Otherwise use version 1.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/////////////////
|
||||||
|
// Version 1.7 //
|
||||||
|
/////////////////
|
||||||
|
for (Simulation sim : document.getSimulations()) {
|
||||||
|
if (!sim.getSimulationExtensions().isEmpty()) {
|
||||||
|
return FILE_VERSION_DIVISOR + 7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/////////////////
|
/////////////////
|
||||||
// Version 1.6 //
|
// Version 1.6 //
|
||||||
/////////////////
|
/////////////////
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user