Fix a crash in ambient sound biome checking when the player is halfway between level 2 and level 3. Also add API to puzzle chests

This fixes issue https://github.com/FaceDeer/dfcaverns/issues/39
This commit is contained in:
FaceDeer
2022-10-22 10:02:34 -06:00
parent 5ea9ee9de0
commit a6cd433ecf
3 changed files with 19 additions and 10 deletions

View File

@ -28,6 +28,7 @@ df_caverns.register_biome_check = function(func)
table.insert(get_biome_at_pos_list, func)
end
df_caverns.get_biome = function(pos)
pos = vector.round(pos)
local heat = minetest.get_heat(pos)
local humidity = minetest.get_humidity(pos)
for _, val in pairs(get_biome_at_pos_list) do