Merge pull request #34020 from gytsen/unify-pack-version

PCK: Set VERSION_PATCH in header, factor out header magic
This commit is contained in:
Rémi Verschelde
2020-01-06 14:04:55 +01:00
committed by GitHub
10 changed files with 38 additions and 39 deletions

View File

@ -39,7 +39,7 @@
#include "scene/gui/control.h"
#include "scene/main/instance_placeholder.h"
#define PACK_VERSION 2
#define PACKED_SCENE_VERSION 2
bool SceneState::can_instance() const {
@ -1095,7 +1095,7 @@ void SceneState::set_bundled_scene(const Dictionary &p_dictionary) {
if (p_dictionary.has("version"))
version = p_dictionary["version"];
ERR_FAIL_COND_MSG(version > PACK_VERSION, "Save format version too new.");
ERR_FAIL_COND_MSG(version > PACKED_SCENE_VERSION, "Save format version too new.");
const int node_count = p_dictionary["node_count"];
const PoolVector<int> snodes = p_dictionary["nodes"];
@ -1285,9 +1285,7 @@ Dictionary SceneState::get_bundled_scene() const {
d["base_scene"] = base_scene_idx;
}
d["version"] = PACK_VERSION;
//d["path"]=path;
d["version"] = PACKED_SCENE_VERSION;
return d;
}