feat: make Decorator listen to block interactions

This commit is contained in:
MihailRis
2024-11-05 03:46:41 +03:00
parent f5bc6fc136
commit 77ae35e364
5 changed files with 36 additions and 21 deletions
+3 -2
View File
@@ -46,8 +46,9 @@ LevelScreen::LevelScreen(Engine* engine, std::unique_ptr<Level> levelPtr)
worldRenderer = std::make_unique<WorldRenderer>(engine, frontend.get(), controller->getPlayer());
hud = std::make_unique<Hud>(engine, frontend.get(), controller->getPlayer());
decorator =
std::make_unique<Decorator>(*level, *worldRenderer->particles, *assets);
decorator = std::make_unique<Decorator>(
*controller, *worldRenderer->particles, *assets
);
keepAlive(settings.graphics.backlight.observe([=](bool) {
controller->getLevel()->chunks->saveAndClear();