mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add Schedule class & add time.schedule.world schedule group
This commit is contained in:
parent
cd2bc8fbf6
commit
b28aa71845
3 changed files with 73 additions and 0 deletions
|
|
@ -299,6 +299,9 @@ void scripting::on_world_load(LevelController* controller) {
|
|||
|
||||
void scripting::on_world_tick() {
|
||||
auto L = lua::get_main_state();
|
||||
if (lua::getglobal(L, "__vc_on_world_tick")) {
|
||||
lua::call_nothrow(L, 0, 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