mirror of
https://github.com/Splizard/minetest-mod-snow.git
synced 2025-01-01 09:00:18 +01:00
change debug comment
This commit is contained in:
parent
062a451bc7
commit
0708ea6af3
@ -22,32 +22,13 @@ local np_ice = {
|
|||||||
|
|
||||||
-- Debugging function
|
-- Debugging function
|
||||||
|
|
||||||
local biome_to_string = function(num,num2)
|
local biome_strings = {
|
||||||
local biome, biome2
|
{"snowy", "plain", "alpine", "normal", "normal"},
|
||||||
if num == 1 then
|
{"cool", "icebergs", "icesheet", "icecave", "icehole"}
|
||||||
biome = "snowy"
|
}
|
||||||
elseif num == 2 then
|
local function biome_to_string(num,num2)
|
||||||
biome = "plain"
|
local biome = biome_strings[1][num] or "unknown "..num
|
||||||
elseif num == 3 then
|
local biome2 = biome_strings[2][num2] or "unknown "..num2
|
||||||
biome = "alpine"
|
|
||||||
elseif num == 4 or num == 5 then
|
|
||||||
biome = "normal"
|
|
||||||
else
|
|
||||||
biome = "unknown "..num
|
|
||||||
end
|
|
||||||
if num2 == 1 then
|
|
||||||
biome2 = "cool"
|
|
||||||
elseif num2 == 2 then
|
|
||||||
biome2 = "icebergs"
|
|
||||||
elseif num2 == 3 then
|
|
||||||
biome2 = "icesheet"
|
|
||||||
elseif num2 == 4 then
|
|
||||||
biome2 = "icecave"
|
|
||||||
elseif num2 == 5 then
|
|
||||||
biome2 = "icehole"
|
|
||||||
else
|
|
||||||
biome2 = "unknown "..num
|
|
||||||
end
|
|
||||||
return biome, biome2
|
return biome, biome2
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -61,11 +42,8 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
local x1 = maxp.x
|
local x1 = maxp.x
|
||||||
local z1 = maxp.z
|
local z1 = maxp.z
|
||||||
|
|
||||||
local debug = snow.debug
|
|
||||||
local min_height = snow.min_height
|
|
||||||
local spawn_pine = snow.voxelmanip_pine
|
local spawn_pine = snow.voxelmanip_pine
|
||||||
local smooth = snow.smooth_biomes
|
local smooth = snow.smooth_biomes
|
||||||
local legacy = snow.legacy
|
|
||||||
|
|
||||||
local c_dirt_with_grass = minetest.get_content_id("default:dirt_with_grass")
|
local c_dirt_with_grass = minetest.get_content_id("default:dirt_with_grass")
|
||||||
local c_dirt = minetest.get_content_id("default:dirt")
|
local c_dirt = minetest.get_content_id("default:dirt")
|
||||||
@ -93,7 +71,6 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
|
|
||||||
local sidelen = x1 - x0 + 1
|
local sidelen = x1 - x0 + 1
|
||||||
local chulens = {x=sidelen, y=sidelen, z=sidelen}
|
local chulens = {x=sidelen, y=sidelen, z=sidelen}
|
||||||
local minpos = {x=x0, y=z0}
|
|
||||||
local nvals_cold = minetest.get_perlin_map(np_cold, chulens):get2dMap_flat({x=x0, y=z0})
|
local nvals_cold = minetest.get_perlin_map(np_cold, chulens):get2dMap_flat({x=x0, y=z0})
|
||||||
local nvals_ice = minetest.get_perlin_map(np_ice, chulens):get2dMap_flat({x=x0, y=z0})
|
local nvals_ice = minetest.get_perlin_map(np_ice, chulens):get2dMap_flat({x=x0, y=z0})
|
||||||
|
|
||||||
@ -305,7 +282,8 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
vm:calc_lighting()
|
vm:calc_lighting()
|
||||||
vm:write_to_map()
|
vm:write_to_map()
|
||||||
|
|
||||||
if write_to_map and debug then -- print if any column of mapchunk was snow biome
|
if write_to_map
|
||||||
|
and snow.debug then -- print if any column of mapchunk was snow biome
|
||||||
local biome_string,biome2_string = biome_to_string(biome,biome2)
|
local biome_string,biome2_string = biome_to_string(biome,biome2)
|
||||||
local chugent = math.ceil((os.clock() - t1) * 1000)
|
local chugent = math.ceil((os.clock() - t1) * 1000)
|
||||||
print("[snow] "..biome_string.." and "..biome2_string.." x "..minp.x.." z "..minp.z.." time "..chugent.." ms")
|
print("[snow] "..biome_string.." and "..biome2_string.." x "..minp.x.." z "..minp.z.." time "..chugent.." ms")
|
||||||
|
@ -161,8 +161,7 @@ function sled:on_step(dtime)
|
|||||||
p.y = p.y+0.4
|
p.y = p.y+0.4
|
||||||
local s = self.object:getpos()
|
local s = self.object:getpos()
|
||||||
s.y = s.y -0.5
|
s.y = s.y -0.5
|
||||||
local keys = self.driver:get_player_control()
|
if self.driver:get_player_control().sneak
|
||||||
if keys["sneak"]
|
|
||||||
or is_water(p)
|
or is_water(p)
|
||||||
or not minetest.find_node_near(s, 1, {"default:snow","default:snowblock","default:ice","default:dirt_with_snow", "group:icemaker"}) then -- LazyJ
|
or not minetest.find_node_near(s, 1, {"default:snow","default:snowblock","default:ice","default:dirt_with_snow", "group:icemaker"}) then -- LazyJ
|
||||||
self.driver:set_physics_override({
|
self.driver:set_physics_override({
|
||||||
|
@ -17,7 +17,7 @@ local doc = {
|
|||||||
sleds = "Disable this to prevent sleds from being riden.",
|
sleds = "Disable this to prevent sleds from being riden.",
|
||||||
enable_snowfall = "Enables falling snow.",
|
enable_snowfall = "Enables falling snow.",
|
||||||
lighter_snowfall = "Reduces the amount of resources and fps used by snowfall.",
|
lighter_snowfall = "Reduces the amount of resources and fps used by snowfall.",
|
||||||
debug = "Enables debug output.",
|
debug = "Enables debug output. Currently it only prints mgapgen_v6 info.",
|
||||||
smooth_biomes = "Enables smooth transition of biomes",
|
smooth_biomes = "Enables smooth transition of biomes",
|
||||||
christmas_content = "Disable this to remove christmas saplings from being found.",
|
christmas_content = "Disable this to remove christmas saplings from being found.",
|
||||||
smooth_snow = "Disable this to stop snow from being smoothed.",
|
smooth_snow = "Disable this to stop snow from being smoothed.",
|
||||||
|
Loading…
Reference in New Issue
Block a user