mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 12:01:50 +00:00
add app.reset_content 'non_reset_packs' optional argument
This commit is contained in:
parent
50d520e747
commit
0e6fb878bf
9 changed files with 51 additions and 14 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public:
|
|||
std::vector<std::string>& getBasePacks();
|
||||
|
||||
/// @brief Reset content to base packs list
|
||||
void resetContent();
|
||||
void resetContent(const std::vector<std::string>& nonReset);
|
||||
|
||||
void loadContent(const std::vector<std::string>& names);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue