76 std::vector<const PrefabBlueprint*>
FindByType(
const std::string& type)
const;
138 std::string
GetFilename(
const std::string& filepath);
140 std::string
ToUpper(
const std::string&
str)
const;
ComponentTypeID GetComponentTypeID_Static()
const PrefabBlueprint * Find(const std::string &name) const
std::map< std::string, std::string > m_typeToName
std::vector< const PrefabBlueprint * > FindByType(const std::string &type) const
std::vector< std::string > GetAllPrefabNames() const
void Register(const PrefabBlueprint &blueprint)
std::map< std::string, PrefabBlueprint > m_blueprints
std::string NormalizeType(const std::string &type) const
Normalize a type string to canonical form.
PrefabBlueprint ParsePrefab(const std::string &filepath)
std::vector< PrefabBlueprint > ScanDirectory(const std::string &rootPath)
std::map< std::string, std::string > m_synonymToCanonical
std::string DetectComponentType(const std::string &typeName)
std::string ToUpper(const std::string &str) const
std::string ExtractPrefabType(const nlohmann::json &prefabJson)
bool LoadSynonymRegistry(const std::string &directory)
bool GetCanonicalInfo(const std::string &type, std::string &outCanonical, std::string &outPrefabFile) const
Get canonical type info (for debugging)
std::map< std::string, std::vector< std::string > > m_categoryToTypes
PrefabRegistry Initialize(const std::string &prefabDirectory="Gamedata/EntityPrefab")
Initialize the prefab system (call once at startup)
bool IsTypeRegistered(const std::string &type) const
Check if a type is registered.
void ExtractResources(const nlohmann::json &componentsJson, ResourceRefs &outResources)
bool AreTypesEquivalent(const std::string &type1, const std::string &type2) const
Check if two types are equivalent.
bool m_enableFuzzyMatching
std::string RemoveExtension(const std::string &filename)
std::string GetFilename(const std::string &filepath)
float FuzzyMatch(const std::string &str1, const std::string &str2) const
void ScanDirectoryRecursive_Unix(const std::string &path, std::vector< std::string > &outFiles)
std::map< std::string, SynonymInfo > m_canonicalTypes
std::vector< std::string > errors
void AddCategory(const std::string &category)
std::vector< ComponentDefinition > components
bool HasCategory(const std::string &category) const
std::vector< std::string > categories
std::vector< std::string > audioRefs
std::vector< std::string > modelRefs
std::vector< std::string > spriteRefs
std::string canonicalType
std::vector< std::string > synonyms