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

Fix type checks

This commit is contained in:
MirceaKitsune 2025-04-23 23:58:36 +03:00
parent de5328c851
commit fcd65f0b99
4 changed files with 9 additions and 8 deletions

View file

@ -2141,7 +2141,8 @@ int ObjectRef::l_set_sky(lua_State *L)
// Preserve old behavior of the sun, moon and stars
// when using the old set_sky call.
if (sky_params.type == "regular" || sky_params.type == "skybox") {
if (sky_params.type == "regular" ||
sky_params.type == "skybox_back" || sky_params.type == "skybox_front") {
sun_params.visible = true;
sun_params.sunrise_visible = true;
moon_params.visible = true;
@ -2182,7 +2183,7 @@ int ObjectRef::l_set_sky(lua_State *L)
static void push_sky_color(lua_State *L, const SkyboxParams &params)
{
lua_newtable(L);
if (params.type == "regular" || params.type == "skybox" ||
if (params.type == "regular" ||
params.type == "skybox_back" || params.type == "skybox_front") {
push_ARGB8(L, params.sky_color.day_sky);
lua_setfield(L, -2, "day_sky");