diff --git a/mods/aftermath/init.lua b/mods/aftermath/init.lua index cb85429..f8688ee 100644 --- a/mods/aftermath/init.lua +++ b/mods/aftermath/init.lua @@ -14,4 +14,4 @@ dofile(path.."/mtvig.lua") dofile(path.."/musicmod.lua") dofile(path.."/nosneak.lua") dofile(path.."/spawn.lua") ---dofile(path.."/sky.lua") \ No newline at end of file +dofile(path.."/sky.lua") \ No newline at end of file diff --git a/mods/aftermath/sky.lua b/mods/aftermath/sky.lua index 2f56c5f..31f36ee 100644 --- a/mods/aftermath/sky.lua +++ b/mods/aftermath/sky.lua @@ -3,7 +3,47 @@ aftermath = {} local path = minetest.get_modpath("aftermath") + --Version 0.2 + --by emperor_genshin + --modified for ESM game by: maikerumine + --https://forum.minetest.net/viewtopic.php?f=9&t=13775&hilit=[mod]skybox -minetest.register_on_joinplayer(player) - skybox.set(player, 1) - end + + --The skybox for space, feel free to change it to however you like. + local spaceskybox = { + "sky_pos_y.png", + "sky_neg_y.png", + "sky_pos_z.png", + "sky_neg_z.png", + "sky_neg_x.png", + "sky_pos_x.png", + } + + local time = 0 + +minetest.register_globalstep(function(dtime) + time = time + dtime + if time > 5 then for _, player in ipairs(minetest.get_connected_players()) do + time = 0 + + local name = player:get_player_name() + local sky = player:get_attribute("skybox:skybox")--ADDED SKYBOX + + if minetest.get_player_by_name(name) then + --player:set_sky({}, "skybox", spaceskybox) -- Sets skybox + skybox.set(player, 4)--ADDED SKYBOX + end + end + end +end) + +minetest.register_on_leaveplayer(function(player) + local name = player:get_player_name() + + if name then + player:set_sky({}, "regular", {}) + + end + end) + + \ No newline at end of file diff --git a/mods/weather_pack/skycolor.lua b/mods/weather_pack/skycolor.lua index c67f3d8..aa5d0a4 100644 --- a/mods/weather_pack/skycolor.lua +++ b/mods/weather_pack/skycolor.lua @@ -178,7 +178,8 @@ skycolor = { }, } - +--maikerumine turned this off to use skybox instead +--[[ local timer = 0 minetest.register_globalstep(function(dtime) if skycolor.active ~= true or #minetest.get_connected_players() == 0 then @@ -210,4 +211,5 @@ minetest.register_on_joinplayer(function(player) if (skycolor.active) then skycolor.update_sky_color({player}) end -end) \ No newline at end of file +end) +]] \ No newline at end of file