| 1683 | } |
| 1684 | |
| 1685 | resource::GuidResourceBankBase* EntitySystemHelpersBase::GetRawResourceManager(ExtResourceManagerType type) |
| 1686 | { |
| 1687 | auto index = staticDataIndices_[(unsigned)type]; |
| 1688 | if (index == resource::UndefinedStaticDataType || (unsigned)type >= std::size(staticDataIndices_)) { |
| 1689 | OsiError("No resource manager index mapping registered for " << type); |
| 1690 | return {}; |
| 1691 | } |
| 1692 | |
| 1693 | auto defns = GetStaticSymbols().eoc__gGuidResourceManager; |
| 1694 | if (!defns || !*defns) { |
| 1695 | OsiError("Resource definition manager not available yet!"); |
| 1696 | return {}; |
| 1697 | } |
| 1698 | |
| 1699 | auto res = (*defns)->Definitions.try_get(index); |
| 1700 | if (!res) { |
| 1701 | OsiError("Resource manager missing for " << type); |
| 1702 | return {}; |
| 1703 | } |
| 1704 | |
| 1705 | return *res; |
| 1706 | } |
| 1707 | |
| 1708 | bool EntitySystemHelpersBase::SetSystemUpdateHook(SystemTypeIndex systemType, std::function<SystemHookProc> preUpdate, std::function<SystemHookProc> postUpdate) |
| 1709 | { |