feat: nameless worlds
This commit is contained in:
+6
-1
@@ -94,7 +94,12 @@ std::unique_ptr<Level> World::create(
|
||||
content,
|
||||
packs
|
||||
);
|
||||
logger.info() << "created world '" << name << "' (" << directory.u8string() << ")";
|
||||
if (name.empty()) {
|
||||
logger.info() << "created nameless world";
|
||||
} else {
|
||||
logger.info() << "created world '" << name << "' ("
|
||||
<< directory.u8string() << ")";
|
||||
}
|
||||
logger.info() << "world seed: " << seed << " generator: " << generator;
|
||||
return std::make_unique<Level>(std::move(world), content, settings);
|
||||
}
|
||||
|
||||
@@ -140,6 +140,10 @@ public:
|
||||
/// @brief Get world generator id
|
||||
std::string getGenerator() const;
|
||||
|
||||
bool isNameless() const {
|
||||
return info.name.empty();
|
||||
}
|
||||
|
||||
WorldInfo& getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user