forked from mtcontrib/moretrees
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
d1ae12c4b1
18
.github/workflows/luacheck.yml
vendored
Normal file
18
.github/workflows/luacheck.yml
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
name: luacheck
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: apt
|
||||
run: sudo apt-get install -y luarocks
|
||||
- name: luacheck install
|
||||
run: luarocks install --local luacheck
|
||||
- name: luacheck run
|
||||
run: $HOME/.luarocks/bin/luacheck ./
|
36
.luacheckrc
36
.luacheckrc
@ -1,28 +1,26 @@
|
||||
std = "lua51+minetest"
|
||||
unused_args = false
|
||||
allow_defined_top = true
|
||||
max_line_length = 999
|
||||
max_comment_line_length = 999
|
||||
|
||||
stds.minetest = {
|
||||
read_globals = {
|
||||
"minetest",
|
||||
"vector",
|
||||
"VoxelManip",
|
||||
"VoxelArea",
|
||||
"PseudoRandom",
|
||||
"ItemStack",
|
||||
"default",
|
||||
table = {
|
||||
fields = {
|
||||
"copy",
|
||||
},
|
||||
},
|
||||
"dump",
|
||||
}
|
||||
exclude_files = {".luacheckrc"}
|
||||
|
||||
|
||||
globals = {
|
||||
"minetest",
|
||||
"vector",
|
||||
"VoxelManip",
|
||||
"VoxelArea",
|
||||
"PseudoRandom",
|
||||
"ItemStack",
|
||||
"default",
|
||||
"dump",
|
||||
"moretrees",
|
||||
"ethereal",
|
||||
}
|
||||
|
||||
read_globals = {
|
||||
string = {fields = {"split"}},
|
||||
table = {fields = {"copy", "getn"}},
|
||||
|
||||
"biome_lib",
|
||||
"stairsplus",
|
||||
"stairs",
|
||||
|
@ -69,6 +69,9 @@ moretrees.apple_tree_biome = {
|
||||
temp_max = -0.15,
|
||||
rarity = 75,
|
||||
max_count = 5,
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
biomes = {"deciduous_forest"},
|
||||
fill_ratio = 0.0001,
|
||||
}
|
||||
|
||||
moretrees.oak_biome = {
|
||||
@ -82,6 +85,7 @@ moretrees.oak_biome = {
|
||||
temp_max = 0.2,
|
||||
rarity = 50,
|
||||
max_count = 5,
|
||||
fill_ratio = 0.0003
|
||||
}
|
||||
|
||||
moretrees.sequoia_biome = {
|
||||
@ -95,6 +99,7 @@ moretrees.sequoia_biome = {
|
||||
temp_max = -0.4,
|
||||
rarity = 90,
|
||||
max_count = 5,
|
||||
fill_ratio = 0.0001,
|
||||
}
|
||||
|
||||
moretrees.birch_biome = {
|
||||
@ -108,6 +113,7 @@ moretrees.birch_biome = {
|
||||
temp_max = 0.3,
|
||||
rarity = 50,
|
||||
max_count = 10,
|
||||
fill_ratio = 0.001,
|
||||
}
|
||||
|
||||
moretrees.willow_biome = {
|
||||
@ -148,7 +154,8 @@ moretrees.jungletree_biome = {
|
||||
"default:dirt_with_grass",
|
||||
"woodsoils:dirt_with_leaves_1",
|
||||
"woodsoils:grass_with_leaves_1",
|
||||
"woodsoils:grass_with_leaves_2"
|
||||
"woodsoils:grass_with_leaves_2",
|
||||
"default:dirt_with_rainforest_litter",
|
||||
},
|
||||
avoid_nodes = {"moretrees:jungletree_trunk"},
|
||||
max_count = 12,
|
||||
@ -161,6 +168,7 @@ moretrees.jungletree_biome = {
|
||||
near_nodes_vertical = 2,
|
||||
near_nodes_count = 1,
|
||||
plantlife_limit = -0.9,
|
||||
biomes = {"rainforest", "rainforest_swamp"},
|
||||
}
|
||||
|
||||
moretrees.spruce_biome = {
|
||||
|
@ -32,7 +32,7 @@ ftrunk.after_destruct = function(pos, oldnode)
|
||||
-- minetest.dig_node(coconutpos) does not cause nearby coconuts to be dropped :-( ...
|
||||
--minetest.dig_node(coconutpos)
|
||||
local items = minetest.get_node_drops(minetest.get_node(coconutpos).name)
|
||||
minetest.swap_node(coconutpos, biome_lib.air)
|
||||
minetest.swap_node(coconutpos, {name = "air"})
|
||||
for _, itemname in pairs(items) do
|
||||
minetest.add_item(coconutpos, itemname)
|
||||
end
|
||||
@ -82,8 +82,8 @@ minetest.register_abm({
|
||||
nodenames = { "moretrees:palm_fruit_trunk_gen" },
|
||||
interval = 6,
|
||||
chance = 1,
|
||||
min_y = biome_lib.mapgen_elevation_limit.min,
|
||||
max_y = biome_lib.mapgen_elevation_limit.max,
|
||||
min_y = -16,
|
||||
max_y = 48,
|
||||
label = "converts palm trunk to a regular fruit trunk, and spawns some coconuts",
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
minetest.swap_node(pos, {name="moretrees:palm_fruit_trunk"})
|
||||
@ -130,7 +130,7 @@ local coconut_growfn = function(pos, elapsed)
|
||||
minetest.add_item(pos, itemname)
|
||||
end
|
||||
end
|
||||
minetest.swap_node(pos, biome_lib.air)
|
||||
minetest.swap_node(pos, {name = "air"})
|
||||
end
|
||||
else
|
||||
-- Grow coconuts to the next stage
|
||||
|
@ -52,7 +52,7 @@ ftrunk.after_destruct = function(pos, oldnode)
|
||||
for _,datespos in pairs(dates) do
|
||||
-- minetest.dig_node(datespos) does not cause nearby dates to be dropped :-( ...
|
||||
local items = minetest.get_node_drops(minetest.get_node(datespos).name)
|
||||
minetest.swap_node(datespos, biome_lib.air)
|
||||
minetest.swap_node(datespos, {name = "air"})
|
||||
for _, itemname in pairs(items) do
|
||||
minetest.add_item(datespos, itemname)
|
||||
end
|
||||
@ -83,7 +83,10 @@ local date_regrow_abm_spec = {
|
||||
interval = moretrees.dates_flower_interval,
|
||||
chance = moretrees.dates_flower_chance,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local dates = minetest.find_nodes_in_area({x=pos.x-2, y=pos.y, z=pos.z-2}, {x=pos.x+2, y=pos.y, z=pos.z+2}, "group:moretrees_dates")
|
||||
local dates = minetest.find_nodes_in_area(
|
||||
{x=pos.x-2, y=pos.y, z=pos.z-2}, {x=pos.x+2, y=pos.y, z=pos.z+2},
|
||||
"group:moretrees_dates"
|
||||
)
|
||||
|
||||
-- New blossom interval increases exponentially with number of dates already hanging
|
||||
-- In addition: if more dates are hanging, the chance of picking an empty spot decreases as well...
|
||||
@ -228,7 +231,8 @@ local function find_fruit_trunks_near(ftpos, sect)
|
||||
-- Skip the search if it is consuming too much CPU time
|
||||
if sect_search_stats.count > 0 and moretrees.dates_blossom_search_iload > 0
|
||||
and sect_search_stats.sum / sect_search_stats.count > moretrees.dates_blossom_search_time_treshold
|
||||
and t0us - sect_search_stats.last_us < moretrees.dates_blossom_search_iload * (sect_search_stats.sum / sect_search_stats.count) then
|
||||
and t0us - sect_search_stats.last_us < moretrees.dates_blossom_search_iload
|
||||
* (sect_search_stats.sum / sect_search_stats.count) then
|
||||
sect_search_stats.skip = sect_search_stats.skip + 1
|
||||
return nil
|
||||
end
|
||||
@ -481,7 +485,10 @@ local function find_male_blossom_with_ftrunk(fbpos,ftpos)
|
||||
end
|
||||
-- Else do a new search
|
||||
if not mpalms.sect[sect_old] then
|
||||
mpalms.sect[sect_old], fpalms_list, all_mpalms_list = find_fruit_trunks_near(ftpos, {x = (sect_old + 4) % 3 - 1, z = (sect_old + 4) / 3 - 1})
|
||||
mpalms.sect[sect_old], fpalms_list, all_mpalms_list = find_fruit_trunks_near(
|
||||
ftpos,
|
||||
{x = (sect_old + 4) % 3 - 1, z = (sect_old + 4) / 3 - 1}
|
||||
)
|
||||
cache_changed = true
|
||||
if sect_old == 0 then
|
||||
-- Save the results if it is sector 0
|
||||
@ -547,7 +554,7 @@ local dates_growfn = function(pos, elapsed)
|
||||
elseif string.find(node.name, "moretrees:dates_m") then
|
||||
minetest.swap_node(pos, {name="moretrees:dates_n"})
|
||||
else
|
||||
minetest.swap_node(pos, biome_lib.air)
|
||||
minetest.swap_node(pos, {name = "air"})
|
||||
end
|
||||
return
|
||||
elseif node.name == "moretrees:dates_f0" and math.random(100) <= 100 * dates_regrow_prob then
|
||||
@ -587,7 +594,7 @@ local dates_growfn = function(pos, elapsed)
|
||||
elseif string.match(node.name, "n$") then
|
||||
-- Remove stems.
|
||||
if math.random(stems_drop_ichance) == 1 then
|
||||
minetest.swap_node(pos, biome_lib.air)
|
||||
minetest.swap_node(pos, {name = "air"})
|
||||
return "stemdrop"
|
||||
end
|
||||
action = "nostemdrop"
|
||||
|
189
init.lua
189
init.lua
@ -55,13 +55,27 @@ end
|
||||
local worldpath=minetest.get_worldpath()
|
||||
local modpath=minetest.get_modpath("moretrees")
|
||||
|
||||
dofile(modpath.."/default_settings.txt")
|
||||
dofile(modpath.."/settings.lua")
|
||||
|
||||
if io.open(worldpath.."/moretrees_settings.txt","r") then
|
||||
io.close()
|
||||
dofile(worldpath.."/moretrees_settings.txt")
|
||||
end
|
||||
|
||||
-- Validate that if ethereal exists, that it's version is greater than 20220424.
|
||||
-- Lower versions of ethereal clear registered biomes and decorations during
|
||||
-- initialization which results in lost content from this mod (and others)
|
||||
-- depending on where they are in the mod load order.
|
||||
minetest.register_on_mods_loaded(function()
|
||||
if minetest.global_exists("ethereal") then
|
||||
local ethereal_ver = tonumber(ethereal.version)
|
||||
if (ethereal_ver and ethereal_ver < 20220424) then
|
||||
error("[moretrees] The version of ethereal detected can result " ..
|
||||
"in parts of this mod and others disappearing due to mod " ..
|
||||
"load order. Please update ethereal.");
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
-- infinite stacks checking
|
||||
|
||||
@ -95,111 +109,142 @@ dofile(modpath.."/saplings.lua")
|
||||
dofile(modpath.."/crafts.lua")
|
||||
|
||||
-- tree spawning setup
|
||||
moretrees.spawn_beech_object = moretrees.beech_model
|
||||
moretrees.spawn_apple_tree_object = moretrees.apple_tree_model
|
||||
moretrees.spawn_oak_object = moretrees.oak_model
|
||||
moretrees.spawn_sequoia_object = moretrees.sequoia_model
|
||||
moretrees.spawn_palm_object = moretrees.palm_model
|
||||
moretrees.spawn_date_palm_object = moretrees.date_palm_model
|
||||
moretrees.spawn_cedar_object = moretrees.cedar_model
|
||||
moretrees.spawn_rubber_tree_object = moretrees.rubber_tree_model
|
||||
moretrees.spawn_willow_object = moretrees.willow_model
|
||||
moretrees.spawn_birch_object = "moretrees.grow_birch"
|
||||
moretrees.spawn_spruce_object = "moretrees.grow_spruce"
|
||||
moretrees.spawn_jungletree_object = "moretrees.grow_jungletree"
|
||||
moretrees.spawn_fir_object = "moretrees.grow_fir"
|
||||
moretrees.spawn_fir_snow_object = "moretrees.grow_fir_snow"
|
||||
moretrees.spawn_poplar_object = moretrees.poplar_model
|
||||
moretrees.spawn_poplar_small_object = moretrees.poplar_small_model
|
||||
|
||||
if moretrees.spawn_saplings then
|
||||
moretrees.spawn_beech_object = "moretrees:beech_sapling_ongen"
|
||||
moretrees.spawn_apple_tree_object = "moretrees:apple_tree_sapling_ongen"
|
||||
moretrees.spawn_oak_object = "moretrees:oak_sapling_ongen"
|
||||
moretrees.spawn_sequoia_object = "moretrees:sequoia_sapling_ongen"
|
||||
moretrees.spawn_palm_object = "moretrees:palm_sapling_ongen"
|
||||
moretrees.spawn_date_palm_object = "moretrees:date_palm_sapling_ongen"
|
||||
moretrees.spawn_cedar_object = "moretrees:cedar_sapling_ongen"
|
||||
moretrees.spawn_rubber_tree_object = "moretrees:rubber_tree_sapling_ongen"
|
||||
moretrees.spawn_willow_object = "moretrees:willow_sapling_ongen"
|
||||
moretrees.spawn_birch_object = "moretrees:birch_sapling_ongen"
|
||||
moretrees.spawn_spruce_object = "moretrees:spruce_sapling_ongen"
|
||||
moretrees.spawn_jungletree_object = "moretrees:jungletree_sapling_ongen"
|
||||
moretrees.spawn_fir_object = "moretrees:fir_sapling_ongen"
|
||||
moretrees.spawn_fir_snow_object = "snow:sapling_pine"
|
||||
moretrees.spawn_poplar_object = "moretrees:poplar_sapling_ongen"
|
||||
moretrees.spawn_poplar_small_object = "moretrees:poplar_small_sapling_ongen"
|
||||
else
|
||||
moretrees.spawn_beech_object = moretrees.beech_model
|
||||
moretrees.spawn_apple_tree_object = moretrees.apple_tree_model
|
||||
moretrees.spawn_oak_object = moretrees.oak_model
|
||||
moretrees.spawn_sequoia_object = moretrees.sequoia_model
|
||||
moretrees.spawn_palm_object = moretrees.palm_model
|
||||
moretrees.spawn_date_palm_object = moretrees.date_palm_model
|
||||
moretrees.spawn_cedar_object = moretrees.cedar_model
|
||||
moretrees.spawn_rubber_tree_object = moretrees.rubber_tree_model
|
||||
moretrees.spawn_willow_object = moretrees.willow_model
|
||||
moretrees.spawn_birch_object = "moretrees.grow_birch"
|
||||
moretrees.spawn_spruce_object = "moretrees.grow_spruce"
|
||||
moretrees.spawn_jungletree_object = "moretrees.grow_jungletree"
|
||||
moretrees.spawn_fir_object = "moretrees.grow_fir"
|
||||
moretrees.spawn_fir_snow_object = "moretrees.grow_fir_snow"
|
||||
moretrees.spawn_poplar_object = moretrees.poplar_model
|
||||
moretrees.spawn_poplar_small_object = moretrees.poplar_small_model
|
||||
local deco_ids = {}
|
||||
|
||||
function translate_biome_defs(def, treename, index)
|
||||
if not index then index = 1 end
|
||||
local deco_def = {
|
||||
name = treename .. "_" .. index,
|
||||
deco_type = "simple",
|
||||
place_on = def.place_on or def.surface,
|
||||
sidelen = 16,
|
||||
fill_ratio = def.fill_ratio or 0.001,
|
||||
--biomes eventually?
|
||||
y_min = def.min_elevation,
|
||||
y_max = def.max_elevation,
|
||||
spawn_by = def.near_nodes,
|
||||
num_spawn_by = def.near_nodes_count,
|
||||
decoration = "moretrees:"..treename.."_sapling_ongen"
|
||||
}
|
||||
|
||||
deco_ids[#deco_ids+1] = treename .. ("_" .. index or "_1")
|
||||
|
||||
return deco_def
|
||||
end
|
||||
|
||||
if moretrees.enable_beech then
|
||||
biome_lib:register_generate_plant(moretrees.beech_biome, moretrees.spawn_beech_object)
|
||||
minetest.register_decoration(translate_biome_defs(moretrees.beech_biome, "beech"))
|
||||
end
|
||||
|
||||
if moretrees.enable_apple_tree then
|
||||
biome_lib:register_generate_plant(moretrees.apple_tree_biome, moretrees.spawn_apple_tree_object)
|
||||
minetest.register_decoration(translate_biome_defs(moretrees.apple_tree_biome, "apple_tree"))
|
||||
end
|
||||
|
||||
if moretrees.enable_oak then
|
||||
biome_lib:register_generate_plant(moretrees.oak_biome, moretrees.spawn_oak_object)
|
||||
minetest.register_decoration(translate_biome_defs(moretrees.oak_biome, "oak"))
|
||||
end
|
||||
|
||||
if moretrees.enable_sequoia then
|
||||
biome_lib:register_generate_plant(moretrees.sequoia_biome, moretrees.spawn_sequoia_object)
|
||||
minetest.register_decoration(translate_biome_defs(moretrees.sequoia_biome, "sequoia"))
|
||||
end
|
||||
|
||||
if moretrees.enable_palm then
|
||||
biome_lib:register_generate_plant(moretrees.palm_biome, moretrees.spawn_palm_object)
|
||||
minetest.register_decoration(translate_biome_defs(moretrees.palm_biome, "palm"))
|
||||
end
|
||||
|
||||
if moretrees.enable_date_palm then
|
||||
biome_lib:register_generate_plant(moretrees.date_palm_biome, moretrees.spawn_date_palm_object)
|
||||
biome_lib:register_generate_plant(moretrees.date_palm_biome_2, moretrees.spawn_date_palm_object)
|
||||
minetest.register_decoration(translate_biome_defs(moretrees.date_palm_biome, "date_palm", 1))
|
||||
minetest.register_decoration(translate_biome_defs(moretrees.date_palm_biome_2, "date_palm", 2))
|
||||
end
|
||||
|
||||
if moretrees.enable_cedar then
|
||||
biome_lib:register_generate_plant(moretrees.cedar_biome, moretrees.spawn_cedar_object)
|
||||
minetest.register_decoration(translate_biome_defs(moretrees.cedar_biome, "cedar"))
|
||||
end
|
||||
|
||||
if moretrees.enable_rubber_tree then
|
||||
biome_lib:register_generate_plant(moretrees.rubber_tree_biome, moretrees.spawn_rubber_tree_object)
|
||||
minetest.register_decoration(translate_biome_defs(moretrees.rubber_tree_biome, "rubber_tree"))
|
||||
end
|
||||
|
||||
if moretrees.enable_willow then
|
||||
biome_lib:register_generate_plant(moretrees.willow_biome, moretrees.spawn_willow_object)
|
||||
minetest.register_decoration(translate_biome_defs(moretrees.willow_biome, "willow"))
|
||||
end
|
||||
|
||||
if moretrees.enable_birch then
|
||||
biome_lib:register_generate_plant(moretrees.birch_biome, moretrees.spawn_birch_object)
|
||||
minetest.register_decoration(translate_biome_defs(moretrees.birch_biome, "birch"))
|
||||
end
|
||||
|
||||
if moretrees.enable_spruce then
|
||||
biome_lib:register_generate_plant(moretrees.spruce_biome, moretrees.spawn_spruce_object)
|
||||
minetest.register_decoration(translate_biome_defs(moretrees.spruce_biome, "spruce"))
|
||||
end
|
||||
|
||||
if moretrees.enable_jungle_tree then
|
||||
biome_lib:register_generate_plant(moretrees.jungletree_biome, moretrees.spawn_jungletree_object)
|
||||
minetest.register_decoration(translate_biome_defs(moretrees.jungletree_biome, "jungletree"))
|
||||
end
|
||||
|
||||
if moretrees.enable_fir then
|
||||
biome_lib:register_generate_plant(moretrees.fir_biome, moretrees.spawn_fir_object)
|
||||
minetest.register_decoration(translate_biome_defs(moretrees.fir_biome, "fir", 1))
|
||||
if minetest.get_modpath("snow") then
|
||||
biome_lib:register_generate_plant(moretrees.fir_biome_snow, moretrees.spawn_fir_snow_object)
|
||||
minetest.register_decoration(translate_biome_defs(moretrees.fir_biome_snow, "fir", 2))
|
||||
end
|
||||
end
|
||||
|
||||
if moretrees.enable_poplar then
|
||||
biome_lib:register_generate_plant(moretrees.poplar_biome, moretrees.spawn_poplar_object)
|
||||
biome_lib:register_generate_plant(moretrees.poplar_biome_2, moretrees.spawn_poplar_object)
|
||||
biome_lib:register_generate_plant(moretrees.poplar_biome_3, moretrees.spawn_poplar_object)
|
||||
biome_lib:register_generate_plant(moretrees.poplar_small_biome, moretrees.spawn_poplar_small_object)
|
||||
biome_lib:register_generate_plant(moretrees.poplar_small_biome_2, moretrees.spawn_poplar_small_object)
|
||||
minetest.register_decoration(translate_biome_defs(moretrees.poplar_biome, "poplar", 1))
|
||||
minetest.register_decoration(translate_biome_defs(moretrees.poplar_biome_2, "poplar", 2))
|
||||
minetest.register_decoration(translate_biome_defs(moretrees.poplar_biome_3, "poplar", 3))
|
||||
minetest.register_decoration(translate_biome_defs(moretrees.poplar_small_biome, "poplar_small", 4))
|
||||
minetest.register_decoration(translate_biome_defs(moretrees.poplar_small_biome_2, "poplar_small", 5))
|
||||
end
|
||||
|
||||
--[[
|
||||
this is purposefully wrapped in a on mods loaded callback to that it gets the proper ids
|
||||
if other mods clear the registered decorations
|
||||
]]
|
||||
minetest.register_on_mods_loaded(function()
|
||||
for k, v in pairs(deco_ids) do
|
||||
deco_ids[k] = minetest.get_decoration_id(v)
|
||||
end
|
||||
minetest.set_gen_notify("decoration", deco_ids)
|
||||
end)
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, blockseed)
|
||||
local g = minetest.get_mapgen_object("gennotify")
|
||||
local locations = {}
|
||||
for _, id in pairs(deco_ids) do
|
||||
local deco_locations = g["decoration#" .. id] or {}
|
||||
for _, pos in pairs(deco_locations) do
|
||||
locations[#locations+1] = pos
|
||||
end
|
||||
end
|
||||
|
||||
if #locations == 0 then return end
|
||||
for _, pos in ipairs(locations) do
|
||||
local timer = minetest.get_node_timer({x=pos.x, y=pos.y+1, z=pos.z})
|
||||
timer:start(math.random(2,10))
|
||||
end
|
||||
end)
|
||||
|
||||
-- Code to spawn a birch tree
|
||||
|
||||
function moretrees.grow_birch(pos)
|
||||
minetest.swap_node(pos, biome_lib.air)
|
||||
minetest.swap_node(pos, {name = "air"})
|
||||
if math.random(1,2) == 1 then
|
||||
minetest.spawn_tree(pos, moretrees.birch_model1)
|
||||
else
|
||||
@ -210,7 +255,7 @@ end
|
||||
-- Code to spawn a spruce tree
|
||||
|
||||
function moretrees.grow_spruce(pos)
|
||||
minetest.swap_node(pos, biome_lib.air)
|
||||
minetest.swap_node(pos, {name = "air"})
|
||||
if math.random(1,2) == 1 then
|
||||
minetest.spawn_tree(pos, moretrees.spruce_model1)
|
||||
else
|
||||
@ -225,6 +270,7 @@ moretrees.jt_rules_a1 = "FFF[&&-FBf[&&&Ff]^^^Ff][&&+FBFf[&&&FFf]^^^Ff][&&---FBFf
|
||||
moretrees.jt_rules_b1 = "[-Ff&f][+Ff&f]B"
|
||||
|
||||
moretrees.jt_axiom2 = "FFFFFA"
|
||||
-- luacheck: no max line length
|
||||
moretrees.jt_rules_a2 = "FFFFF[&&-FFFBF[&&&FFff]^^^FFf][&&+FFFBFF[&&&FFff]^^^FFf][&&---FFFBFF[&&&FFff]^^^FFf][&&+++FFFBFF[&&&FFff]^^^FFf]FF/A"
|
||||
moretrees.jt_rules_b2 = "[-FFf&ff][+FFf&ff]B"
|
||||
|
||||
@ -264,10 +310,13 @@ function moretrees.grow_jungletree(pos)
|
||||
moretrees.jungletree_model.rules_b = moretrees.jt_rules_b2
|
||||
end
|
||||
|
||||
minetest.swap_node(pos, biome_lib.air)
|
||||
local leaves = minetest.find_nodes_in_area({x = pos.x-1, y = pos.y, z = pos.z-1}, {x = pos.x+1, y = pos.y+10, z = pos.z+1}, "default:leaves")
|
||||
minetest.swap_node(pos, {name = "air"})
|
||||
local leaves = minetest.find_nodes_in_area(
|
||||
{x = pos.x-1, y = pos.y, z = pos.z-1}, {x = pos.x+1, y = pos.y+10, z = pos.z+1},
|
||||
"default:leaves"
|
||||
)
|
||||
for leaf in ipairs(leaves) do
|
||||
minetest.swap_node(leaves[leaf], biome_lib.air)
|
||||
minetest.swap_node(leaves[leaf], {name = "air"})
|
||||
end
|
||||
minetest.spawn_tree(pos, moretrees.jungletree_model)
|
||||
end
|
||||
@ -291,10 +340,14 @@ function moretrees.grow_fir(pos)
|
||||
moretrees.fir_model.iterations = 7
|
||||
moretrees.fir_model.random_level = 5
|
||||
|
||||
minetest.swap_node(pos, biome_lib.air)
|
||||
local leaves = minetest.find_nodes_in_area({x = pos.x, y = pos.y, z = pos.z}, {x = pos.x, y = pos.y+5, z = pos.z}, "default:leaves")
|
||||
minetest.swap_node(pos, {name = "air"})
|
||||
local leaves = minetest.find_nodes_in_area(
|
||||
{x = pos.x, y = pos.y, z = pos.z},
|
||||
{x = pos.x, y = pos.y+5, z = pos.z},
|
||||
"default:leaves"
|
||||
)
|
||||
for leaf in ipairs(leaves) do
|
||||
minetest.swap_node(leaves[leaf], biome_lib.air)
|
||||
minetest.swap_node(leaves[leaf], {name = "air"})
|
||||
end
|
||||
minetest.spawn_tree(pos,moretrees.fir_model)
|
||||
end
|
||||
@ -318,10 +371,14 @@ function moretrees.grow_fir_snow(pos)
|
||||
moretrees.fir_model.iterations = 2
|
||||
moretrees.fir_model.random_level = 2
|
||||
|
||||
minetest.swap_node(pos, biome_lib.air)
|
||||
local leaves = minetest.find_nodes_in_area({x = pos.x, y = pos.y, z = pos.z}, {x = pos.x, y = pos.y+5, z = pos.z}, "default:leaves")
|
||||
minetest.swap_node(pos, {name = "air"})
|
||||
local leaves = minetest.find_nodes_in_area(
|
||||
{x = pos.x, y = pos.y, z = pos.z},
|
||||
{x = pos.x, y = pos.y+5, z = pos.z},
|
||||
"default:leaves"
|
||||
)
|
||||
for leaf in ipairs(leaves) do
|
||||
minetest.swap_node(leaves[leaf], biome_lib.air)
|
||||
minetest.swap_node(leaves[leaf], {name = "air"})
|
||||
end
|
||||
minetest.spawn_tree(pos,moretrees.fir_model)
|
||||
end
|
||||
|
@ -1,11 +1,11 @@
|
||||
# textdomain: moretrees
|
||||
# Translation by Carlos Barraza
|
||||
# Translation by Carlos Barraza, improvements by David Leal.
|
||||
|
||||
|
||||
### cocos_palm.lua ###
|
||||
|
||||
Coconut=Coco
|
||||
Coconut Flower=
|
||||
Coconut Flower=Flor de Coco
|
||||
|
||||
### crafts.lua ###
|
||||
|
||||
@ -17,8 +17,8 @@ Date & nut snack=Datilera y Nueces
|
||||
Date-nut cake=Pastel de Datilera
|
||||
Date-nut cake batter=Pasta de torta de Datilera
|
||||
Date-nut energy bar=Barra energetica de Datilera
|
||||
Raw Coconut=Coco crudo
|
||||
Roasted Cedar Cone Nuts=Coco de Alamo Tostado
|
||||
Raw Coconut=Coco Crudo
|
||||
Roasted Cedar Cone Nuts=Coco de Álamo Tostado
|
||||
Roasted Fir Cone Nuts=Cono de Abeto Tostado
|
||||
Roasted Spruce Cone Nuts=Cono de Picea Tostado
|
||||
|
||||
@ -30,182 +30,182 @@ Dates=Datilera
|
||||
|
||||
### node_defs.lua ###
|
||||
|
||||
@1 (fast growth)=
|
||||
@1 (fast growth)=@1 (crecimiento rápido)
|
||||
Acorn=Bellota
|
||||
Apple Tree=
|
||||
Apple Tree Fence=
|
||||
Apple Tree Fence Gate=
|
||||
Apple Tree Fence Rail=
|
||||
Apple Tree Leaves=Hojas de Arbol de Manzana
|
||||
Apple Tree Planks=Madera de Arbol de Manzana
|
||||
Apple Tree Planks Slab=
|
||||
Apple Tree Planks Stair=
|
||||
Apple Tree Sapling=Retoño de Arbol de Manzana
|
||||
Apple Tree Trunk=Tronco de Arbol de Manzana
|
||||
Apple Tree Trunk Slab=
|
||||
Apple Tree Trunk Stair=
|
||||
Beech Tree=
|
||||
Beech Tree Fence=
|
||||
Beech Tree Fence Gate=
|
||||
Beech Tree Fence Rail=
|
||||
Apple Tree=Árbol de manzana
|
||||
Apple Tree Fence=Valla de manzano
|
||||
Apple Tree Fence Gate=Puerta de Valla de Manzano
|
||||
Apple Tree Fence Rail=Riel de Valla de Manzano
|
||||
Apple Tree Leaves=Hojas de Árbol de Manzana
|
||||
Apple Tree Planks=Madera de Árbol de Manzana
|
||||
Apple Tree Planks Slab=Losa de Tablones de Manzano
|
||||
Apple Tree Planks Stair=Escalera de Tablones de Manzano
|
||||
Apple Tree Sapling=Retoño de Árbol de Manzana
|
||||
Apple Tree Trunk=Tronco de Árbol de Manzana
|
||||
Apple Tree Trunk Slab=Losa de Tronco de Manzano
|
||||
Apple Tree Trunk Stair=Escalera de Tronco de Manzano
|
||||
Beech Tree=Haya
|
||||
Beech Tree Fence=Valla de Haya
|
||||
Beech Tree Fence Gate=Puerta de Valla de Haya
|
||||
Beech Tree Fence Rail=Riel de Valla de Haya
|
||||
Beech Tree Leaves=Hojas de Arbol de Haya
|
||||
Beech Tree Planks=Madera de Arbol de Haya
|
||||
Beech Tree Planks Slab=
|
||||
Beech Tree Planks Stair=
|
||||
Beech Tree Sapling=Retoño de Arbol de Haya
|
||||
Beech Tree Trunk=Tronco de Arbol de Haya
|
||||
Beech Tree Trunk Slab=
|
||||
Beech Tree Trunk Stair=
|
||||
Birch Tree=
|
||||
Birch Tree Fence=
|
||||
Birch Tree Fence Gate=
|
||||
Birch Tree Fence Rail=
|
||||
Beech Tree Planks Slab=Losa de Tablones de Haya
|
||||
Beech Tree Planks Stair=Escalera de Tablones de Haya
|
||||
Beech Tree Sapling=Retoño de Árbol de Haya
|
||||
Beech Tree Trunk=Tronco de Árbol de Haya
|
||||
Beech Tree Trunk Slab=Losa de Tronco de Haya
|
||||
Beech Tree Trunk Stair=Escalera de Tronco de Haya
|
||||
Birch Tree=Abedul
|
||||
Birch Tree Fence=Valla de Abedul
|
||||
Birch Tree Fence Gate=Puerta de Valla de Abedul
|
||||
Birch Tree Fence Rail=Riel de Valla de Abedul
|
||||
Birch Tree Leaves=Hojas de Arbol de Abedul
|
||||
Birch Tree Planks=Madera de Arbol de Abedul
|
||||
Birch Tree Planks Slab=
|
||||
Birch Tree Planks Stair=
|
||||
Birch Tree Sapling=Retoño de Arbol de Abedul
|
||||
Birch Tree Trunk=Tronco de Arbol de Abedul
|
||||
Birch Tree Trunk Slab=
|
||||
Birch Tree Trunk Stair=
|
||||
Cedar Cone=Coco de Alamo
|
||||
Cedar Tree=
|
||||
Cedar Tree Fence=
|
||||
Cedar Tree Fence Gate=
|
||||
Cedar Tree Fence Rail=
|
||||
Cedar Tree Leaves=Hojas de Arbol de Cedro
|
||||
Cedar Tree Planks=Madera de Arbol de Cedro
|
||||
Cedar Tree Planks Slab=
|
||||
Cedar Tree Planks Stair=
|
||||
Cedar Tree Sapling=Retoño de Arbol de Cedro
|
||||
Cedar Tree Trunk=Tronco de Arbol de Cedro
|
||||
Cedar Tree Trunk Slab=
|
||||
Cedar Tree Trunk Stair=
|
||||
Date Palm Tree=
|
||||
Date Palm Tree Fence=
|
||||
Date Palm Tree Fence Gate=
|
||||
Date Palm Tree Fence Rail=
|
||||
Date Palm Tree Leaves=
|
||||
Birch Tree Planks Slab=Losa de Tablones de Abedul
|
||||
Birch Tree Planks Stair=Escalera de Tablones de Abedul
|
||||
Birch Tree Sapling=Retoño de Árbol de Abedul
|
||||
Birch Tree Trunk=Tronco de Árbol de Abedul
|
||||
Birch Tree Trunk Slab=Losa de Tronco de Abedul
|
||||
Birch Tree Trunk Stair=Escalera de Tronco de Abedul
|
||||
Cedar Cone=Coco de Álamo
|
||||
Cedar Tree=Árbol de Cedro
|
||||
Cedar Tree Fence=Valla de Árbol de Cedro
|
||||
Cedar Tree Fence Gate=Puerta de Valla de Árbol de Cedro
|
||||
Cedar Tree Fence Rail=Riel de Valla de Árbol de Cedro
|
||||
Cedar Tree Leaves=Hojas de Árbol de Cedro
|
||||
Cedar Tree Planks=Madera de Árbol de Cedro
|
||||
Cedar Tree Planks Slab=Losa de Tablones de Árbol de Cedro
|
||||
Cedar Tree Planks Stair=Escalera de Tablones de Árbol de Cedro
|
||||
Cedar Tree Sapling=Retoño de Árbol de Cedro
|
||||
Cedar Tree Trunk=Tronco de Árbol de Cedro
|
||||
Cedar Tree Trunk Slab=Losa de Tronco de Árbol de Cedro
|
||||
Cedar Tree Trunk Stair=Escalera de Tronco de Árbol de Cedro
|
||||
Date Palm Tree=Palmera Datilera
|
||||
Date Palm Tree Fence=Valla de Palmera Datilera
|
||||
Date Palm Tree Fence Gate=Puerta de Valla de Palmera Datilera
|
||||
Date Palm Tree Fence Rail=Riel de Valla de Palmera Datilera
|
||||
Date Palm Tree Leaves=Hojas de Palmera Datilera
|
||||
Date Palm Tree Planks=Madera de Palmera Datilera
|
||||
Date Palm Tree Planks Slab=
|
||||
Date Palm Tree Planks Stair=
|
||||
Date Palm Tree Sapling=
|
||||
Date Palm Tree Planks Slab=Losa de Tablones de Palmera Datilera
|
||||
Date Palm Tree Planks Stair=Escalera de Tablones de Palmera Datilera
|
||||
Date Palm Tree Sapling=Retoño de Palmera Datilera
|
||||
Date Palm Tree Trunk=Tronco de Palmera Datilera
|
||||
Date Palm Tree Trunk Slab=
|
||||
Date Palm Tree Trunk Stair=
|
||||
Douglas Fir=
|
||||
Douglas Fir Fence=
|
||||
Douglas Fir Fence Gate=
|
||||
Douglas Fir Fence Rail=
|
||||
Douglas Fir Leaves=Hojas de Arbol de Abeto de Douglas
|
||||
Douglas Fir Leaves (Bright)=Hojas de Arbol de Abeto de Douglas (Brillante)
|
||||
Douglas Fir Planks=Madera de Arbol de Abeto de Douglas
|
||||
Douglas Fir Planks Slab=
|
||||
Douglas Fir Planks Stair=
|
||||
Douglas Fir Sapling=Retoño de Arbol de Abeto de Douglas
|
||||
Douglas Fir Trunk=Tronco de Arbol de Abeto de Douglas
|
||||
Douglas Fir Trunk Slab=
|
||||
Douglas Fir Trunk Stair=
|
||||
Date Palm Tree Trunk Slab=Losa de Tronco de Palmera Datilera
|
||||
Date Palm Tree Trunk Stair=Escalera de Tronco de Palmera Datilera
|
||||
Douglas Fir=Árbol de Abeto de Douglas
|
||||
Douglas Fir Fence=Valla de Árbol de Abeto de Douglas
|
||||
Douglas Fir Fence Gate=Puerta de Valla de Árbol de Abeto de Douglas
|
||||
Douglas Fir Fence Rail=Riel de Valla de Árbol de Abeto de Douglas
|
||||
Douglas Fir Leaves=Hojas de Árbol de Abeto de Douglas
|
||||
Douglas Fir Leaves (Bright)=Hojas de Árbol de Abeto de Douglas (Brillante)
|
||||
Douglas Fir Planks=Madera de Árbol de Abeto de Douglas
|
||||
Douglas Fir Planks Slab=Losa de Tablones de Árbol de Abeto de Douglas
|
||||
Douglas Fir Planks Stair=Escalera de Tablones de Árbol de Abeto de Douglas
|
||||
Douglas Fir Sapling=Retoño de Árbol de Abeto de Douglas
|
||||
Douglas Fir Trunk=Tronco de Árbol de Abeto de Douglas
|
||||
Douglas Fir Trunk Slab=Losa de Tronco de Árbol de Abeto de Douglas
|
||||
Douglas Fir Trunk Stair=Escalera de Tronco de Árbol de Abeto de Douglas
|
||||
Fir Cone=Coco de Abeto
|
||||
Giant Sequoia=
|
||||
Giant Sequoia Fence=
|
||||
Giant Sequoia Fence Gate=
|
||||
Giant Sequoia Fence Rail=
|
||||
Giant Sequoia Leaves=Hojas de Sequoia Gigante
|
||||
Giant Sequoia Planks=Madera de Sequoia Gigante
|
||||
Giant Sequoia Planks Slab=
|
||||
Giant Sequoia Planks Stair=
|
||||
Giant Sequoia Sapling=Retoño de Arbol de Sequoia Gigante
|
||||
Giant Sequoia Trunk=Tronco de Sequoia Gigante
|
||||
Giant Sequoia Trunk Slab=
|
||||
Giant Sequoia Trunk Stair=
|
||||
Jungle Tree=Tronco de Arbol de Arbol de la Selva
|
||||
Jungle Tree Fence=
|
||||
Jungle Tree Fence Gate=
|
||||
Jungle Tree Fence Rail=
|
||||
Jungle Tree Leaves=Hojas de Arbol de la Selva
|
||||
Jungle Tree Leaves (@1)=Hojas de Arbol de la Selva (@1)
|
||||
Jungle Tree Planks=
|
||||
Jungle Tree Planks Slab=
|
||||
Jungle Tree Planks Stair=
|
||||
Jungle Tree Sapling=
|
||||
Jungle Tree Trunk=
|
||||
Jungle Tree Trunk Slab=
|
||||
Jungle Tree Trunk Stair=
|
||||
Oak Tree=
|
||||
Oak Tree Fence=
|
||||
Oak Tree Fence Gate=
|
||||
Oak Tree Fence Rail=
|
||||
Oak Tree Leaves=Hojas de Arbol de Roble
|
||||
Oak Tree Planks=Madera de Arbol de Roble
|
||||
Oak Tree Planks Slab=
|
||||
Oak Tree Planks Stair=
|
||||
Oak Tree Sapling=Retoño de Arbol de Roble
|
||||
Oak Tree Trunk=Tronco de Arbol de Roble
|
||||
Oak Tree Trunk Slab=
|
||||
Oak Tree Trunk Stair=
|
||||
Palm Tree=
|
||||
Palm Tree Fence=
|
||||
Palm Tree Fence Gate=
|
||||
Palm Tree Fence Rail=
|
||||
Giant Sequoia=Secuoya Gigante
|
||||
Giant Sequoia Fence=Valla de Secuoya Gigante
|
||||
Giant Sequoia Fence Gate=Puerta de Valla de Secuoya Gigante
|
||||
Giant Sequoia Fence Rail=Riel de Valla de Secuoya Gigante
|
||||
Giant Sequoia Leaves=Hojas de Secuoya Gigante
|
||||
Giant Sequoia Planks=Madera de Secuoya Gigante
|
||||
Giant Sequoia Planks Slab=Losa de Tablones de Secuoya Gigante
|
||||
Giant Sequoia Planks Stair=Escalera de Tablones de Secuoya Gigante
|
||||
Giant Sequoia Sapling=Retoño de Árbol de Secuoya Gigante
|
||||
Giant Sequoia Trunk=Tronco de Secuoya Gigante
|
||||
Giant Sequoia Trunk Slab=Losa de Tronco de Secuoya Gigante
|
||||
Giant Sequoia Trunk Stair=Escalera de Tronco de Secuoya Gigante
|
||||
Jungle Tree=Árbol de la Selva
|
||||
Jungle Tree Fence=Valla de Árbol de la Selva
|
||||
Jungle Tree Fence Gate=Puerta de Valla de Árbol de la Selva
|
||||
Jungle Tree Fence Rail=Riel de Valla de Árbol de la Selva
|
||||
Jungle Tree Leaves=Hojas de Árbol de la Selva
|
||||
Jungle Tree Leaves (@1)=Hojas de Árbol de la Selva (@1)
|
||||
Jungle Tree Planks=Madera de Árbol de la Selva
|
||||
Jungle Tree Planks Slab=Losa de Tablones de Árbol de la Selva
|
||||
Jungle Tree Planks Stair=Escalera de Tablones de Árbol de la Selva
|
||||
Jungle Tree Sapling=Retoño de Árbol de la Selva
|
||||
Jungle Tree Trunk=Tronco de Árbol de Árbol de la Selva
|
||||
Jungle Tree Trunk Slab=Losa de Tronco de Árbol de la Selva
|
||||
Jungle Tree Trunk Stair=Escalera de Tronco de Árbol de la Selva
|
||||
Oak Tree=Árbol de Roble
|
||||
Oak Tree Fence=Valla de Árbol de Roble
|
||||
Oak Tree Fence Gate=Puerta de Valla de Árbol de Roble
|
||||
Oak Tree Fence Rail=Riel de Valla de Árbol de Roble
|
||||
Oak Tree Leaves=Hojas de Árbol de Roble
|
||||
Oak Tree Planks=Madera de Árbol de Roble
|
||||
Oak Tree Planks Slab=Losa de Tablones de Árbol de Roble
|
||||
Oak Tree Planks Stair=Escalera de Tablones de Árbol de Roble
|
||||
Oak Tree Sapling=Retoño de Árbol de Roble
|
||||
Oak Tree Trunk=Tronco de Árbol de Roble
|
||||
Oak Tree Trunk Slab=Losa de Tronco de Árbol de Roble
|
||||
Oak Tree Trunk Stair=Escalera de Tronco de Árbol de Roble
|
||||
Palm Tree=Palmera
|
||||
Palm Tree Fence=Valla de Palmera
|
||||
Palm Tree Fence Gate=Puerta de Valla de Palmera
|
||||
Palm Tree Fence Rail=Riel de Valla de Palmera
|
||||
Palm Tree Leaves=Hojas de Palmera
|
||||
Palm Tree Planks=Madera de Palmera
|
||||
Palm Tree Planks Slab=
|
||||
Palm Tree Planks Stair=
|
||||
Palm Tree Planks Slab=Losa de Tablones de Palmera
|
||||
Palm Tree Planks Stair=Escalera de Tablones de Palmera
|
||||
Palm Tree Sapling=Retoño de Palmera
|
||||
Palm Tree Trunk=Tronco de Palmera
|
||||
Palm Tree Trunk Slab=
|
||||
Palm Tree Trunk Stair=
|
||||
Poplar Tree=
|
||||
Poplar Tree Fence=
|
||||
Poplar Tree Fence Gate=
|
||||
Poplar Tree Fence Rail=
|
||||
Palm Tree Trunk Slab=Losa de Troncos de Palmera
|
||||
Palm Tree Trunk Stair=Escalera de Troncos de Palmera
|
||||
Poplar Tree=Árbol de Alamo
|
||||
Poplar Tree Fence=Valla de Árbol de Alamo
|
||||
Poplar Tree Fence Gate=Puerta de Valla de Árbol de Alamo
|
||||
Poplar Tree Fence Rail=Riel de Valla de Árbol de Alamo
|
||||
Poplar Tree Leaves=Hojas de Arbol de Alamo
|
||||
Poplar Tree Planks=Madera de Arbol de Alamo
|
||||
Poplar Tree Planks Slab=
|
||||
Poplar Tree Planks Stair=
|
||||
Poplar Tree Sapling=Retoño de Arbol de Alamo
|
||||
Poplar Tree Trunk=Tronco de Arbol de Alamo
|
||||
Poplar Tree Trunk Slab=
|
||||
Poplar Tree Trunk Stair=
|
||||
Red=Roja
|
||||
Rubber Tree=
|
||||
Rubber Tree Fence=
|
||||
Rubber Tree Fence Gate=
|
||||
Rubber Tree Fence Rail=
|
||||
Rubber Tree Leaves=Hojas de Arbol de Arbol de Goma
|
||||
Rubber Tree Planks=Madera de Arbol de Arbol de Goma
|
||||
Rubber Tree Planks Slab=
|
||||
Rubber Tree Planks Stair=
|
||||
Rubber Tree Sapling=Retoño de Arbol de Arbol de Goma
|
||||
Rubber Tree Trunk=Tronco de Arbol de Arbol de Goma
|
||||
Rubber Tree Trunk (Empty)=Tronco de Arbol de Goma (Vacio)
|
||||
Rubber Tree Trunk Slab=
|
||||
Rubber Tree Trunk Stair=
|
||||
Small poplar Tree Sapling=
|
||||
Poplar Tree Planks=Madera de Árbol de Alamo
|
||||
Poplar Tree Planks Slab=Losa de Tablones de Árbol de Alamo
|
||||
Poplar Tree Planks Stair=Escalera de Tablones de Árbol de Alamo
|
||||
Poplar Tree Sapling=Retoño de Árbol de Alamo
|
||||
Poplar Tree Trunk=Tronco de Árbol de Alamo
|
||||
Poplar Tree Trunk Slab=Losa de Tronco de Árbol de Alamo
|
||||
Poplar Tree Trunk Stair=Escalera de Tronco de Árbol de Alamo
|
||||
Red=Rojo
|
||||
Rubber Tree=Árbol del Caucho
|
||||
Rubber Tree Fence=Valla de Árbol del Caucho
|
||||
Rubber Tree Fence Gate=Puerta de Valla de Árbol del Caucho
|
||||
Rubber Tree Fence Rail=Riel de Valla de Árbol del Caucho
|
||||
Rubber Tree Leaves=Hojas de Árbol de Árbol del Caucho
|
||||
Rubber Tree Planks=Madera de Árbol de Árbol del Caucho
|
||||
Rubber Tree Planks Slab=Losa de Tablones de Árbol del Caucho
|
||||
Rubber Tree Planks Stair=Escalera de Tablones de Árbol del Caucho
|
||||
Rubber Tree Sapling=Retoño de Árbol de Árbol del Caucho
|
||||
Rubber Tree Trunk=Tronco de Árbol de Árbol del Caucho
|
||||
Rubber Tree Trunk (Empty)=Tronco de Árbol del Caucho (Vacío)
|
||||
Rubber Tree Trunk Slab=Losa de Tronco de Árbol del Caucho
|
||||
Rubber Tree Trunk Stair=Escalera de Tronco de Árbol del Caucho
|
||||
Small poplar Tree Sapling=Pequeño Retoño de Álamo
|
||||
Spruce Cone=Coco de Picea
|
||||
Spruce Tree=
|
||||
Spruce Tree Fence=
|
||||
Spruce Tree Fence Gate=
|
||||
Spruce Tree Fence Rail=
|
||||
Spruce Tree Leaves=Hojas de Arbol de Abeto
|
||||
Spruce Tree Planks=Madera de Arbol de Abeto
|
||||
Spruce Tree Planks Slab=
|
||||
Spruce Tree Planks Stair=
|
||||
Spruce Tree Sapling=Retoño de Arbol de Abeto
|
||||
Spruce Tree Trunk=Tronco de Arbol de Abeto
|
||||
Spruce Tree Trunk Slab=
|
||||
Spruce Tree Trunk Stair=
|
||||
Willow Tree=
|
||||
Willow Tree Fence=
|
||||
Willow Tree Fence Gate=
|
||||
Willow Tree Fence Rail=
|
||||
Willow Tree Leaves=Hojas de Arbol de Sauce
|
||||
Willow Tree Planks=Madera de Arbol de Sauce
|
||||
Willow Tree Planks Slab=
|
||||
Willow Tree Planks Stair=
|
||||
Willow Tree Sapling=Retoño de Arbol de Sauce
|
||||
Willow Tree Trunk=Tronco de Arbol de Sauce
|
||||
Willow Tree Trunk Slab=
|
||||
Willow Tree Trunk Stair=
|
||||
Yellow=Amarilla
|
||||
Spruce Tree=Árbol de Abeto
|
||||
Spruce Tree Fence=Valla de Árbol de Abeto
|
||||
Spruce Tree Fence Gate=Puerta de Valla de Árbol de Abeto
|
||||
Spruce Tree Fence Rail=Riel de Valla de Árbol de Abeto
|
||||
Spruce Tree Leaves=Hojas de Árbol de Abeto
|
||||
Spruce Tree Planks=Madera de Árbol de Abeto
|
||||
Spruce Tree Planks Slab=Losa de Tablones de Árbol de Abeto
|
||||
Spruce Tree Planks Stair=Escalera de Tablones de Árbol de Abeto
|
||||
Spruce Tree Sapling=Retoño de Árbol de Abeto
|
||||
Spruce Tree Trunk=Tronco de Árbol de Abeto
|
||||
Spruce Tree Trunk Slab=Losa de Tronco de Árbol de Abeto
|
||||
Spruce Tree Trunk Stair=Escalera de Tronco de Árbol de Abeto
|
||||
Willow Tree=Árbol de Sauce
|
||||
Willow Tree Fence=Valla de Árbol de Sauce
|
||||
Willow Tree Fence Gate=Puerta de Valla de Árbol de Sauce
|
||||
Willow Tree Fence Rail=Riel de Valla de Árbol de Sauce
|
||||
Willow Tree Leaves=Hojas de Árbol de Sauce
|
||||
Willow Tree Planks=Madera de Árbol de Sauce
|
||||
Willow Tree Planks Slab=Losa de Tablones de Árbol de Sauce
|
||||
Willow Tree Planks Stair=Escalera de Tablones de Árbol de Sauce
|
||||
Willow Tree Sapling=Retoño de Árbol de Sauce
|
||||
Willow Tree Trunk=Tronco de Árbol de Sauce
|
||||
Willow Tree Trunk Slab=Losa de Tronco de Árbol de Sauce
|
||||
Willow Tree Trunk Stair=Escalera de Tronco de Árbol de Sauce
|
||||
Yellow=Amarillo
|
||||
|
2
mod.conf
2
mod.conf
@ -1,4 +1,4 @@
|
||||
name = moretrees
|
||||
depends = default, biome_lib, vessels
|
||||
depends = default, vessels
|
||||
optional_depends = doors, stairs, moreblocks, farming
|
||||
min_minetest_version = 5.2.0
|
||||
|
193
node_defs.lua
193
node_defs.lua
@ -5,19 +5,19 @@ moretrees.avoidnodes = {}
|
||||
moretrees.treelist = {
|
||||
{"beech", S("Beech Tree")},
|
||||
{"apple_tree", S("Apple Tree")},
|
||||
{"oak", S("Oak Tree"), "acorn", S("Acorn"), {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
|
||||
{"oak", S("Oak Tree"), "acorn", S("Acorn"), {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
|
||||
{"sequoia", S("Giant Sequoia")},
|
||||
{"birch", S("Birch Tree")},
|
||||
{"palm", S("Palm Tree"), "palm_fruit_trunk_gen", S("Palm Tree"), {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 1.0 },
|
||||
{"date_palm", S("Date Palm Tree"), "date_palm_fruit_trunk", S("Date Palm Tree"), {0, 0, 0, 0, 0, 0}, 0.0 },
|
||||
{"spruce", S("Spruce Tree"), "spruce_cone", S("Spruce Cone"), {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
|
||||
{"cedar", S("Cedar Tree"), "cedar_cone", S("Cedar Cone"), {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
|
||||
{"palm", S("Palm Tree"), "palm_fruit_trunk_gen", S("Palm Tree"), {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 1.0 },
|
||||
{"date_palm", S("Date Palm Tree"), "date_palm_fruit_trunk",S("Date Palm Tree"), {0, 0, 0, 0, 0, 0}, 0.0 },
|
||||
{"spruce", S("Spruce Tree"), "spruce_cone", S("Spruce Cone"), {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
|
||||
{"cedar", S("Cedar Tree"), "cedar_cone", S("Cedar Cone"), {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
|
||||
{"poplar", S("Poplar Tree")},
|
||||
{"poplar_small", S("Poplar Tree")},
|
||||
{"willow", S("Willow Tree")},
|
||||
{"rubber_tree", S("Rubber Tree")},
|
||||
{"fir", S("Douglas Fir"), "fir_cone", S("Fir Cone"), {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
|
||||
{"jungletree", S("Jungle Tree"), nil, nil, nil, nil, "default_junglesapling.png" },
|
||||
{"fir", S("Douglas Fir"), "fir_cone", S("Fir Cone"), {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
|
||||
{"jungletree", S("Jungle Tree"), nil, nil, nil, nil, "default_junglesapling.png" },
|
||||
}
|
||||
|
||||
moretrees.treedesc = {
|
||||
@ -265,9 +265,9 @@ for i in ipairs(moretrees.treelist) do
|
||||
decay = moretrees.date_palm_leafdecay_radius
|
||||
end
|
||||
|
||||
if treename ~= "jungletree" -- the default game provides jungle tree and pine trunk/planks nodes.
|
||||
and treename ~= "poplar_small"
|
||||
and treename ~= "pine" then
|
||||
-- dont register planks/nodes for trees from default and small varients for trees
|
||||
local split_tn = treename:split("_")
|
||||
if treename ~= "jungletree" and treename ~= "pine" and split_tn[2]~="small" then
|
||||
|
||||
saptex = "moretrees_"..treename.."_sapling.png"
|
||||
|
||||
@ -293,35 +293,6 @@ for i in ipairs(moretrees.treelist) do
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("moretrees:"..treename.."_sapling", {
|
||||
description = moretrees.treedesc[treename].sapling,
|
||||
drawtype = "plantlike",
|
||||
tiles = {saptex},
|
||||
inventory_image = saptex,
|
||||
paramtype = "light",
|
||||
paramtype2 = "waving",
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
|
||||
},
|
||||
groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1},
|
||||
sounds = default.node_sound_defaults(),
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"moretrees:" ..treename.. "_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -3, y = 1, z = -3},
|
||||
{x = 3, y = 6, z = 3},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
local moretrees_leaves_inventory_image = nil
|
||||
|
||||
if moretrees.plantlike_leaves then
|
||||
@ -444,25 +415,31 @@ for i in ipairs(moretrees.treelist) do
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_node("moretrees:"..treename.."_sapling_ongen", {
|
||||
description = S("@1 (fast growth)", moretrees.treedesc[treename].sapling),
|
||||
drawtype = "plantlike",
|
||||
tiles = {saptex},
|
||||
inventory_image = saptex,
|
||||
paramtype = "light",
|
||||
paramtype2 = "waving",
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
|
||||
},
|
||||
groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1},
|
||||
sounds = default.node_sound_defaults(),
|
||||
drop = "moretrees:"..treename.."_sapling",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
-- the default game provides jungle tree and pine saplings.
|
||||
if treename~="jungletree" and treename ~= "pine" then
|
||||
local regular_groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1}
|
||||
if minetest.settings:get_bool("creative_mode", false) then
|
||||
regular_groups["not_in_creative_inventory"]=1
|
||||
end
|
||||
|
||||
minetest.register_node("moretrees:"..treename.."_sapling", {
|
||||
description = moretrees.treedesc[treename].sapling,
|
||||
drawtype = "plantlike",
|
||||
tiles = {split_tn[2] and split_tn[2]=="small" and "moretrees_" .. treename .. "_sapling.png" or saptex},
|
||||
inventory_image = split_tn[2] and split_tn[2]=="small" and "moretrees_" .. treename .. "_sapling.png" or saptex,
|
||||
paramtype = "light",
|
||||
paramtype2 = "waving",
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
|
||||
},
|
||||
groups = regular_groups,
|
||||
sounds = default.node_sound_defaults(),
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"moretrees:" ..treename.. "_sapling_ongen",
|
||||
"moretrees:" ..treename.. "_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -3, y = 1, z = -3},
|
||||
@ -472,6 +449,75 @@ for i in ipairs(moretrees.treelist) do
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(300)
|
||||
end,
|
||||
on_timer = function(pos, elapsed)
|
||||
if moretrees.can_grow(pos, treename) then
|
||||
--moretrees["grow_" .. treename](pos)
|
||||
minetest.set_node(pos, {name="air"})
|
||||
if type(moretrees["spawn_" .. treename .. "_object"])=="string" then
|
||||
local split = moretrees["spawn_" .. treename .. "_object"]:split(".")
|
||||
moretrees[split[2]](pos)
|
||||
else
|
||||
minetest.spawn_tree(pos, moretrees["spawn_" .. treename .. "_object"])
|
||||
end
|
||||
else
|
||||
minetest.get_node_timer(pos):start(300)
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
local ongen_groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1,not_in_creative_inventory=1}
|
||||
if minetest.settings:get_bool("creative_mode", false) then
|
||||
ongen_groups["not_in_creative_inventory"]=nil
|
||||
end
|
||||
minetest.register_node("moretrees:"..treename.."_sapling_ongen", {
|
||||
description = S("@1 (fast growth)", moretrees.treedesc[treename].sapling),
|
||||
drawtype = "plantlike",
|
||||
tiles = {split_tn[2] and split_tn[2]=="small" and "moretrees_" .. treename .. "_sapling.png" or saptex,},
|
||||
inventory_image = split_tn[2] and split_tn[2]=="small" and "moretrees_" .. treename .. "_sapling.png" or saptex,
|
||||
paramtype = "light",
|
||||
paramtype2 = "waving",
|
||||
walkable = false,
|
||||
is_ground_content = true,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
|
||||
},
|
||||
groups = ongen_groups,
|
||||
sounds = default.node_sound_defaults(),
|
||||
drop = "moretrees:"..treename.."_sapling",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"moretrees:" ..treename.. "_sapling_ongen",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
{x = -3, y = 1, z = -3},
|
||||
{x = 3, y = 6, z = 3},
|
||||
-- maximum interval of interior volume check
|
||||
4)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(2)
|
||||
end,
|
||||
on_timer = function(pos, elapsed)
|
||||
if moretrees.can_grow(pos, treename) then
|
||||
--moretrees["grow_" .. treename](pos)
|
||||
minetest.set_node(pos, {name="air"})
|
||||
if type(moretrees["spawn_" .. treename .. "_object"])=="string" then
|
||||
local split = moretrees["spawn_" .. treename .. "_object"]:split(".")
|
||||
moretrees[split[2]](pos)
|
||||
else
|
||||
minetest.spawn_tree(pos, moretrees["spawn_" .. treename .. "_object"])
|
||||
end
|
||||
else
|
||||
minetest.get_node_timer(pos):start(300)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
local fruitname = nil
|
||||
@ -494,6 +540,11 @@ for i in ipairs(moretrees.treelist) do
|
||||
},
|
||||
groups = {fleshy=3,dig_immediate=3,flammable=2, attached_node=1, leafdecay = 1, leafdecay_drop = 1},
|
||||
sounds = default.node_sound_defaults(),
|
||||
after_place_node = function(pos, placer)
|
||||
if placer:is_player() then
|
||||
minetest.set_node(pos, {name = "moretrees:"..fruit, param2 = 1})
|
||||
end
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
@ -526,33 +577,7 @@ for i in ipairs(moretrees.treelist) do
|
||||
end
|
||||
end
|
||||
|
||||
-- Add small poplar saplings
|
||||
|
||||
local poplar_sapling = minetest.registered_nodes["moretrees:poplar_sapling"]
|
||||
local poplar_sapling_ongen = minetest.registered_nodes["moretrees:poplar_sapling_ongen"]
|
||||
local poplar_small_sapling = {}
|
||||
local poplar_small_sapling_ongen = {}
|
||||
for k,v in pairs(poplar_sapling) do
|
||||
poplar_small_sapling[k] = v
|
||||
end
|
||||
for k,v in pairs(poplar_sapling_ongen) do
|
||||
poplar_small_sapling_ongen[k] = v
|
||||
end
|
||||
poplar_small_sapling.tiles = {"moretrees_poplar_small_sapling.png"}
|
||||
poplar_small_sapling.inventory_image = "moretrees_poplar_small_sapling.png"
|
||||
poplar_small_sapling.is_ground_content = true
|
||||
poplar_small_sapling_ongen.tiles_ongen = {"moretrees_poplar_small_sapling.png"}
|
||||
poplar_small_sapling_ongen.inventory_image_ongen = "moretrees_poplar_small_sapling.png"
|
||||
poplar_small_sapling_ongen.drop = "moretrees:poplar_small_sapling"
|
||||
poplar_small_sapling_ongen.is_ground_content = true
|
||||
|
||||
minetest.register_node("moretrees:poplar_small_sapling", poplar_small_sapling)
|
||||
minetest.register_node("moretrees:poplar_small_sapling_ongen", poplar_small_sapling_ongen)
|
||||
if moretrees.spawn_saplings then
|
||||
table.insert(moretrees.avoidnodes, "moretrees:poplar_sapling")
|
||||
table.insert(moretrees.avoidnodes, "moretrees:poplar_small_sapling_ongen")
|
||||
end
|
||||
|
||||
-- poplar saplings leaves
|
||||
local poplar_leaves_drop = minetest.registered_nodes["moretrees:poplar_leaves"].drop
|
||||
minetest.override_item("moretrees:poplar_leaves", {
|
||||
drop = {
|
||||
|
25
saplings.lua
25
saplings.lua
@ -45,7 +45,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"
|
||||
@ -87,4 +108,4 @@ for i in ipairs(moretrees.treelist) do
|
||||
grow_nodes = surfaces,
|
||||
grow_function = grow_function,
|
||||
})
|
||||
end
|
||||
end ]]
|
||||
|
@ -145,7 +145,8 @@ minetest.register_chatcommand("make-scene", {
|
||||
The following is a search/replace command suitable for vi (/vim) or sed, to convert minetest log
|
||||
messages to equivalent lua commands:
|
||||
|
||||
s/.*\(\(moretrees\|default\)[^ ]*\) at (\([-0-9]\+\),\([-0-9]\+\),\([-0-9]\+\)).*/\t\tminetest.place_node({x=\3, y=\4, z=\5}, {name="\1"})/
|
||||
s/.*\(\(moretrees\|default\)[^ ]*\) at
|
||||
(\([-0-9]\+\),\([-0-9]\+\),\([-0-9]\+\)).*/\t\tminetest.place_node({x=\3, y=\4, z=\5}, {name="\1"})/
|
||||
|
||||
E.g. a minetest log line of the following kind:
|
||||
2016-07-03 11:30:50: ACTION[Server]: singleplayer places node moretrees:rubber_tree_sapling at (760,5,-223)
|
||||
|
79
settings.lua
Normal file
79
settings.lua
Normal file
@ -0,0 +1,79 @@
|
||||
local stg = minetest.settings
|
||||
|
||||
--enable/disable different trees
|
||||
moretrees.enable_apple_tree = stg:get_bool("moretrees.enable_apple_tree", true)
|
||||
moretrees.enable_oak = stg:get_bool("moretrees.enable_oak", true)
|
||||
moretrees.enable_sequoia = stg:get_bool("moretrees.enable_sequoia", true)
|
||||
moretrees.enable_palm = stg:get_bool("moretrees.enable_palm", true)
|
||||
moretrees.enable_date_palm = stg:get_bool("moretrees.enable_date_palm", true)
|
||||
moretrees.enable_cedar = stg:get_bool("moretrees.enable_cedar", true)
|
||||
moretrees.enable_rubber_tree = stg:get_bool("moretrees.enable_rubber_tree", true)
|
||||
moretrees.enable_willow = stg:get_bool("moretrees.enable_willow", true)
|
||||
moretrees.enable_birch = stg:get_bool("moretrees.enable_birch", true)
|
||||
moretrees.enable_spruce = stg:get_bool("moretrees.enable_spruce", true)
|
||||
moretrees.enable_jungle_tree = stg:get_bool("moretrees.enable_jungle_tree", true)
|
||||
moretrees.enable_fir = stg:get_bool("moretrees.enable_fir", true)
|
||||
moretrees.enable_poplar = stg:get_bool("moretrees.enable_poplar", true)
|
||||
moretrees.enable_beech = stg:get_bool("moretrees.enable_beech", false)
|
||||
|
||||
--spawns tree on mapgen as saplings, legacy setting
|
||||
moretrees.spawn_saplings = stg:get_bool("moretrees.spawn_saplings", true)
|
||||
|
||||
--turn on/off stair varients of nodes via moreblocks or the stair api
|
||||
moretrees.enable_stairs = stg:get_bool("moretrees.enable_stairs", true)
|
||||
|
||||
-- If this variable is set to true, register fences for moretrees wood
|
||||
moretrees.enable_fences = stg:get_bool("moretrees.enable_fences", true)
|
||||
|
||||
--enable plantlike drawtype for leaves
|
||||
moretrees.plantlike_leaves = stg:get_bool("moretrees.plantlike_leaves", false)
|
||||
|
||||
-- Enable this if you want moretrees to redefine default apples so that they
|
||||
-- fall when leaves decay/are dug.
|
||||
moretrees.enable_redefine_apple = stg:get_bool("moretrees.enable_redefine_apple", true)
|
||||
|
||||
-- Set this to true to enable leaf decay of all trees except the default ones.
|
||||
moretrees.enable_leafdecay = stg:get_bool("moretrees.enable_leafdecay", true)
|
||||
|
||||
-- various related settings to configure leaf decay.
|
||||
moretrees.leafdecay_delay = tonumber(stg:get("moretrees.leafdecay_delay")) or 2
|
||||
moretrees.leafdecay_chance = tonumber(stg:get("moretrees.leafdecay_chance")) or 5
|
||||
moretrees.leafdecay_radius = tonumber(stg:get("moretrees.leafdecay_radius")) or 5
|
||||
moretrees.palm_leafdecay_radius = tonumber(stg:get("moretrees.palm_leafdecay_radius")) or 10
|
||||
moretrees.date_palm_leafdecay_radius = tonumber(stg:get("moretrees.date_palm_leafdecay_radius")) or 14
|
||||
|
||||
-- Change these settings if you want default trees to be gradually cut down
|
||||
-- above the elevation where firs normally generate.
|
||||
moretrees.firs_remove_default_trees = stg:get_bool("moretrees.firs_remove_default_trees", false)
|
||||
moretrees.firs_remove_interval = tonumber(stg:get("moretrees.firs_remove_interval")) or 2
|
||||
moretrees.firs_remove_chance = tonumber(stg:get("moretrees.firs_remove_chance")) or 150
|
||||
|
||||
-- Cocos palm settings
|
||||
moretrees.coconuts_regrow = stg:get_bool("moretrees.coconuts_regrow", true)
|
||||
moretrees.coconuts_convert_existing_palms = stg:get_bool("moretrees.coconuts_convert_existing_palms", true)
|
||||
moretrees.coconut_flower_interval = tonumber(stg:get("moretrees.coconut_flower_interval")) or 59
|
||||
moretrees.coconut_flower_chance = tonumber(stg:get("moretrees.coconut_flower_chance")) or 67
|
||||
moretrees.coconut_grow_interval = tonumber(stg:get("moretrees.coconut_grow_interval")) or
|
||||
2 * moretrees.coconut_flower_interval * moretrees.coconut_flower_chance
|
||||
moretrees.coconut_item_drop_ichance = tonumber(stg:get("moretrees.coconut_item_drop_ichance")) or 10
|
||||
|
||||
-- Date palm settings
|
||||
moretrees.dates_regrow_pollinated = stg:get_bool("moretrees.dates_regrow_pollinated", true)
|
||||
moretrees.dates_regrow_unpollinated_percent = tonumber(stg:get("moretrees.dates_regrow_unpollinated_percent")) or 0
|
||||
moretrees.dates_female_percent = tonumber(stg:get("moretrees.dates_female_percent")) or 57
|
||||
moretrees.dates_pollination_distance = tonumber(stg:get("moretrees.dates_pollination_distance")) or 120
|
||||
moretrees.dates_blossom_search_time_treshold = tonumber(stg:get("moretrees.dates_blossom_search_time_treshold")) or 1000
|
||||
moretrees.dates_blossom_search_iload = tonumber(stg:get("moretrees.dates_blossom_search_iload")) or 10
|
||||
moretrees.dates_flower_interval = tonumber(stg:get("moretrees.dates_flower_interval")) or 59
|
||||
moretrees.dates_flower_chance = tonumber(stg:get("moretrees.dates_flower_chance")) or 181
|
||||
moretrees.dates_grow_interval = tonumber(stg:get("moretrees.dates_grow_interval")) or
|
||||
2 * moretrees.dates_flower_interval * moretrees.dates_flower_chance
|
||||
moretrees.dates_item_drop_ichance = tonumber(stg:get("moretrees.dates_item_drop_ichance")) or 10
|
||||
|
||||
-- Sapling settings
|
||||
moretrees.sapling_interval = 100
|
||||
moretrees.sapling_chance = 5
|
||||
|
||||
-- If this variable is set to true, drop leaves out as entities during leaf
|
||||
-- decay, rather than just disappearing them.
|
||||
moretrees.decay_leaves_as_items = stg:get_bool("moretrees.decay_leaves_as_items", false)
|
@ -1,5 +1,6 @@
|
||||
moretrees.beech_model={
|
||||
axiom="FFFFFBFB",
|
||||
-- luacheck: no max line length
|
||||
rules_a="[&&&GGF[++^Fd][--&Fd]//Fd[+^Fd][--&Fd]]////[&&&GGF[++^Fd][--&Fd]//Fd[+^Fd][--&Fd]]////[&&&GGF[++^Fd][--&Fd]//Fd[+^Fd][--&Fdd]]",
|
||||
rules_b="[&&&F[++^Fd][--&d]//d[+^d][--&d]]////[&&&F[++^Fd][--&d]//d[+^d][--&d]]////[&&&F[++^Fd][--&Fd]//d[+^d][--&d]]",
|
||||
rules_c="/",
|
||||
@ -75,6 +76,7 @@ moretrees.poplar_small_model={
|
||||
|
||||
moretrees.sequoia_model={
|
||||
axiom="FFFFFFFFFFddccA///cccFddcFA///ddFcFA/cFFddFcdBddd/A/ccdcddd/ccAddddcFBcccAccFdFcFBcccc/BFdFFcFFdcccc/B",
|
||||
-- luacheck: no max line length
|
||||
rules_a="[&&&GGF[++^FFdd][--&Fddd]//Fdd[+^Fd][--&Fdd]]////[&&&GGF[++^FFdd][--&Fddd]//Fdd[+^Fd][--&Fdd]]////[&&&GGF[++^FFdd][--&Fddd]//Fdd[+^Fd][--&Fdd]]",
|
||||
rules_b="[&&&GGF[++^Fdd][--&Fdd]//dd[+^d][--&Fd]]////[&&&GGF[++^Fdd][--&Fdd]//dd[+^d][--&Fd]]////[&&&GGF[++^Fdd][--&Fdd]//dd[+^d][--&Fd]]",
|
||||
rules_c="/",
|
||||
@ -166,6 +168,7 @@ moretrees.date_palm_model={
|
||||
}
|
||||
|
||||
moretrees.spruce_model1={
|
||||
-- luacheck: no max line length
|
||||
axiom="FFFFFAFFFFFFBFFFFFFCFFFFFFDFFFFFF[&&&F^^FF][&&&++F^^FF][&&&++++F^^FF][&&&++++++F^^FF][&&&--F^^FF][&&&----F^^FF][FFFFf]",
|
||||
rules_a="[&&&FFFFFF^^FFF][&&&++FFFFFF^^FFF][&&&++++FFFFFF^^FFF][&&&++++++FFFFFF^^FFF][&&&--FFFFFF^^FFF][&&&----FFFFFF^^FFF]",
|
||||
rules_b="[&&&FFFFF^^FFF][&&&++FFFFF^^FFF][&&&++++FFFFF^^FFF][&&&++++++FFFFF^^FFF][&&&--FFFFF^^FFF][&&&----FFFFF^^FFF]",
|
||||
@ -183,6 +186,7 @@ moretrees.spruce_model1={
|
||||
}
|
||||
|
||||
moretrees.spruce_model2={
|
||||
-- luacheck: no max line length
|
||||
axiom="FFFFFFBFFFFFFCFFFFFFDFFFFFF[&&&F^^FF][&&&++F^^FF][&&&++++F^^FF][&&&++++++F^^FF][&&&--F^^FF][&&&----F^^FF][FFFFf]",
|
||||
rules_b="[&&&FFFFF^^FFF][&&&++FFFFF^^FFF][&&&++++FFFFF^^FFF][&&&++++++FFFFF^^FFF][&&&--FFFFF^^FFF][&&&----FFFFF^^FFF]",
|
||||
rules_c="[&&&FFFF^^FFF][&&&++FFFF^^FFF][&&&++++FFFF^^FFF][&&&++++++FFFF^^FFF][&&&--FFFF^^FFF][&&&----FFFF^^FFF]",
|
||||
@ -217,6 +221,7 @@ moretrees.cedar_model={
|
||||
|
||||
moretrees.willow_model={
|
||||
axiom="FFFFFFFFccA",
|
||||
-- luacheck: no max line length
|
||||
rules_a="[&FF&FFFF&&F&FFFFFFFdddd][**&FF&FFFF&&F&FFFFFFFdddd][//&FF&FFFF&&F&FFFFFFFdddd][////&FF&FFFF&&F&FFFFFFFdddd][//////&FF&FFFF&&F&FFFFFFFdddd][////////&FF&FFFF&&F&FFFFFFFdddd]",
|
||||
rules_c="/",
|
||||
rules_d="F",
|
||||
|
Loading…
Reference in New Issue
Block a user