diff --git a/dimensions.lua b/dimensions.lua index 7813513..7e61c7e 100644 --- a/dimensions.lua +++ b/dimensions.lua @@ -2048,8 +2048,8 @@ multidimensions.register_dimension("minthe_exoplanet",{ clust_scarcity = 30 * 30 * 30, clust_num_ores = 4, clust_size = 1, - y_min = 1000, - y_max = 1499, + y_min = space_travel.yarth, + y_max = space_travel.yarth_orbit - 1, }) --luna (the moon) @@ -2060,8 +2060,8 @@ multidimensions.register_dimension("minthe_exoplanet",{ clust_scarcity = 30 * 30 * 30, clust_num_ores = 4, clust_size = 1, - y_min = 2500, - y_max = 2999, + y_min = space_travel.luna, + y_max = space_travel.luna_orbit - 1, }) --mars @@ -2072,8 +2072,8 @@ multidimensions.register_dimension("minthe_exoplanet",{ clust_scarcity = 30 * 30 * 30, clust_num_ores = 4, clust_size = 1, - y_min = 4000, - y_max = 4499, + y_min = space_travel.mars, + y_max = space_travel.mars_orbit - 1, }) --mercury @@ -2084,8 +2084,8 @@ multidimensions.register_dimension("minthe_exoplanet",{ clust_scarcity = 30 * 30 * 30, clust_num_ores = 4, clust_size = 1, - y_min = 5500, - y_max = 5999, + y_min = space_travel.mercury, + y_max = space_travel.mercury_orbit - 1, }) --venus @@ -2096,8 +2096,8 @@ multidimensions.register_dimension("minthe_exoplanet",{ clust_scarcity = 30 * 30 * 30, clust_num_ores = 4, clust_size = 1, - y_min = 7000, - y_max = 7499, + y_min = space_travel.venus, + y_max = space_travel.venus_orbit - 1, }) --ganymede @@ -2108,8 +2108,8 @@ multidimensions.register_dimension("minthe_exoplanet",{ clust_scarcity = 30 * 30 * 30, clust_num_ores = 4, clust_size = 1, - y_min = 8500, - y_max = 8999, + y_min = space_travel.ganymede, + y_max = space_travel.ganymede_orbit - 1, }) --callisto @@ -2120,8 +2120,8 @@ multidimensions.register_dimension("minthe_exoplanet",{ clust_scarcity = 30 * 30 * 30, clust_num_ores = 4, clust_size = 1, - y_min = 10000, - y_max = 10499, + y_min = space_travel.callisto, + y_max = space_travel.callisto_orbit - 1, }) --io @@ -2132,8 +2132,8 @@ multidimensions.register_dimension("minthe_exoplanet",{ clust_scarcity = 30 * 30 * 30, clust_num_ores = 4, clust_size = 1, - y_min = 11500, - y_max = 11999, + y_min = space_travel.io, + y_max = space_travel.io_orbit - 1, }) --europa @@ -2144,8 +2144,8 @@ multidimensions.register_dimension("minthe_exoplanet",{ clust_scarcity = 30 * 30 * 30, clust_num_ores = 4, clust_size = 1, - y_min = 13000, - y_max = 13499, + y_min = space_travel.europa, + y_max = space_travel.europa_orbit - 1, }) --titan @@ -2156,8 +2156,8 @@ multidimensions.register_dimension("minthe_exoplanet",{ clust_scarcity = 30 * 30 * 30, clust_num_ores = 4, clust_size = 1, - y_min = 14500, - y_max = 14999, + y_min = space_travel.titan, + y_max = space_travel.titan_orbit - 1, }) --oberon @@ -2168,8 +2168,8 @@ multidimensions.register_dimension("minthe_exoplanet",{ clust_scarcity = 30 * 30 * 30, clust_num_ores = 4, clust_size = 1, - y_min = 16000, - y_max = 16499, + y_min = space_travel.oberon, + y_max = space_travel.oberon_orbit - 1, }) --triton @@ -2180,8 +2180,8 @@ multidimensions.register_dimension("minthe_exoplanet",{ clust_scarcity = 30 * 30 * 30, clust_num_ores = 4, clust_size = 1, - y_min = 17500, - y_max = 17999, + y_min = space_travel.triton, + y_max = space_travel.triton_orbit - 1, }) --pluto @@ -2192,8 +2192,8 @@ multidimensions.register_dimension("minthe_exoplanet",{ clust_scarcity = 30 * 30 * 30, clust_num_ores = 4, clust_size = 1, - y_min = 19000, - y_max = 19599, + y_min = space_travel.pluto, + y_max = space_travel.pluto_orbit - 1, }) --charon @@ -2204,8 +2204,8 @@ multidimensions.register_dimension("minthe_exoplanet",{ clust_scarcity = 30 * 30 * 30, clust_num_ores = 4, clust_size = 1, - y_min = 20500, - y_max = 20999, + y_min = space_travel.charon, + y_max = space_travel.charon_orbit - 1, }) --sedna @@ -2216,8 +2216,8 @@ multidimensions.register_dimension("minthe_exoplanet",{ clust_scarcity = 30 * 30 * 30, clust_num_ores = 4, clust_size = 1, - y_min = 22000, - y_max = 22499, + y_min = space_travel.sedna, + y_max = space_travel.sedna_orbit - 1, }) --asteriod belt above @@ -2240,8 +2240,8 @@ multidimensions.register_dimension("minthe_exoplanet",{ clust_scarcity = 30 * 30 * 30, clust_num_ores = 4, clust_size = 1, - y_min = 24500, - y_max = 24999, + y_min = space_travel.minerva, + y_max = space_travel.minerva_orbit - 1, }) --bacchus @@ -2252,8 +2252,8 @@ multidimensions.register_dimension("minthe_exoplanet",{ clust_scarcity = 30 * 30 * 30, clust_num_ores = 4, clust_size = 1, - y_min = 26000, - y_max = 26499, + y_min = space_travel.bacchus, + y_max = space_travel.bacchus_orbit - 1, }) --ourea @@ -2264,8 +2264,8 @@ multidimensions.register_dimension("minthe_exoplanet",{ clust_scarcity = 30 * 30 * 30, clust_num_ores = 4, clust_size = 1, - y_min = 27500, - y_max = 27999, + y_min = space_travel.ourea, + y_max = space_travel.ourea_orbit - 1, }) --osiris @@ -2276,8 +2276,8 @@ multidimensions.register_dimension("minthe_exoplanet",{ clust_scarcity = 30 * 30 * 30, clust_num_ores = 4, clust_size = 1, - y_min = 29000, - y_max = 29499, + y_min = space_travel.osiris, + y_max = space_travel.osiris_orbit - 1, }) --minthe @@ -2288,8 +2288,8 @@ multidimensions.register_dimension("minthe_exoplanet",{ clust_scarcity = 30 * 30 * 30, clust_num_ores = 4, clust_size = 1, - y_min = 30500, - y_max = 30999, + y_min = space_travel.minthe, + y_max = space_travel.minthe_orbit - 1, }) @@ -2301,47 +2301,47 @@ minetest.register_lbm({ run_at_every_load = true, nodenames = {"vacuum:vacuum", "air"}, action = function(pos, node) - if pos.y >= 1500 and pos.y < 1568 then --Luna (the Moon) bedrock + if pos.y >= space_travel.luna and pos.y < space_travel.yarth_orbit + 68 then --Luna (the Moon) bedrock minetest.set_node(pos, {name = "multidimensions:bedrock"}) - elseif pos.y >= 3000 and pos.y < 3068 then --Mars bedrock + elseif pos.y >= space_travel.mars and pos.y < space_travel.mars + 68 then --Mars bedrock minetest.set_node(pos, {name = "multidimensions:bedrock"}) - elseif pos.y >= 4500 and pos.y < 4568 then --Mercury bedrock + elseif pos.y >= space_travel.mercury and pos.y < space_travel.mercury + 68 then --Mercury bedrock minetest.set_node(pos, {name = "multidimensions:bedrock"}) - elseif pos.y >= 6000 and pos.y < 6068 then --Venus bedrock + elseif pos.y >= space_travel.venus and pos.y < space_travel.venus + 68 then --Venus bedrock minetest.set_node(pos, {name = "multidimensions:bedrock"}) - elseif pos.y >= 7500 and pos.y < 7568 then --Ganymede bedrock + elseif pos.y >= space_travel.ganymede and pos.y < space_travel.ganymede + 68 then --Ganymede bedrock minetest.set_node(pos, {name = "multidimensions:bedrock"}) - elseif pos.y >= 9000 and pos.y < 9068 then --Callisto bedrock + elseif pos.y >= space_travel.callisto and pos.y < space_travel.callisto + 68 then --Callisto bedrock minetest.set_node(pos, {name = "multidimensions:bedrock"}) - elseif pos.y >= 10500 and pos.y < 10568 then --Io bedrock + elseif pos.y >= space_travel.io and pos.y < space_travel.io + 68 then --Io bedrock minetest.set_node(pos, {name = "multidimensions:bedrock"}) - elseif pos.y >= 12000 and pos.y < 12068 then --Europa bedrock + elseif pos.y >= space_travel.europa and pos.y < space_travel.europa + 68 then --Europa bedrock minetest.set_node(pos, {name = "multidimensions:bedrock"}) - elseif pos.y >= 13500 and pos.y < 13568 then --Titan bedrock + elseif pos.y >= space_travel.titan and pos.y < space_travel.titan + 68 then --Titan bedrock minetest.set_node(pos, {name = "multidimensions:bedrock"}) - elseif pos.y >= 15000 and pos.y < 15068 then --Oberon bedrock + elseif pos.y >= space_travel.oberon and pos.y < space_travel.oberon + 68 then --Oberon bedrock minetest.set_node(pos, {name = "multidimensions:bedrock"}) - elseif pos.y >= 16500 and pos.y < 16568 then --Triton bedrock + elseif pos.y >= space_travel.triton and pos.y < space_travel.triton + 68 then --Triton bedrock minetest.set_node(pos, {name = "multidimensions:bedrock"}) - elseif pos.y >= 18000 and pos.y < 18068 then --Pluto bedrock + elseif pos.y >= space_travel.pluto and pos.y < space_travel.pluto + 68 then --Pluto bedrock minetest.set_node(pos, {name = "multidimensions:bedrock"}) - elseif pos.y >= 19500 and pos.y < 19568 then --Charon bedrock + elseif pos.y >= space_travel.charon and pos.y < space_travel.charon + 68 then --Charon bedrock minetest.set_node(pos, {name = "multidimensions:bedrock"}) - elseif pos.y >= 21000 and pos.y < 21068 then --Sedna bedrock + elseif pos.y >= space_travel.sedna and pos.y < space_travel.sedna + 68 then --Sedna bedrock minetest.set_node(pos, {name = "multidimensions:bedrock"}) - elseif pos.y >= 22500 and pos.y < 22505 then --Asteriod belt bedrock + elseif pos.y >= space_travel.asteriod_belt and pos.y < space_travel.asteriod_belt + 5 then --Asteriod belt bedrock minetest.set_node(pos, {name = "multidimensions:bedrock"}) - elseif pos.y >= 22506 and pos.y < 22510 then --Asteriod belt killing + elseif pos.y >= space_travel.asteriod_belt + 6 and pos.y < space_travel.asteriod_belt + 10 then --Asteriod belt killing minetest.set_node(pos, {name = "multidimensions:killing"}) - elseif pos.y >= 23500 and pos.y < 23568 then --Minerva bedrock ["space_travel:space_lava_source"] = 100, + elseif pos.y >= space_travel.minerva and pos.y < space_travel.minerva + 68 then --Minerva bedrock ["space_travel:space_lava_source"] = 100, minetest.set_node(pos, {name = "multidimensions:bedrock"}) - elseif pos.y >= 25000 and pos.y < 25068 then --Bacchus bedrock + elseif pos.y >= space_travel.bacchus and pos.y < space_travel.bacchus + 68 then --Bacchus bedrock minetest.set_node(pos, {name = "multidimensions:bedrock"}) - elseif pos.y >= 26500 and pos.y < 25668 then --Ourea bedrock + elseif pos.y >= space_travel.ourea and pos.y < space_travel.ourea + 68 then --Ourea bedrock minetest.set_node(pos, {name = "multidimensions:bedrock"}) - elseif pos.y >= 28000 and pos.y < 28068 then --Osiris bedrock + elseif pos.y >= space_travel.osiris and pos.y < space_travel.osiris + 68 then --Osiris bedrock minetest.set_node(pos, {name = "multidimensions:bedrock"}) - elseif pos.y >= 29500 and pos.y < 29568 then --Minthe bedrock + elseif pos.y >= space_travel.minthe and pos.y < space_travel.minthe + 68 then --Minthe bedrock minetest.set_node(pos, {name = "multidimensions:bedrock"}) end end, diff --git a/mod.conf b/mod.conf index d59e9b2..d5d79c5 100644 --- a/mod.conf +++ b/mod.conf @@ -1,3 +1,5 @@ name = space_travel description = Adds in visitable space dimensions. -depends = default, bucket, stairs, tnt, multidimensions, vacuum, rocket, radiant_damage +depends = default, stairs, tnt, bucket, multidimensions, vacuum, radiant_damage +optional_depends = rocket + diff --git a/sky.lua b/sky.lua index b96b725..cba252b 100644 --- a/sky.lua +++ b/sky.lua @@ -338,9 +338,6 @@ minetest.register_globalstep(function(dtime) --Skybox code, cloud code, and physics code right here if minetest.get_player_by_name(name) and pos.y < space_travel.yarth then --Earth sky - minetest.chat_send_all(surface_effect.dump(pos.y)) - - --player:set_sky({}, "regular", {}) player:set_sky(sky_defaults.col, sky_defaults.tp, sky_defaults.tex, sky_defaults.cl) player:set_clouds({ density = 0.4, @@ -507,11 +504,11 @@ minetest.register_globalstep(function(dtime) 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 - elseif minetest.get_player_by_name(name) and pos.y >= space_travel.sedna_orbit and pos.y < space_travel.asteriod_aelt then --Asteriod belt sky + 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 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 - elseif minetest.get_player_by_name(name) and pos.y >= space_travel.asteriod_aelt and pos.y < space_travel.asteriod_aelt_orbit and day_time then --Minerva sky at day + 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 player:set_sky({r=249, g=139, b=139}, "plain", {}) player:set_clouds({ density = 0.4, @@ -522,7 +519,7 @@ minetest.register_globalstep(function(dtime) speed ={x=0, z=-2}, }) player:set_physics_override(1, 1, 1) -- speed, jump, gravity - elseif minetest.get_player_by_name(name) and pos.y >= space_travel.asteriod_aelt and pos.y < space_travel.asteriod_aelt_orbit and (not day_time) then --Minerva sky at night + 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 player:set_sky({r = 0, g = 0, b = 0}, "skybox", minerva_night) player:set_clouds({ density = 0.4,