Divorce biome lib and cleanup code (#11)

* make it boot without biome lib

* make luacheck semi sane

* make fast growth saplings work

* make fast saplings respect nodes there growing on

* make regualr saplings work

* fix some luacheck warnings

* add github actions for luacheck

* bump luacheck line limit, as to gracefully handle long tree rules

* switch over to inline luacheck length rules

* fix screenshot warning

* make tree generation work

* add settings from last night

* comment out new biome lib nonsense added

* tune spawning to be better

* turn down fallback ratio

* translate new abm patch to not use biome lib

* add ethereal since its still behaving badly :(
This commit is contained in:
wsor4035
2022-10-24 19:09:19 -04:00
committed by GitHub
parent 8103aaae79
commit e476b81cf5
12 changed files with 328 additions and 118 deletions

View File

@ -39,7 +39,28 @@ local sand_surfaces = {
-- too cold for a palm, too... well... sandy for anything else.
}
for i in ipairs(moretrees.treelist) do
function moretrees.can_grow(pos, treename)
local surfaces
if treename == "spruce"
or treename == "fir"
or treename == "cedar"
or treename == "pine" then
surfaces = conifer_surfaces
elseif string.find(treename, "palm") then
surfaces = sand_surfaces
else
surfaces = dirt_surfaces
end
if surfaces[minetest.get_node(vector.new(pos.x, pos.y-1, pos.z)).name] then
return true
else
return false
end
end
--[[ for i in ipairs(moretrees.treelist) do
local treename = moretrees.treelist[i][1]
local tree_model = treename.."_model"
local tree_biome = treename.."_biome"
@ -81,4 +102,4 @@ for i in ipairs(moretrees.treelist) do
grow_nodes = surfaces,
grow_function = grow_function,
})
end
end ]]