#include "U_ScriptingStates.h" #include "CEngine.h" #include "CScriptingManager.h" sol::state& ScriptStates::GetStateReference(lua_State* state) { return CEngine::GetInstance()->Components.GetComponentTyped()->GetStateReference(state); } std::shared_ptr ScriptStates::GetStateSharedPtr(lua_State* state) { return CEngine::GetInstance()->Components.GetComponentTyped()->GetStateSharedPtr(state); } bool ScriptStates::IsTypeRegistered(lua_State* state, size_t hash) { return CEngine::GetInstance()->Components.GetComponentTyped()->GetEngine(state)->IsTypeRegistered(hash); } bool ScriptStates::IsTypeRegistered(lua_State* state, const std::string& _name) { return CEngine::GetInstance()->Components.GetComponentTyped()->GetEngine(state)->IsTypeRegistered(_name); } void ScriptStates::RegisterType(lua_State* state, const std::string& _name, size_t hash) { Log::Instance() << "Registered lua usertype " << _name << Log::Endl; return CEngine::GetInstance()->Components.GetComponentTyped()->GetEngine(state)->RegisterType(_name, hash); }