mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-21 09:59:44 +00:00
add 'tps' argument to on_world_tick event
This commit is contained in:
parent
4354896008
commit
6ab161a518
1 changed files with 3 additions and 1 deletions
|
|
@ -345,7 +345,9 @@ void scripting::on_world_tick(int tps) {
|
|||
lua::pop(L);
|
||||
}
|
||||
for (auto& pack : content_control->getAllContentPacks()) {
|
||||
lua::emit_event(L, pack.id + ":.worldtick");
|
||||
lua::emit_event(L, pack.id + ":.worldtick", [tps](lua::State* L) {
|
||||
return lua::pushinteger(L, tps);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue