Skip to content

Commit

Permalink
use gravity_manager
Browse files Browse the repository at this point in the history
  • Loading branch information
NatureFreshMilk committed Jul 29, 2019
1 parent b767d1e commit bd860d4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ read_globals = {
"dump", "VoxelArea",

-- Deps
"default"
"default", "gravity_manager"
}
1 change: 1 addition & 0 deletions depends.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ default
vacuum?
bedrock?
skybox?
gravity_manager?
11 changes: 9 additions & 2 deletions skybox.lua
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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}
Expand Down

0 comments on commit bd860d4

Please sign in to comment.