mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 12:01:50 +00:00
move block ticks register to separate script
This commit is contained in:
parent
9653b18143
commit
473f9f1a6a
6 changed files with 109 additions and 92 deletions
|
|
@ -730,7 +730,7 @@ static int l_pull_register_events(lua::State* L) {
|
|||
lua::createtable(L, events.size() * 4, 0);
|
||||
for (int i = 0; i < events.size(); i++) {
|
||||
const auto& event = events[i];
|
||||
lua::pushinteger(L, static_cast<int>(event.type) | event.id << 16);
|
||||
lua::pushinteger(L, static_cast<int>(event.bits) | event.id << 16);
|
||||
lua::rawseti(L, i * 4 + 1);
|
||||
|
||||
for (int j = 0; j < 3; j++) {
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ void scripting::initialize(Engine* engine) {
|
|||
|
||||
load_script(io::path("stdlib.lua"), true);
|
||||
load_script(io::path("classes.lua"), true);
|
||||
load_script(io::path("internal_events.lua"), true);
|
||||
}
|
||||
|
||||
class LuaCoroutine : public Process {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue