MCPcopy Create free account
hub / github.com/Norbyte/bg3se / GetComponentIndex

Method GetComponentIndex

BG3Extender/GameDefinitions/EntitySystem.cpp:754–762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

752{}
753
754std::optional<ComponentTypeIndex> EntitySystemHelpersBase::GetComponentIndex(ExtComponentType type) const
755{
756 auto idx = components_[(unsigned)type].ComponentIndex;
757 if (idx != UndefinedComponent && GetEntityWorld()->ComponentOps.Get(idx) != nullptr) {
758 return idx;
759 } else {
760 return {};
761 }
762}
763
764STDString SimplifyComponentName(StringView name)
765{

Callers 2

GetRawSingletonMethod · 0.45

Calls 2

GetEntityWorldFunction · 0.85
GetMethod · 0.45

Tested by

no test coverage detected