diff --git a/res/content/base/package.json b/res/content/base/package.json index a9f081fa..bd8c1c2a 100644 --- a/res/content/base/package.json +++ b/res/content/base/package.json @@ -1,6 +1,6 @@ { "id": "base", "title": "Base", - "version": "0.16", + "version": "0.18", "description": "basic content package" } diff --git a/src/constants.h b/src/constants.h index 1c4eecfd..dd5e56e0 100644 --- a/src/constants.h +++ b/src/constants.h @@ -7,6 +7,9 @@ const int ENGINE_VERSION_MAJOR = 0; const int ENGINE_VERSION_MINOR = 18; +const int BLOCK_AIR = 0; +const int ITEM_EMPTY = 0; + const int CHUNK_W = 16; const int CHUNK_H = 256; const int CHUNK_D = 16; diff --git a/src/content/Content.cpp b/src/content/Content.cpp index ca2ce3cf..d808e48b 100644 --- a/src/content/Content.cpp +++ b/src/content/Content.cpp @@ -48,7 +48,7 @@ ItemDef* ContentBuilder::createItem(std::string id) { void ContentBuilder::checkIdentifier(std::string id) { contenttype result; - if ((checkContentType(id) != contenttype::none)) { + if (((result = checkContentType(id)) != contenttype::none)) { throw namereuse_error("name "+id+" is already used", result); } } diff --git a/src/core_defs.h b/src/core_defs.h index 78aea0ef..5cdfbf2b 100644 --- a/src/core_defs.h +++ b/src/core_defs.h @@ -1,12 +1,12 @@ #ifndef SRC_CORE_DEFS_H_ #define SRC_CORE_DEFS_H_ -/* blocks and bindings used in engine code */ +#include -const int BLOCK_AIR = 0; const std::string TEXTURE_NOTFOUND = "notfound"; +/* bindings used in engine code */ const std::string BIND_MOVE_FORWARD = "movement.forward"; const std::string BIND_MOVE_BACK = "movement.back"; const std::string BIND_MOVE_LEFT = "movement.left";