Skip to content

Commit

Permalink
Testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelIT7 committed Nov 24, 2023
1 parent 02e5320 commit 51b2ee8
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 6 deletions.
73 changes: 70 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,79 @@
This project aims to add a multithreading library to Gmod.
The Goal is to be able to create a ILuaInterface with all of Gmod's libraries, functions and classes.

NOTE:
This only works on Linux because on Windows creating a ILuaInterface on another thread currently crashes the game.

## What is implemented
- [x] Lua Panics handled
- [x] print should work
- [x] Shared Table

## ToDo/Testing
- [ ] Add all Gmod libraries
- [ ] Better Error handling
- [ ] Created ILuaInterface should load all Gmod scripts/allow one to do so
- [ ] Better Error handling
- [ ] Recreate all Gmod libraries

I listed all Libraries below that are serverside. Regardless if they are implemented in lua or in c++.
- - [ ] Global(functions)
- - [ ] ai
- - [ ] ai_schedule
- - [ ] ai_task
- - [ ] baseclass
- - [x] bit - Implemented by Lua
- - [ ] cleanup
- - [ ] concommand
- - [ ] constraint
- - [ ] construct
- - [ ] cookie
- - [x] coroutine - Implemented by Lua
- - [ ] cvars
- - [ ] debug (Verify)
- - [ ] debugoverlay
- - [ ] drive?
- - [ ] duplicator
- - [ ] effects
- - [ ] engine
- - [ ] ents
- - [ ] file
- - [ ] game
- - [ ] gameevent
- - [ ] gamemode
- - [ ] gmod
- - [ ] gmsave
- - [ ] hammer?
- - [ ] hook
- - [ ] http
- - [ ] jit (Verify)
- - [ ] list
- - [ ] math
- - [ ] motionsensor
- - [ ] navmesh
- - [ ] net
- - [ ] numpad
- - [ ] os (Verify)
- - [ ] package (Verify)
- - [ ] physenv
- - [ ] player
- - [ ] player_manager
- - [ ] properties
- - [ ] resource
- - [ ] saverestore
- - [ ] scripted_ents
- - [ ] sound
- - [ ] sql
- - [ ] string
- - [ ] system
- - [ ] table
- - [ ] team
- - [ ] timer
- - [ ] umsg
- - [ ] undo
- - [ ] usermessage
- - [ ] utf8
- - [ ] util
- - [ ] weapons
- - [ ] widgets
- [ ] Recreate all Gmod metatable functions
- [ ] Cleanup the code
- [ ] Make this compatible for x86-64
- [ ] Look again into Windows
5 changes: 2 additions & 3 deletions source/lua_threaded.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ LUA_FUNCTION_STATIC(newindex)

void RunString(ILuaInterface* LUA, const char* str)
{
LUA->RunStringEx("", "", str, true, true, true, true);
/*int result = func_luaL_loadstring(LUA->GetState(), str);
int result = func_luaL_loadstring(LUA->GetState(), str);
Msg("[Code] %i\n", result);
if (result != 0)
{
Expand All @@ -193,7 +192,7 @@ void RunString(ILuaInterface* LUA, const char* str)
return;
}

LUA->PCall(0, LUA_MULTRET, 0);*/
LUA->PCall(0, LUA_MULTRET, 0);
}

LUA_FUNCTION(ILuaInterface_RunString)
Expand Down

0 comments on commit 51b2ee8

Please sign in to comment.