mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-11-24 02:08:34 +00:00
Initial work on LUA scripting.
This LUA scripting implementation uses the sol header only C++ wrapper for the native LUA libraries. The API does not follow the original LU scripting. Each instance of a script is in its own LUA-State, and has 'self' as a global. There are hooks to all the implemented CppScript methods, as well as a subset of the entity functionallity. Has to be expanded upon. This is local work which has been sitting for awhile; thought someone might like to take a look at it.
This commit is contained in:
@@ -812,6 +812,10 @@ CppScripts::Script* CppScripts::GetScript(Entity* parent, const std::string& scr
|
||||
return script;
|
||||
}
|
||||
|
||||
CppScripts::Script* CppScripts::GetInvalidScript() {
|
||||
return invalidToReturn;
|
||||
}
|
||||
|
||||
std::vector<CppScripts::Script*> CppScripts::GetEntityScripts(Entity* entity) {
|
||||
std::vector<CppScripts::Script*> scripts;
|
||||
std::vector<ScriptComponent*> comps = entity->GetScriptComponents();
|
||||
|
||||
Reference in New Issue
Block a user