mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
ref: name in libworld.cpp & docs
This commit is contained in:
parent
a1283d7f7b
commit
75344023d8
3 changed files with 14 additions and 15 deletions
|
|
@ -54,13 +54,13 @@ static int l_world_set_day_time(lua::State* L) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int l_wolrd_set_vel_time(lua::State* L) {
|
||||
static int l_world_set_day_time_speed(lua::State* L) {
|
||||
auto value = lua::tonumber(L, 1);
|
||||
level->getWorld()->daytimeSpeed = std::abs(value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int l_wolrd_get_vel_time(lua::State* L) {
|
||||
static int l_world_get_day_time_speed(lua::State* L) {
|
||||
return lua::pushnumber(L, level->getWorld()->daytimeSpeed);
|
||||
}
|
||||
|
||||
|
|
@ -89,8 +89,8 @@ const luaL_Reg worldlib [] = {
|
|||
{"get_total_time", lua::wrap<l_world_get_total_time>},
|
||||
{"get_day_time", lua::wrap<l_world_get_day_time>},
|
||||
{"set_day_time", lua::wrap<l_world_set_day_time>},
|
||||
{"set_vel_time", lua::wrap<l_wolrd_set_vel_time>},
|
||||
{"get_vel_time", lua::wrap<l_wolrd_get_vel_time>},
|
||||
{"set_day_time_speed", lua::wrap<l_world_set_day_time_speed>},
|
||||
{"get_day_time_speed", lua::wrap<l_world_get_day_time_speed>},
|
||||
{"get_seed", lua::wrap<l_world_get_seed>},
|
||||
{"is_day", lua::wrap<l_world_is_day>},
|
||||
{"is_night", lua::wrap<l_world_is_night>},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue