diff --git a/src/frontend/screens.cpp b/src/frontend/screens.cpp index 5de28c4a..6419efc8 100644 --- a/src/frontend/screens.cpp +++ b/src/frontend/screens.cpp @@ -32,6 +32,9 @@ #include "gui/panels.h" #include "menu.h" +#include "../content/Content.h" +#include "../voxels/Block.h" + using std::string; using std::wstring; using glm::vec3; @@ -125,6 +128,23 @@ void LevelScreen::updateHotkeys() { if (Events::jpressed(keycode::F5)) { level->chunks->saveAndClear(); } + + // TODO: remove in v0.16 + if (Events::jpressed(keycode::F9)) { + blockid_t woodid = level->content->require("base:wood")->rt.id; + for (size_t i = 0; i < level->chunks->volume; i++){ + Chunk* chunk = level->chunks->chunks[i].get(); + if (chunk) { + for (uint i = 0; i < CHUNK_VOL; i++) { + auto& vox = chunk->voxels[i]; + if (vox.id == woodid) { + vox.states = BLOCK_DIR_UP; + } + } + } + } + level->chunks->saveAndClear(); + } } void LevelScreen::update(float delta) {