use gravity_manager
This commit is contained in:
parent
b767d1ecc6
commit
bd860d4fc9
@ -18,5 +18,5 @@ read_globals = {
|
||||
"dump", "VoxelArea",
|
||||
|
||||
-- Deps
|
||||
"default"
|
||||
"default", "gravity_manager"
|
||||
}
|
||||
|
@ -2,3 +2,4 @@ default
|
||||
vacuum?
|
||||
bedrock?
|
||||
skybox?
|
||||
gravity_manager?
|
11
skybox.lua
11
skybox.lua
@ -1,16 +1,24 @@
|
||||
local has_skybox_mod = minetest.get_modpath("skybox")
|
||||
local has_gravity_manager_mod = minetest.get_modpath("gravity_manager")
|
||||
|
||||
local min_y = planet_mars.y_start
|
||||
local cave_end_y = planet_mars.y_start + (planet_mars.y_height * 0.97)
|
||||
local max_y = planet_mars.y_start + planet_mars.y_skybox_height
|
||||
|
||||
if has_gravity_manager_mod then
|
||||
gravity_manager.register({
|
||||
miny = min_y,
|
||||
maxy = max_y,
|
||||
gravity = 0.37
|
||||
})
|
||||
end
|
||||
|
||||
if has_skybox_mod then
|
||||
skybox.register({
|
||||
-- http://www.custommapmakers.org/skyboxes.php
|
||||
name = "mars",
|
||||
miny = cave_end_y,
|
||||
maxy = max_y,
|
||||
gravity = 0.37,
|
||||
always_day = true,
|
||||
clouds = {
|
||||
thickness=64,
|
||||
@ -34,7 +42,6 @@ if has_skybox_mod then
|
||||
name = "mars_cave",
|
||||
miny = min_y,
|
||||
maxy = cave_end_y,
|
||||
gravity = 0.37,
|
||||
always_day = true,
|
||||
sky_type = "plain",
|
||||
sky_color = {r=244, g=189, b=114}
|
||||
|
Loading…
x
Reference in New Issue
Block a user