Scripting WIP (#70)

* Scripting introduced

* AppImage workflow fixes

* AppImage workflow simplified

* README.md update

* README.md update

* small fix
This commit is contained in:
MihailRis
2023-12-25 05:26:03 +03:00
committed by GitHub
parent ce26f0c227
commit acce49f188
35 changed files with 649 additions and 138 deletions
+8 -1
View File
@@ -90,6 +90,13 @@ const AABB* Chunks::isObstacle(float x, float y, float z){
return nullptr;
}
bool Chunks::isSolid(int x, int y, int z) {
voxel* v = get(x, y, z);
if (v == nullptr)
return false;
return contentIds->getBlockDef(v->id)->rt.solid;
}
ubyte Chunks::getLight(int x, int y, int z, int channel){
x -= ox * CHUNK_W;
z -= oz * CHUNK_D;
@@ -167,7 +174,7 @@ void Chunks::set(int x, int y, int z, int id, uint8_t states){
else if (y + 1 > chunk->top) chunk->top = y + 1;
else if (id == 0) chunk->updateHeights();
if (lx == 0 && (chunk = getChunk(cx+ox-1, cz+oz)))
if (lx == 0 && (chunk = getChunk(cx+ox-1, cz+oz)))
chunk->setModified(true);
if (lz == 0 && (chunk = getChunk(cx+ox, cz+oz-1)))
chunk->setModified(true);