add 'tps' argument to on_world_tick event

This commit is contained in:
MihailRis 2026-10-15 21:28:38 +03:00
parent 4354896008
commit 6ab161a518

View file

@ -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);
});
}
}