1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Sky API: Rename *_tint to fog_*_tint for consistency

This commit is contained in:
SmallJoker 2020-05-04 20:19:12 +02:00 committed by Loïc Blot
parent 1b6f40c356
commit cad5b987ad
8 changed files with 38 additions and 38 deletions

View file

@ -1782,19 +1782,19 @@ int ObjectRef::l_set_sky(lua_State *L)
lua_pop(L, 1);
// Prevent flickering clouds at dawn/dusk:
skybox_params.sun_tint = video::SColor(255, 255, 255, 255);
skybox_params.fog_sun_tint = video::SColor(255, 255, 255, 255);
lua_getfield(L, -1, "fog_sun_tint");
read_color(L, -1, &skybox_params.sun_tint);
read_color(L, -1, &skybox_params.fog_sun_tint);
lua_pop(L, 1);
skybox_params.moon_tint = video::SColor(255, 255, 255, 255);
skybox_params.fog_moon_tint = video::SColor(255, 255, 255, 255);
lua_getfield(L, -1, "fog_moon_tint");
read_color(L, -1, &skybox_params.moon_tint);
read_color(L, -1, &skybox_params.fog_moon_tint);
lua_pop(L, 1);
lua_getfield(L, -1, "fog_tint_type");
if (!lua_isnil(L, -1))
skybox_params.tint_type = luaL_checkstring(L, -1);
skybox_params.fog_tint_type = luaL_checkstring(L, -1);
lua_pop(L, 1);
// Because we need to leave the "sky_color" table.
@ -1912,12 +1912,12 @@ int ObjectRef::l_get_sky_color(lua_State *L)
push_ARGB8(L, skybox_params.sky_color.indoors);
lua_setfield(L, -2, "indoors");
}
push_ARGB8(L, skybox_params.sun_tint);
lua_setfield(L, -2, "sun_tint");
push_ARGB8(L, skybox_params.moon_tint);
lua_setfield(L, -2, "moon_tint");
lua_pushstring(L, skybox_params.tint_type.c_str());
lua_setfield(L, -2, "tint_type");
push_ARGB8(L, skybox_params.fog_sun_tint);
lua_setfield(L, -2, "fog_sun_tint");
push_ARGB8(L, skybox_params.fog_moon_tint);
lua_setfield(L, -2, "fog_moon_tint");
lua_pushstring(L, skybox_params.fog_tint_type.c_str());
lua_setfield(L, -2, "fog_tint_type");
return 1;
}