mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 05:51:51 +00:00
update generators scanning
This commit is contained in:
parent
39030efd74
commit
c46090f881
14 changed files with 46 additions and 9 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include "typedefs.hpp"
|
||||
#include "content_fwd.hpp"
|
||||
|
||||
class EnginePaths;
|
||||
|
||||
|
|
@ -51,6 +52,7 @@ struct ContentPack {
|
|||
static inline const fs::path BLOCKS_FOLDER = "blocks";
|
||||
static inline const fs::path ITEMS_FOLDER = "items";
|
||||
static inline const fs::path ENTITIES_FOLDER = "entities";
|
||||
static inline const fs::path GENERATORS_FOLDER = "generators";
|
||||
static const std::vector<std::string> RESERVED_NAMES;
|
||||
|
||||
static bool is_pack(const fs::path& folder);
|
||||
|
|
@ -69,6 +71,16 @@ struct ContentPack {
|
|||
);
|
||||
|
||||
static ContentPack createCore(const EnginePaths*);
|
||||
|
||||
static inline fs::path getFolderFor(ContentType type) {
|
||||
switch (type) {
|
||||
case ContentType::BLOCK: return ContentPack::BLOCKS_FOLDER;
|
||||
case ContentType::ITEM: return ContentPack::ITEMS_FOLDER;
|
||||
case ContentType::ENTITY: return ContentPack::ENTITIES_FOLDER;
|
||||
case ContentType::GENERATOR: return ContentPack::GENERATORS_FOLDER;
|
||||
case ContentType::NONE: return fs::u8path("");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
struct ContentPackStats {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue