add app.reset_content 'non_reset_packs' optional argument

This commit is contained in:
MihailRis
2025-11-09 23:04:50 +03:00
parent 50d520e747
commit 0e6fb878bf
9 changed files with 51 additions and 14 deletions
+2 -4
View File
@@ -49,10 +49,10 @@ std::vector<std::string>& ContentControl::getBasePacks() {
return basePacks;
}
void ContentControl::resetContent() {
void ContentControl::resetContent(const std::vector<std::string>& nonReset) {
paths.setCurrentWorldFolder("");
scripting::cleanup();
scripting::cleanup(nonReset);
std::vector<PathsRoot> resRoots;
{
auto pack = ContentPack::createCore();
@@ -79,8 +79,6 @@ void ContentControl::loadContent(const std::vector<std::string>& names) {
}
void ContentControl::loadContent() {
scripting::cleanup();
std::vector<std::string> names;
for (auto& pack : contentPacks) {
names.push_back(pack.id);