contentpack remove feature WIP

This commit is contained in:
MihailRis
2024-02-29 23:47:07 +03:00
parent a1f313bedc
commit 3862dbda66
18 changed files with 541 additions and 433 deletions
+19 -1
View File
@@ -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;
}