mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
minor refactor
This commit is contained in:
parent
2c60e7c6ae
commit
9e8acac783
4 changed files with 8 additions and 7 deletions
|
|
@ -297,10 +297,11 @@ void scripting::on_world_load(LevelController* controller) {
|
|||
}
|
||||
}
|
||||
|
||||
void scripting::on_world_tick() {
|
||||
void scripting::on_world_tick(int tps) {
|
||||
auto L = lua::get_main_state();
|
||||
if (lua::getglobal(L, "__vc_on_world_tick")) {
|
||||
lua::call_nothrow(L, 0, 0);
|
||||
lua::pushinteger(L, tps);
|
||||
lua::call_nothrow(L, 1, 0);
|
||||
}
|
||||
for (auto& pack : content_control->getAllContentPacks()) {
|
||||
lua::emit_event(L, pack.id + ":.worldtick");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue