Open Zbizu opened 3 years ago
I prefer like in otclient, just 'redirection' to c++ functions of given class
I prefer like in otclient, just 'redirection' to c++ functions of given class
different kinda of lua bridge tho.
Isn't a bad idea imo, but it will increase compilation time significantly
luascript.cpp is too long and is causing some (CI?) tools to fail
Which ones fail now?
https://github.com/otland/forgottenserver/issues/2169
I had this in mind. Feel free to close if you consider it resolved.
Maybe we should keep the discussion in the #2169, since they both bring up ways to do so.
Since now we don't have an active issue with the length of that file, current CI works fine (and we stopped using Travis CI), I don't think it's very high priority. There are many changes/rewrites of things in-flight as-is :)
This doesn't quite fit to any of the issue templates so I'll try to improvise.
The problem
luascript.cpp is too long and is causing some (CI?) tools to fail
Suggested solution
keeping lines such as this one:
registerClass("Creature", "", LuaScriptInterface::luaCreatureCreate);
to maintain the self-documenting style of codemove functions such as this one:
static int luaCreatureCreate(lua_State* L);
to a new file in a separate directory to reduceluascript.cpp
sizeExample for Creature class
in luascript.cpp:
#include luascript/creature.h
and the creature cpp/h would be located in: