mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-20 22:33:16 -04:00
Air Shield gives off light and can be walked through. Use for doors, etc. Time changed from 4500 to 0.1875, which is the same but more compatible with dev builds.
30 lines
778 B
Lua
30 lines
778 B
Lua
|
|
-- Set time to midnight.
|
|
minetest.register_on_joinplayer(function(player)
|
|
minetest.set_timeofday(0.1875)
|
|
minetest.setting_set("time_speed", 0)
|
|
end)
|
|
|
|
-- Disable clouds and enable them again when player leaves the game. (Experimental)
|
|
minetest.register_on_joinplayer(function(player)
|
|
minetest.setting_set("enable_clouds", 0)
|
|
end)
|
|
minetest.register_on_leaveplayer(function(player)
|
|
minetest.setting_set("enable_clouds", 1)
|
|
end)
|
|
|
|
-- Sky textures
|
|
minetest.register_on_joinplayer(function(player)
|
|
minetest.after(0, function()
|
|
skytextures ={
|
|
"sky_pos_y.png",
|
|
"sky_neg_y.png",
|
|
"sky_pos_z.png",
|
|
"sky_neg_z.png",
|
|
"sky_neg_x.png",
|
|
"sky_pos_x.png",
|
|
}
|
|
|
|
player:set_sky({r=0, g=0, b=0, a=0},"skybox", skytextures)
|
|
end)
|
|
end)
|