change: skeletons are assets now, not content units

This commit is contained in:
MihailRis 2026-01-16 00:34:20 +03:00
parent 587c140a6b
commit 42c4716be2
17 changed files with 144 additions and 120 deletions

View file

@ -20,10 +20,6 @@ struct ItemDef;
struct EntityDef;
struct GeneratorDef;
namespace rigging {
class SkeletonConfig;
}
class namereuse_error : public std::runtime_error {
ContentType type;
public:
@ -183,7 +179,6 @@ class Content {
std::unique_ptr<ContentIndices> indices;
UptrsMap<std::string, ContentPackRuntime> packs;
UptrsMap<std::string, BlockMaterial> blockMaterials;
UptrsMap<std::string, rigging::SkeletonConfig> skeletons;
dv::value defaults = nullptr;
std::unordered_map<std::string, int> tags;
public:
@ -203,7 +198,6 @@ public:
ContentUnitDefs<GeneratorDef> generators,
UptrsMap<std::string, ContentPackRuntime> packs,
UptrsMap<std::string, BlockMaterial> blockMaterials,
UptrsMap<std::string, rigging::SkeletonConfig> skeletons,
ResourceIndicesSet resourceIndices,
dv::value defaults,
std::unordered_map<std::string, int> tags
@ -230,13 +224,10 @@ public:
return found->second;
}
const rigging::SkeletonConfig* getSkeleton(const std::string& id) const;
const rigging::SkeletonConfig& requireSkeleton(const std::string& id) const;
const BlockMaterial* findBlockMaterial(const std::string& id) const;
const ContentPackRuntime* getPackRuntime(const std::string& id) const;
ContentPackRuntime* getPackRuntime(const std::string& id);
const UptrsMap<std::string, BlockMaterial>& getBlockMaterials() const;
const UptrsMap<std::string, ContentPackRuntime>& getPacks() const;
const UptrsMap<std::string, rigging::SkeletonConfig>& getSkeletons() const;
};