small fixes

This commit is contained in:
MihailRis 2024-01-15 14:32:18 +03:00
parent 1e12f80dd6
commit ca40b93344
4 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"id": "base",
"title": "Base",
"version": "0.16",
"version": "0.18",
"description": "basic content package"
}

View File

@ -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;

View File

@ -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);
}
}

View File

@ -1,12 +1,12 @@
#ifndef SRC_CORE_DEFS_H_
#define SRC_CORE_DEFS_H_
/* blocks and bindings used in engine code */
#include <string>
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";