mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
lua console library
This commit is contained in:
parent
9dc3c40b69
commit
c2ea0d5326
12 changed files with 156 additions and 34 deletions
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "lua_commons.hpp"
|
||||
|
||||
#include "../scripting_functional.hpp"
|
||||
#include "../../../data/dynamic.hpp"
|
||||
#include "../../../delegates.hpp"
|
||||
|
||||
|
|
@ -26,6 +27,8 @@ namespace lua {
|
|||
void logError(const std::string& text);
|
||||
void removeLibFuncs(const char* libname, const char* funcs[]);
|
||||
void createLibs();
|
||||
|
||||
std::shared_ptr<std::string> createLambdaHandler();
|
||||
public:
|
||||
LuaState();
|
||||
~LuaState();
|
||||
|
|
@ -60,7 +63,7 @@ namespace lua {
|
|||
int callNoThrow(int argc);
|
||||
int execute(int env, const std::string& src, const std::string& file="<string>");
|
||||
int eval(int env, const std::string& src, const std::string& file="<eval>");
|
||||
void openlib(const std::string& name, const luaL_Reg* libfuncs, int nup);
|
||||
void openlib(const std::string& name, const luaL_Reg* libfuncs);
|
||||
void addfunc(const std::string& name, lua_CFunction func);
|
||||
bool getglobal(const std::string& name);
|
||||
void setglobal(const std::string& name);
|
||||
|
|
@ -68,6 +71,8 @@ namespace lua {
|
|||
bool rename(const std::string& from, const std::string& to);
|
||||
void remove(const std::string& name);;
|
||||
runnable createRunnable();
|
||||
scripting::common_func createLambda();
|
||||
|
||||
int createEnvironment(int parent);
|
||||
void removeEnvironment(int id);
|
||||
const std::string storeAnonymous();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue