mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
contentpack removal feature + refactor
This commit is contained in:
parent
3f0c710a47
commit
daaba374a3
24 changed files with 345 additions and 295 deletions
|
|
@ -1,10 +1,13 @@
|
|||
#include "LevelController.h"
|
||||
#include "../world/Level.h"
|
||||
#include "../world/World.h"
|
||||
#include "../physics/Hitbox.h"
|
||||
|
||||
#include "scripting/scripting.h"
|
||||
#include "../interfaces/Object.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
LevelController::LevelController(EngineSettings& settings, Level* level)
|
||||
: settings(settings), level(level),
|
||||
blocks(std::make_unique<BlocksController>(level, settings.chunks.padding)),
|
||||
|
|
@ -42,8 +45,10 @@ void LevelController::update(float delta, bool input, bool pause) {
|
|||
}
|
||||
}
|
||||
|
||||
void LevelController::onWorldSave() {
|
||||
void LevelController::saveWorld() {
|
||||
std::cout << "-- writing world" << std::endl;
|
||||
scripting::on_world_save();
|
||||
level->getWorld()->write(level.get());
|
||||
}
|
||||
|
||||
void LevelController::onWorldQuit() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue