Started migration to TypeScript

This commit is contained in:
Pax1601
2023-01-08 10:05:10 +01:00
parent 036f70db34
commit ca6b66eb33
55 changed files with 1429 additions and 662 deletions

View File

@@ -6,6 +6,6 @@ void DllExport LogInfo(lua_State* L, string message);
void DllExport LogWarning(lua_State* L, string message);
void DllExport LogError(lua_State* L, string message);
void DllExport Log(lua_State* L, string message, int level);
int DllExport dostring_in(lua_State* L, string target, string command);
map<int, json::value> DllExport getAllUnits(lua_State* L);

View File

@@ -92,4 +92,14 @@ map<int, json::value> getAllUnits(lua_State* L)
exit:
STACK_CLEAN;
return units;
}
int dostring_in(lua_State* L, string target, string command)
{
lua_getglobal(L, "net");
lua_getfield(L, -1, "dostring_in");
lua_pushstring(L, target.c_str());
lua_pushstring(L, command.c_str());
return lua_pcall(L, 2, 0, 0);
}