Skip to content

Commit

Permalink
textures
Browse files Browse the repository at this point in the history
  • Loading branch information
arpruss committed Oct 12, 2015
1 parent 50f52d1 commit d7022f9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
18 changes: 18 additions & 0 deletions LICENSE
@@ -1,3 +1,21 @@
LICENSE FOR SKY TEXTURES ONLY

Copyright on the "SpaceEngine" software belongs to Vladimir Romanyuk (the Author).
The Author reserves all other rights in the Software not expressly granted to you
here. Subject to your compliance with these terms and conditions, the Author
grants you a royalty-free, non-exclusive license to use, copy and distribute the
Software, and any content created with the Software (screenshots, video, textures,
scripts), without fee, for personal, educational, charity and other non-commercial
use. If you want to use the Software or content created with the Software for
commercial purposes, please contact the Author at astrodigital@yandex.ru.


If you want, you can set the sky to "black" or "blue" in settings.conf and the
redistribute without the textures in the textures folder.


LICENSE FOR CODE

The MIT License (MIT)

Code copyright (c) 2015 Alexander R. Pruss
Expand Down
12 changes: 9 additions & 3 deletions init.lua
@@ -1,7 +1,7 @@
local meters_per_land_node = 500
local height_multiplier = 5
local gravity = 0.165
local black_sky = true
local sky = "black"

if minetest.request_insecure_environment then
ie = minetest.request_insecure_environment()
Expand Down Expand Up @@ -30,7 +30,7 @@ x = settings:get("gravity")
if x then gravity = tonumber(x) end
x = settings:get("sky")
if x then
black_sky = (x == 'black')
sky = x
end

local meters_per_vertical_node = meters_per_land_node / height_multiplier
Expand Down Expand Up @@ -263,5 +263,11 @@ minetest.register_on_joinplayer(function(player)
local override = player:get_physics_override()
override['gravity'] = gravity
player:set_physics_override(override)
player:set_sky({r=0,g=0,b=0},'plain')
-- texture order: up,down,east,west,south,north
if sky == "black" then
player:set_sky({r=0,g=0,b=0},'plain')
else if sky == "fancy" then
player:set_sky({r=0,g=0,b=0},'skybox'),
{'up.png','down.png','east.png','west.png','south.png','north.png'})
end
end)

0 comments on commit d7022f9

Please sign in to comment.