move base altitude to setting and init
This commit is contained in:
parent
84701d46b8
commit
37a65ba32f
1
init.lua
1
init.lua
@ -1,4 +1,5 @@
|
||||
skytardis = {}
|
||||
skytardis.base_altitude = minetest.setting_get("skytardis.base_altitude") or 100 -- should default to 31000 out of tests
|
||||
|
||||
local path = minetest.get_modpath("skytardis")
|
||||
--dofile(path.."/abm.lua")
|
||||
|
@ -24,11 +24,10 @@ end
|
||||
|
||||
function skytardis:getSkyBoundsFor(landx,landz)
|
||||
local bounds = skytardis:derive_blockbounds(landx,landz)
|
||||
local base_altitude = 100 -- in prod, should be 31000
|
||||
local increment = skytardis:derive_altitude(landx,landz)
|
||||
|
||||
bounds.pos1.y = base_altitude + increment
|
||||
bounds.pos2.y = base_altitude + increment
|
||||
bounds.pos1.y = skytardis.base_altitude + increment
|
||||
bounds.pos2.y = skytardis.base_altitude + increment
|
||||
|
||||
return bounds
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user