space_travel/sky.lua

679 lines
30 KiB
Lua
Raw Permalink Normal View History

2019-10-08 00:15:35 +03:00
--Skybox code, as well as cloud code and physics code
local stars_sky = {
"space_travel_stars_sky.png", -- +y (top)
"space_travel_stars_sky.png", -- -y (bottom)
"space_travel_stars_sky.png", -- +z (back)
"space_travel_stars_sky.png", -- -z (front)
"space_travel_stars_sky.png", -- -x (left)
"space_travel_stars_sky.png", -- +x (right)
}
local earth_space = {
"space_travel_stars_sky.png", -- +y (top)
"space_travel_earth_space_sky.png", -- -y (bottom)
"space_travel_stars_sky.png", -- +z (back)
"space_travel_stars_sky.png", -- -z (front)
"space_travel_stars_sky.png", -- -x (left)
"space_travel_stars_sky.png", -- +x (right)
}
local moon_sky = {
"space_travel_stars_sky.png", -- +y (top)
"space_travel_stars_sky.png", -- -y (bottom)
"space_travel_stars_sky.png", -- +z (back)
"space_travel_earth_space_sky.png", -- -z (front)
"space_travel_stars_sky.png", -- -x (left)
"space_travel_stars_sky.png", -- +x (right)
}
local mars_night = {
"space_travel_stars_sky.png^[colorize:#cf411b11", -- +y (top)
"space_travel_stars_sky.png^[colorize:#cf411b11", -- -y (bottom)
"space_travel_stars_sky.png^[colorize:#cf411b11", -- +z (back)
"space_travel_stars_sky.png^[colorize:#cf411b11", -- -z (front)
"space_travel_stars_sky.png^[colorize:#cf411b11", -- -x (left)
"space_travel_stars_sky.png^[colorize:#cf411b11", -- +x (right)
}
local mars_space = {
"space_travel_stars_sky.png", -- +y (top)
"space_travel_mars_space_sky.png", -- -y (bottom)
"space_travel_stars_sky.png", -- +z (back)
"space_travel_stars_sky.png", -- -z (front)
"space_travel_stars_sky.png", -- -x (left)
"space_travel_stars_sky.png", -- +x (right)
}
local mercury_sky = {
"space_travel_dark_sky.png", -- +y (top)
"space_travel_dark_sky.png", -- -y (bottom)
"space_travel_dark_sky.png", -- +z (back)
"space_travel_sun_space_sky.png", -- -z (front)
"space_travel_dark_sky.png", -- -x (left)
"space_travel_dark_sky.png", -- +x (right)
}
local mercury_space = {
"space_travel_dark_sky.png", -- +y (top)
"space_travel_mercury_space_sky.png", -- -y (bottom)
"space_travel_dark_sky.png", -- +z (back)
"space_travel_sun_space_sky.png", -- -z (front)
"space_travel_dark_sky.png", -- -x (left)
"space_travel_dark_sky.png", -- +x (right)
}
local venus_space = {
"space_travel_dark_sky.png", -- +y (top)
"space_travel_venus_space_sky.png", -- -y (bottom)
"space_travel_dark_sky.png", -- +z (back)
"space_travel_dark_sky.png", -- -z (front)
"space_travel_dark_sky.png", -- -x (left)
"space_travel_dark_sky.png", -- +x (right)
}
local jupiter_space = {
"space_travel_dark_sky.png", -- +y (top)
"space_travel_dark_sky.png", -- -y (bottom)
"space_travel_dark_sky.png", -- +z (back)
"space_travel_jupiter_space_sky.png", -- -z (front)
"space_travel_dark_sky.png", -- -x (left)
"space_travel_dark_sky.png", -- +x (right)
}
local ganymede_space = {
"space_travel_dark_sky.png", -- +y (top)
"space_travel_ganymede_space_sky.png", -- -y (bottom)
"space_travel_dark_sky.png", -- +z (back)
"space_travel_jupiter_space_sky.png", -- -z (front)
"space_travel_dark_sky.png", -- -x (left)
"space_travel_dark_sky.png", -- +x (right)
}
local callisto_space = {
"space_travel_dark_sky.png", -- +y (top)
"space_travel_callisto_space_sky.png", -- -y (bottom)
"space_travel_dark_sky.png", -- +z (back)
"space_travel_jupiter_space_sky.png", -- -z (front)
"space_travel_dark_sky.png", -- -x (left)
"space_travel_dark_sky.png", -- +x (right)
}
local io_space = {
"space_travel_dark_sky.png", -- +y (top)
"space_travel_io_space_sky.png", -- -y (bottom)
"space_travel_dark_sky.png", -- +z (back)
"space_travel_jupiter_space_sky.png", -- -z (front)
"space_travel_dark_sky.png", -- -x (left)
"space_travel_dark_sky.png", -- +x (right)
}
local europa_space = {
"space_travel_dark_sky.png", -- +y (top)
"space_travel_europa_space_sky.png", -- -y (bottom)
"space_travel_dark_sky.png", -- +z (back)
"space_travel_jupiter_space_sky.png", -- -z (front)
"space_travel_dark_sky.png", -- -x (left)
"space_travel_dark_sky.png", -- +x (right)
}
local titan_sky = {
"space_travel_titan_sky_pos_y.png^[transform3", -- +y (top)
"space_travel_titan_sky_neg_y.png^[transform1", -- -y (bottom)
"space_travel_titan_sky_pos_z.png", -- +z (back)
"space_travel_titan_sky_neg_z.png", -- -z (front)
"space_travel_titan_sky_neg_x.png", -- -x (left)
"space_travel_titan_sky_pos_x.png", -- +x (right)
}
local saturn_space = {
"space_travel_saturn_space_sky_pos_y.png^[transform3", -- +y (top)
"space_travel_saturn_space_sky_neg_y.png^[transform1", -- -y (bottom)
"space_travel_saturn_space_sky_pos_z.png", -- +z (back)
"space_travel_saturn_space_sky_neg_z.png", -- -z (front
"space_travel_saturn_space_sky_neg_x.png", -- -x (left)
"space_travel_saturn_space_sky_pos_x.png", -- +x (right)
}
local uranus_space = {
"space_travel_dark_sky.png", -- +y (top)
"space_travel_dark_sky.png", -- -y (bottom)
"space_travel_dark_sky.png", -- +z (back)
"space_travel_uranus_space_sky.png", -- -z (front)
"space_travel_dark_sky.png", -- -x (left)
"space_travel_dark_sky.png", -- +x (right)
}
local neptune_space = {
"space_travel_dark_sky.png", -- +y (top)
"space_travel_dark_sky.png", -- -y (bottom)
"space_travel_dark_sky.png", -- +z (back)
"space_travel_neptune_space_sky.png", -- -z (front)
"space_travel_dark_sky.png", -- -x (left)
"space_travel_dark_sky.png", -- +x (right)
}
local pluto_sky = {
"space_travel_dark_sky.png", -- +y (top)
"space_travel_dark_sky.png", -- -y (bottom)
"space_travel_dark_sky.png", -- +z (back)
"space_travel_charon_space_sky.png", -- -z (front)
"space_travel_dark_sky.png", -- -x (left)
"space_travel_dark_sky.png", -- +x (right)
}
local pluto_space = {
"space_travel_dark_sky.png", -- +y (top)
"space_travel_pluto_space_sky.png", -- -y (bottom)
"space_travel_dark_sky.png", -- +z (back)
"space_travel_charon_space_sky.png", -- -z (front)
"space_travel_dark_sky.png", -- -x (left)
"space_travel_dark_sky.png", -- +x (right)
}
local charon_sky = {
"space_travel_dark_sky.png", -- +y (top)
"space_travel_dark_sky.png", -- -y (bottom)
"space_travel_dark_sky.png", -- +z (back)
"space_travel_pluto_space_sky.png", -- -z (front)
"space_travel_dark_sky.png", -- -x (left)
"space_travel_dark_sky.png", -- +x (right)
}
local charon_space = {
"space_travel_dark_sky.png", -- +y (top)
"space_travel_charon_space_sky.png", -- -y (bottom)
"space_travel_dark_sky.png", -- +z (back)
"space_travel_pluto_space_sky.png", -- -z (front)
"space_travel_dark_sky.png", -- -x (left)
"space_travel_dark_sky.png", -- +x (right)
}
local sedna_sky = {
"space_travel_cosmos_sky_pos_z.png^[colorize:#99000050",
"space_travel_cosmos_sky_neg_z.png^[transformR180^[colorize:#99000050",
"space_travel_cosmos_sky_neg_y.png^[transformR270^[colorize:#99000050",
"space_travel_cosmos_sky_pos_y.png^[transformR270^[colorize:#99000050",
"space_travel_cosmos_sky_pos_x.png^[transformR270^[colorize:#99000050",
"space_travel_cosmos_sky_neg_x.png^[transformR90^[colorize:#99000050",
}
local cosmos_sky = {
"space_travel_cosmos_sky_pos_z.png",
"space_travel_cosmos_sky_neg_z.png^[transformR180",
"space_travel_cosmos_sky_neg_y.png^[transformR270",
"space_travel_cosmos_sky_pos_y.png^[transformR270",
"space_travel_cosmos_sky_pos_x.png^[transformR270",
"space_travel_cosmos_sky_neg_x.png^[transformR90",
}
local minerva_night = {
"space_travel_stars_sky.png^[colorize:#f98b8b06", -- +y (top)
"space_travel_stars_sky.png^[colorize:#f98b8b06", -- -y (bottom)
"space_travel_stars_sky.png^[colorize:#f98b8b06", -- +z (back)
"space_travel_stars_sky.png^[colorize:#f98b8b06", -- -z (front)
"space_travel_stars_sky.png^[colorize:#f98b8b06", -- -x (left)
"space_travel_stars_sky.png^[colorize:#f98b8b06", -- +x (right)
}
local minerva_space = {
"space_travel_stars_sky.png", -- +y (top)
"space_travel_minerva_space_sky.png", -- -y (bottom)
"space_travel_stars_sky.png", -- +z (back)
"space_travel_stars_sky.png", -- -z (front)
"space_travel_stars_sky.png", -- -x (left)
"space_travel_stars_sky.png", -- +x (right)
}
local bacchus_night = {
"space_travel_stars_sky.png^[colorize:#F08BF906", -- +y (top)
"space_travel_stars_sky.png^[colorize:#F08BF906", -- -y (bottom)
"space_travel_stars_sky.png^[colorize:#F08BF906", -- +z (back)
"space_travel_stars_sky.png^[colorize:#F08BF906", -- -z (front)
"space_travel_stars_sky.png^[colorize:#F08BF906", -- -x (left)
"space_travel_stars_sky.png^[colorize:#F08BF906", -- +x (right)
}
local bacchus_space = {
"space_travel_stars_sky.png", -- +y (top)
"space_travel_bacchus_space_sky.png", -- -y (bottom)
"space_travel_stars_sky.png", -- +z (back)
"space_travel_stars_sky.png", -- -z (front)
"space_travel_stars_sky.png", -- -x (left)
"space_travel_stars_sky.png", -- +x (right)
}
--[[
local ourea_sky = {
"space_travel_ourea_sky.png", -- +y (top)
"space_travel_ourea_sky.png", -- -y (bottom)
"space_travel_ourea_sky.png", -- +z (back)
"space_travel_ourea_sky_front.png", -- -z (front)
"space_travel_ourea_sky.png", -- -x (left)
"space_travel_ourea_sky.png", -- +x (right)
}
]]
local ourea_sky = {
"space_travel_ourea_sky_pos_y.png^[transform3", -- +y (top)
"space_travel_ourea_sky_neg_y.png^[transform1", -- -y (bottom)
"space_travel_ourea_sky_pos_z.png", -- +z (back)
"space_travel_ourea_sky_neg_z.png", -- -z (front)
"space_travel_ourea_sky_neg_x.png", -- -x (left)
"space_travel_ourea_sky_pos_x.png", -- +x (right)
}
local caelus_space = {
2024-09-21 11:29:48 +03:00
"space_travel_caelus_space_sky_neg_y.png^[transform3", -- +y (top)
2019-10-08 00:15:35 +03:00
"space_travel_caelus_space_sky_neg_y.png^[transform1", -- -y (bottom)
"space_travel_caelus_space_sky_pos_z.png", -- +z (back)
"space_travel_caelus_space_sky_neg_z.png", -- -z (front
"space_travel_caelus_space_sky_neg_x.png", -- -x (left)
"space_travel_caelus_space_sky_pos_x.png", -- +x (right)
}
local osiris_night = {
"space_travel_stars_sky.png^[colorize:#f7b48a11", -- +y (top)
"space_travel_stars_sky.png^[colorize:#f7b48a11", -- -y (bottom)
"space_travel_stars_sky.png^[colorize:#f7b48a11", -- +z (back)
"space_travel_stars_sky.png^[colorize:#f7b48a11", -- -z (front)
"space_travel_stars_sky.png^[colorize:#f7b48a11", -- -x (left)
"space_travel_stars_sky.png^[colorize:#f7b48a11", -- +x (right)
}
local osiris_space = {
"space_travel_stars_sky.png", -- +y (top)
"space_travel_osiris_space_sky.png", -- -y (bottom)
"space_travel_stars_sky.png", -- +z (back)
"space_travel_stars_sky.png", -- -z (front)
"space_travel_stars_sky.png", -- -x (left)
"space_travel_stars_sky.png", -- +x (right)
}
local minthe_night = {
"space_travel_stars_sky.png^[colorize:#75dbaa11", -- +y (top)
"space_travel_stars_sky.png^[colorize:#75dbaa11", -- -y (bottom)
"space_travel_stars_sky.png^[colorize:#75dbaa11", -- +z (back)
"space_travel_stars_sky.png^[colorize:#75dbaa11", -- -z (front)
"space_travel_stars_sky.png^[colorize:#75dbaa11", -- -x (left)
"space_travel_stars_sky.png^[colorize:#75dbaa11", -- +x (right)
}
local minthe_space = {
"space_travel_stars_sky.png", -- +y (top)
"space_travel_minthe_space_sky.png", -- -y (bottom)
"space_travel_stars_sky.png", -- +z (back)
"space_travel_stars_sky.png", -- -z (front)
"space_travel_stars_sky.png", -- -x (left)
"space_travel_stars_sky.png", -- +x (right)
}
local time = 0
2024-09-16 12:57:09 +03:00
sky_defaults = {}
minetest.register_on_joinplayer(function(player)
sky_defaults.col, sky_defaults.tp, sky_defaults.tex, sky_defaults.cl = player:get_sky()
end)
2019-10-08 00:15:35 +03:00
local player_weightlessness = {}
local function set_weightlessness(name, par)
player_weightlessness[name] = par
end
local function get_weightlessness(name)
if type(player_weightlessness[name]) ~= 'nil' then
return player_weightlessness[name]
end
return false
end
2019-10-08 00:15:35 +03:00
minetest.register_globalstep(function(dtime)
time = time + dtime
if time > 1 then
for _, player in ipairs(minetest.get_connected_players()) do
time = 0
local name = player:get_player_name()
local pos = player:getpos()
local day_time = nil
--if minetest.get_timeofday()*24000 > 6000 and minetest.get_timeofday()*24000 <= 18000 then
if minetest.get_timeofday() > 0.25 and minetest.get_timeofday() <= 0.75 then
day_time = true
--elseif minetest.get_timeofday()*24000 <= 6000 or minetest.get_timeofday()*24000 > 18000 then
elseif minetest.get_timeofday() <= 0.25 or minetest.get_timeofday() > 0.75 then
day_time = false
else
day_time = nil
end
--Skybox code, cloud code, and physics code right here
2024-09-16 12:57:09 +03:00
if minetest.get_player_by_name(name) and pos.y < space_travel.yarth then --Earth sky
if get_weightlessness(name) == true then
player:set_sky(sky_defaults.col, sky_defaults.tp, sky_defaults.tex, sky_defaults.cl)
player:set_clouds({
density = 0.4,
color = "#fff0f0e5",
ambient = "#000000",
height = 120,
thickness = 16,
speed ={x=0, z=-2},
})
player:set_physics_override({1, 1, 1}) -- speed, jump, gravity
set_weightlessness(name, false)
end
return
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.yarth and pos.y < space_travel.yarth_orbit then --Earth orbit
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", earth_space)
player:set_clouds({density = 0})
player:set_physics_override({1, 0.6, 0.2}) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.yarth_orbit and pos.y < space_travel.luna then --Moon sky
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", moon_sky)
player:set_clouds({density = 0})
player:set_physics_override({1, 0.6, 0.2}) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.luna and pos.y < space_travel.luna_orbit then --Moon orbit
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", moon_sky)
player:set_clouds({density = 0})
player:set_physics_override({1, 0.6, 0.2}) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.luna_orbit and pos.y < space_travel.mars and day_time then --Mars sky at day
2019-10-08 00:15:35 +03:00
player:set_sky({r=219, g=168, b=117}, "plain", {})
player:set_clouds({density = 0})
player:set_physics_override({1, 0.6, 0.2}) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.luna_orbit and pos.y < space_travel.mars and (not day_time) then --Mars sky at night
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", mars_night)
player:set_clouds({density = 0})
player:set_physics_override({1, 0.6, 0.2}) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.mars and pos.y < space_travel.mars_orbit then --Mars orbit
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", mars_space)
player:set_clouds({density = 0})
player:set_physics_override({1, 0.6, 0.2}) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.mars_orbit and pos.y < space_travel.mercury then --Mercury sky
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", mercury_sky)
player:set_clouds({density = 0})
player:set_physics_override({1, 0.6, 0.2}) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.mercury and pos.y < space_travel.mercury_orbit then --Mercury orbit
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", mercury_space)
player:set_clouds({density = 0})
player:set_physics_override({1, 0.6, 0.2}) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-21 11:29:48 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.mercury and pos.y < space_travel.venus and day_time then --Venus sky at day
2019-10-08 00:15:35 +03:00
player:set_sky({r=208, g=177, b=11}, "plain", {})
player:set_clouds({
density = 0.6,
color = "#CCA526", --"#B18A21",
ambient = "#000000",
height = 6620,
thickness = 32,
speed ={x=0, z=10},
})
player:set_physics_override({1, 1, 1}) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.mercury and pos.y < space_travel.venus and (not day_time) then --Venus sky at night
2019-10-08 00:15:35 +03:00
player:set_sky({r=102, g=87, b=5}, "plain", {})
player:set_clouds({
density = 0.6,
color = "#CCA526", --"#B18A21",
ambient = "#000000",
height = 6620,
thickness = 32,
speed ={x=0, z=10},
})
player:set_physics_override({1, 1, 1}) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.venus and pos.y < space_travel.venus_orbit then --Venus orbit
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", venus_space)
player:set_clouds({density = 0})
player:set_physics_override({1, 0.6, 0.2}) -- speed, jump, gravity
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.mercury and pos.y < space_travel.ganymede then --Ganymede sky
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", jupiter_space)
player:set_clouds({density = 0})
player:set_physics_override({1, 0.6, 0.2}) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.ganymede and pos.y < space_travel.ganymede_orbit then --Ganymede orbit
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", ganymede_space)
player:set_clouds({density = 0})
player:set_physics_override({1, 0.6, 0.2}) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.ganymede_orbit and pos.y < space_travel.callisto then --Callisto sky
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", jupiter_space)
player:set_clouds({density = 0})
player:set_physics_override({1, 0.6, 0.2}) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.callisto and pos.y < space_travel.callisto_orbit then --Callisto orbit
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", callisto_space)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.callisto_orbit and pos.y < space_travel.io then --Io sky
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", jupiter_space)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.io and pos.y < space_travel.io_orbit then --Io orbit
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", io_space)
player:set_clouds({density = 0})
2024-11-04 08:45:44 +03:00
player:set_physics_override({1, 0.6, 0.2}) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.io_orbit and pos.y < space_travel.europa then --Europa sky
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", jupiter_space)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.europa and pos.y < space_travel.europa_orbit then --Europa orbit
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", europa_space)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.europa_orbit and pos.y < space_travel.titan and day_time then --Titan sky at day
2019-10-08 00:15:35 +03:00
player:set_sky({r = 239, g = 194, b = 109}, "skybox", titan_sky)
player:set_clouds({
density = 0.5,
color = "#EFC26D",
ambient = "#000000",
height = 14120,
thickness = 32,
speed ={x=0, z=-6},
})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.europa_orbit and pos.y < space_travel.titan and (not day_time) then --Titan sky at night
2019-10-08 00:15:35 +03:00
player:set_sky({r = 128, g = 103, b = 58}, "plain", {})
player:set_clouds({
density = 0.5,
color = "#EFC26D",
ambient = "#000000",
height = 14120,
thickness = 32,
speed ={x=0, z=-6},
})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.titan and pos.y < space_travel.titan_orbit then --Titan orbit
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", saturn_space)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.titan_orbit and pos.y < space_travel.oberon then --Oberon sky
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", uranus_space)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.oberon and pos.y < space_travel.oberon_orbit then --Oberon orbit
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", uranus_space)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.oberon_orbit and pos.y < space_travel.triton then --Triton sky
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", neptune_space)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.triton and pos.y < space_travel.triton_orbit then --Triton orbit
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", neptune_space)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.triton_orbit and pos.y < space_travel.pluto then --Pluto sky
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", pluto_sky)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.pluto and pos.y < space_travel.pluto_orbit then --Pluto orbit
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", pluto_space)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.pluto_orbit and pos.y < space_travel.charon then --Charon sky
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", charon_sky)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.charon and pos.y < space_travel.charon_orbit then --Charon orbit
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", charon_space)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.charon_orbit and pos.y < space_travel.sedna then --Sedna sky
2019-10-08 00:15:35 +03:00
player:set_sky({r = 118, g = 84, b = 84}, "skybox", sedna_sky)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.sedna and pos.y < space_travel.sedna_orbit then --Sedna orbit
2019-10-08 00:15:35 +03:00
player:set_sky({r = 118, g = 84, b = 84}, "skybox", sedna_sky)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 14:15:39 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.sedna_orbit and pos.y < space_travel.asteriod_belt then --Asteriod belt sky
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", cosmos_sky)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 14:15:39 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.asteriod_belt and pos.y < space_travel.asteriod_belt_orbit and day_time then --Minerva sky at day
2019-10-08 00:15:35 +03:00
player:set_sky({r=249, g=139, b=139}, "plain", {})
player:set_clouds({
density = 0.4,
color = "#FA7070",
ambient = "#000000",
height = 24120,
thickness = 16,
speed ={x=0, z=-2},
})
player:set_physics_override({ 1, 1, 1 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 14:15:39 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.asteriod_belt and pos.y < space_travel.asteriod_belt_orbit and (not day_time) then --Minerva sky at night
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", minerva_night)
player:set_clouds({
density = 0.4,
color = "#FA7070",
ambient = "#000000",
height = 24120,
thickness = 16,
speed ={x=0, z=-2},
})
player:set_physics_override({ 1, 1, 1 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.minerva and pos.y < space_travel.minerva_orbit then --Minerva orbit
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", minerva_space)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.minerva_orbit and pos.y < space_travel.bacchus and day_time then --Bacchus sky at day
2019-10-08 00:15:35 +03:00
player:set_sky({r=240, g=139, b=249}, "plain", {})
player:set_clouds({
density = 0.4,
color = "#ED64F9",
ambient = "#000000",
height = 25620,
thickness = 16,
speed ={x=0, z=-2},
})
player:set_physics_override({ 1, 1, 1 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.minerva_orbit and pos.y < space_travel.bacchus and (not day_time) then --Bacchus sky at night
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", minerva_night)
player:set_clouds({
density = 0.4,
color = "#ED64F9",
ambient = "#000000",
height = 25620,
thickness = 16,
speed ={x=0, z=-2},
})
player:set_physics_override({ 1, 1, 1 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.bacchus and pos.y < space_travel.bacchus_orbit then --Bacchus orbit
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", bacchus_space)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.bacchus_orbit and pos.y < space_travel.ourea and day_time then --Ourea sky at day
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", ourea_sky)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.bacchus_orbit and pos.y < space_travel.ourea and (not day_time) then --Ourea night at day
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", caelus_space)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.ourea and pos.y < space_travel.ourea_orbit then --Ourea orbit
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", caelus_space)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.ourea_orbit and pos.y < space_travel.osiris and day_time then --Osiris sky at day
2019-10-08 00:15:35 +03:00
player:set_sky({r=247, g=180, b=138}, "plain", {})
player:set_clouds({
density = 0.4,
color = "#f79c63",
ambient = "#000000",
height = 28620,
thickness = 16,
speed ={x=0, z=-2},
})
player:set_physics_override({ 1, 1, 1 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.ourea_orbit and pos.y < space_travel.osiris and (not day_time) then --Osiris sky at night
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", osiris_night)
player:set_clouds({
density = 0.4,
color = "#f79c63",
ambient = "#000000",
height = 28620,
thickness = 16,
speed ={x=0, z=-2},
})
player:set_physics_override({ 1, 1, 1 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.osiris and pos.y < space_travel.osiris_orbit then --Osiris orbit
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", osiris_space)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.osiris_orbit and pos.y < space_travel.minthe and day_time then --Minthe sky at day
2019-10-08 00:15:35 +03:00
player:set_sky({r=117, g=219, b=170}, "plain", {})
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.osiris_orbit and pos.y < space_travel.minthe and (not day_time) then --Minthe sky at night
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", minthe_night)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
2024-09-16 12:57:09 +03:00
elseif minetest.get_player_by_name(name) and pos.y >= space_travel.minthe and pos.y < space_travel.minthe_orbit then --Minthe orbit
2019-10-08 00:15:35 +03:00
player:set_sky({r = 0, g = 0, b = 0}, "skybox", minthe_space)
player:set_clouds({density = 0})
player:set_physics_override({ 1, 0.6, 0.2 }) -- speed, jump, gravity
set_weightlessness(name, true)
2019-10-08 00:15:35 +03:00
end
--End of important code
end
end
end)