Ruined
This commit is contained in:
+20
-1
@@ -11,7 +11,7 @@ return function(hearth, api, register_node, construction)
|
||||
for i, name in ipairs(list) do out[i] = node(name) end
|
||||
return out
|
||||
end
|
||||
M.species_order = {"oak", "birch", "pine", "willow", "alder", "beech", "aspen", "rowan", "hazel", "spruce"}
|
||||
M.species_order = {"oak", "birch", "pine", "willow", "alder", "beech", "aspen", "rowan", "hazel", "spruce", "crab_apple", "wild_cherry", "field_maple"}
|
||||
M.rocks = {"granite", "basalt", "limestone", "slate", "sandstone"}
|
||||
-- Moisture/fertility/drainage are normalized habitat preferences, NOT player
|
||||
-- climate values. The succession owner decides how to consume these hints.
|
||||
@@ -69,6 +69,15 @@ return function(hearth, api, register_node, construction)
|
||||
spruce = {height=10, width=5, crown="spire", heat={0,40}, humidity={40,85},
|
||||
y_min=8, y_max=185, soils={"podzol", "forest_floor", "alpine_turf"},
|
||||
biomes={"hearth_pine_taiga", "hearth_birch_forest"}, shade=0.85, litter=0.5},
|
||||
crab_apple = {height=6,width=7,crown="round",heat={35,75},humidity={30,75},
|
||||
y_min=3,y_max=100,soils={"grass","forest_floor","soil"},
|
||||
biomes={"hearth_temperate","hearth_oak_woodland"},shade=0.65,litter=0.7},
|
||||
wild_cherry = {height=9,width=7,crown="horizontal",heat={35,75},humidity={30,70},
|
||||
y_min=4,y_max=120,soils={"grass","forest_floor","soil"},
|
||||
biomes={"hearth_temperate","hearth_oak_woodland"},shade=0.6,litter=0.8},
|
||||
field_maple = {height=7,width=9,crown="lobed_broad",heat={35,80},humidity={25,75},
|
||||
y_min=3,y_max=110,soils={"grass","forest_floor","soil"},
|
||||
biomes={"hearth_temperate","hearth_oak_woodland"},shade=0.8,litter=0.8},
|
||||
}
|
||||
function M.supports_species(species, surface)
|
||||
local p = M.profiles[species]
|
||||
@@ -122,6 +131,16 @@ return function(hearth, api, register_node, construction)
|
||||
elseif species == "spruce" then
|
||||
local radius = y >= 1 and math.min(2,math.floor((h-1-y)/3)) or -1
|
||||
leaf = r <= radius and dx+dz <= radius+1
|
||||
elseif species == "crab_apple" then
|
||||
leaf = y>=2 and dx*dx+dz*dz <= (y==h-1 and 2 or (y==2 and 5 or 10))
|
||||
trunk = trunk or (y==2 and dx+dz<=2 and (dx==0 or dz==0))
|
||||
elseif species == "wild_cherry" then
|
||||
leaf = y>=4 and r<=(y==h-1 and 1 or 3) and dx+dz<=4 and (y%2==0 or r<=1)
|
||||
trunk = trunk or ((y==4 or y==6) and dz==0 and dx<=2)
|
||||
elseif species == "field_maple" then
|
||||
leaf = y>=2 and r<=(y==h-1 and 2 or 4) and dx+dz<=(y==h-1 and 3 or 5)
|
||||
and not (dx==dz and r>=2)
|
||||
trunk = trunk or (y==3 and dx+dz<=3 and (dx==0 or dz==0))
|
||||
end
|
||||
local stem = canonical and "log" or species .. "_log"
|
||||
local leaves = canonical and "leaves" or species .. "_leaves"
|
||||
|
||||
Reference in New Issue
Block a user