mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 13:31:49 +00:00
contentpack remove feature WIP
This commit is contained in:
parent
a1f313bedc
commit
3862dbda66
18 changed files with 541 additions and 433 deletions
|
|
@ -77,15 +77,33 @@ struct ContentPack {
|
|||
);
|
||||
};
|
||||
|
||||
struct ContentPackStats {
|
||||
size_t totalBlocks;
|
||||
size_t totalItems;
|
||||
|
||||
inline bool hasSavingContent() const {
|
||||
return totalBlocks + totalItems > 0;
|
||||
}
|
||||
};
|
||||
|
||||
class ContentPackRuntime {
|
||||
ContentPack info;
|
||||
ContentPackStats stats {};
|
||||
std::unique_ptr<scripting::Environment> env;
|
||||
public:
|
||||
ContentPackRuntime(
|
||||
ContentPack info,
|
||||
ContentPack info,
|
||||
std::unique_ptr<scripting::Environment> env
|
||||
);
|
||||
|
||||
inline const ContentPackStats& getStats() const {
|
||||
return stats;
|
||||
}
|
||||
|
||||
inline ContentPackStats& getStatsWriteable() {
|
||||
return stats;
|
||||
}
|
||||
|
||||
inline const std::string& getId() {
|
||||
return info.id;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue