mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
cleanup ContentControl
This commit is contained in:
parent
f99d909f34
commit
3486cbd4c9
10 changed files with 59 additions and 114 deletions
|
|
@ -324,12 +324,10 @@ void EngineController::reconfigPacks(
|
|||
}
|
||||
}
|
||||
|
||||
runnable removeFunc = [this, controller, packsToAdd, packsToRemove]() {
|
||||
runnable removeFunc = [this, controller, packsToAdd, packsToRemove, &contentControl]() {
|
||||
auto& manager = contentControl.scan();
|
||||
if (controller == nullptr) {
|
||||
try {
|
||||
PacksManager manager;
|
||||
manager.setSources(engine.getContentControl().getDefaultSources());
|
||||
manager.scan();
|
||||
auto names = PacksManager::getNames(
|
||||
engine.getContentControl().getContentPacks()
|
||||
);
|
||||
|
|
@ -352,10 +350,6 @@ void EngineController::reconfigPacks(
|
|||
auto& wfile = *world->wfile;
|
||||
controller->saveWorld();
|
||||
|
||||
PacksManager manager;
|
||||
manager.setSources(engine.getContentControl().getDefaultSources());
|
||||
manager.scan();
|
||||
|
||||
auto names = PacksManager::getNames(world->getPacks());
|
||||
for (const auto& id : packsToAdd) {
|
||||
names.push_back(id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue