This commit is contained in:
root 2021-12-27 15:08:16 +01:00
parent f36ea18436
commit 773dd3e119
104 changed files with 838 additions and 844 deletions

View file

@ -47,7 +47,6 @@ load_mod_nature_classic = true
load_mod_homedecor_clocks = true load_mod_homedecor_clocks = true
load_mod_signs_road = true load_mod_signs_road = true
load_mod_homedecor_cobweb = true load_mod_homedecor_cobweb = true
load_mod_along_shore = true
load_mod_artdeco = true load_mod_artdeco = true
load_mod_carts = true load_mod_carts = true
load_mod_mobs_butterfly = true load_mod_mobs_butterfly = true
@ -78,7 +77,6 @@ load_mod_death_compass = true
load_mod_facade = true load_mod_facade = true
load_mod_inbox = true load_mod_inbox = true
load_mod_cloud_items = true load_mod_cloud_items = true
load_mod_flowers_plus = true
load_mod_bows = true load_mod_bows = true
load_mod_3dmushrooms = true load_mod_3dmushrooms = true
load_mod_minislots_engine = true load_mod_minislots_engine = true
@ -272,3 +270,6 @@ load_mod_advtrains_train_japan = true
load_mod_advtrains_train_industrial = true load_mod_advtrains_train_industrial = true
load_mod_advtrains_train_steam = true load_mod_advtrains_train_steam = true
load_mod_home_vending_machines = true load_mod_home_vending_machines = true
load_mod_pl_sunflowers = true
load_mod_pl_seaweed = true
load_mod_pl_waterlilies = true

View file

@ -392,7 +392,7 @@ function advtrains.train_step_b(id, train, dtime)
-- interlocking speed restriction -- interlocking speed restriction
elseif train.speed_restriction then elseif train.speed_restriction then
--atprint("in train_step_b: applying interlocking speed restriction",train.speed_restriction) --atprint("in train_step_b: applying interlocking speed restriction",train.speed_restriction)
sit_v_cap = train.speed_restriction sit_v_cap = math.min(sit_v_cap or math.huge, train.speed_restriction)
end end
--apply off-track handling: --apply off-track handling:

View file

@ -250,12 +250,21 @@ biome = {
-- skipped. Avoid using excessively large radii. -- skipped. Avoid using excessively large radii.
rarity = num, -- How rare should this object be in its biome? Larger rarity = num, -- How rare should this object be in its biome? Larger
-- values make objects more rare, via: -- values make objects more rare, via:
-- math.random(1,100) > this -- math.random() * 100 > this
rarity_fertility -- The amount that the rarity is reduced by fertility.
= num, -- This makes the rarity field the upper bound for
-- rarity, and (rarity - rarity_fertility) the lower
-- bound. Defaults to 0.
max_count = num, -- The absolute maximum number of your object that max_count = num, -- The absolute maximum number of your object that
-- should be allowed to spawn in a 5x5x5 mapblock area -- should be allowed to spawn in a 5x5x5 mapblock area
-- (80x80x80 nodes). Defaults to 5, but be sure you -- (80x80x80 nodes). Defaults to 5, but be sure you
-- set this to some reasonable value depending on your -- set this to some reasonable value depending on your
-- object and its size if 5 is insufficient. -- object and its size if 5 is insufficient.
tries = num, -- the number of attempts that will be made to spawn
-- an object, defaults to 2. This means if the first
-- attempt fails due to something blocking the object
-- for example, another attempt will be made in
-- another random location.
seed_diff = num, -- Perlin seed-diff value. Defaults to 0, which seed_diff = num, -- Perlin seed-diff value. Defaults to 0, which
-- causes the function to inherit the global value of -- causes the function to inherit the global value of
-- 329. -- 329.

View file

@ -73,7 +73,9 @@ function biome_lib.set_defaults(biome)
biome.near_nodes_size = biome.near_nodes_size or 0 biome.near_nodes_size = biome.near_nodes_size or 0
biome.near_nodes_count = biome.near_nodes_count or 1 biome.near_nodes_count = biome.near_nodes_count or 1
biome.rarity = biome.rarity or 50 biome.rarity = biome.rarity or 50
biome.rarity_fertility = biome.rarity_fertility or 0
biome.max_count = biome.max_count or 125 biome.max_count = biome.max_count or 125
biome.tries = biome.tries or 2
if biome.check_air ~= false then biome.check_air = true end if biome.check_air ~= false then biome.check_air = true end
-- specific to abm spawner -- specific to abm spawner
@ -182,14 +184,18 @@ end
local function populate_single_surface(biome, pos, perlin_fertile_area, checkair) local function populate_single_surface(biome, pos, perlin_fertile_area, checkair)
local p_top = { x = pos.x, y = pos.y + 1, z = pos.z } local p_top = { x = pos.x, y = pos.y + 1, z = pos.z }
if math.random(1, 100) <= biome.rarity then if biome.rarity - biome.rarity_fertility == 100 then
return return
end end
local fertility, temperature, humidity = get_biome_data(pos, perlin_fertile_area) local fertility, temperature, humidity = get_biome_data(pos, perlin_fertile_area)
if math.random() * 100 <= (biome.rarity - ((fertility + 1) / 2 * biome.rarity_fertility)) then
return
end
local pos_biome_ok = pos.y >= biome.min_elevation and pos.y <= biome.max_elevation local pos_biome_ok = pos.y >= biome.min_elevation and pos.y <= biome.max_elevation
and fertility > biome.plantlife_limit and fertility >= biome.plantlife_limit
and temperature <= biome.temp_min and temperature >= biome.temp_max and temperature <= biome.temp_min and temperature >= biome.temp_max
and humidity <= biome.humidity_min and humidity >= biome.humidity_max and humidity <= biome.humidity_min and humidity >= biome.humidity_max
@ -286,7 +292,7 @@ function biome_lib.populate_surfaces(b, nodes_or_function_or_model, snodes, chec
for i = 1, math.min(math.ceil(biome.max_count/25), num_in_biome_nodes) do for i = 1, math.min(math.ceil(biome.max_count/25), num_in_biome_nodes) do
local tries = 0 local tries = 0
local spawned = false local spawned = false
while tries < 2 and not spawned do while tries < biome.tries and not spawned do
local pos = in_biome_nodes[math.random(1, num_in_biome_nodes)] local pos = in_biome_nodes[math.random(1, num_in_biome_nodes)]
local will_place = true local will_place = true

View file

@ -1,6 +1,7 @@
 
Decorative Computers Mod for Minetest Decorative Computers Mod for Minetest
by Diego Martínez <kaeza@users.sf.net> by Diego Martínez <kaeza@users.sf.net> and contributors
license [MIT](https://spdx.org/licenses/MIT.html)
How to install: How to install:
Unzip the archive an place it in minetest-base-directory/mods/minetest/ Unzip the archive an place it in minetest-base-directory/mods/minetest/

View file

@ -80,7 +80,7 @@ minetest.register_node("computers:piepad", {
walkable = false, walkable = false,
groups = {oddly_breakable_by_hand=2}, groups = {oddly_breakable_by_hand=2},
selection_box = {type = "wallmounted"}, selection_box = {type = "wallmounted"},
sounds = default.node_sound_wood_defaults() sounds = default and default.node_sound_wood_defaults() or nil
}) })
-- Commodore 64 lookalike -- Commodore 64 lookalike
@ -173,7 +173,7 @@ minetest.register_node("computers:router", {
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = false, walkable = false,
groups = {snappy=3}, groups = {snappy=3},
sound = default.node_sound_wood_defaults(), sound = default and default.node_sound_wood_defaults() or nil,
drawtype = "nodebox", drawtype = "nodebox",
node_box = { node_box = {
type = "fixed", type = "fixed",
@ -201,7 +201,7 @@ minetest.register_node("computers:tower", {
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {snappy=3}, groups = {snappy=3},
sound = default.node_sound_wood_defaults(), sound = default and default.node_sound_wood_defaults() or nil,
selection_box = pct_cbox, selection_box = pct_cbox,
collision_box = pct_cbox collision_box = pct_cbox
}) })
@ -230,7 +230,7 @@ minetest.register_node("computers:server", {
type = "fixed", type = "fixed",
fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375} fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375}
}, },
sounds = default.node_sound_wood_defaults(), sounds = default and default.node_sound_wood_defaults() or nil,
on_rightclick = function(pos, node, clicker, itemstack) on_rightclick = function(pos, node, clicker, itemstack)
node.name = "computers:server_on" node.name = "computers:server_on"
minetest.set_node(pos, node) minetest.set_node(pos, node)
@ -269,7 +269,7 @@ minetest.register_node("computers:server_on", {
type = "fixed", type = "fixed",
fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375} fixed = {-0.5, -0.5, -0.25, 0.5, 1.125, 0.4375}
}, },
sounds = default.node_sound_wood_defaults(), sounds = default and default.node_sound_wood_defaults() or nil,
drop = 'computers:server', drop = 'computers:server',
on_rightclick = function(pos, node, clicker, itemstack) on_rightclick = function(pos, node, clicker, itemstack)
node.name = "computers:server" node.name = "computers:server"
@ -289,7 +289,7 @@ minetest.register_node("computers:printer", {
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
groups = {snappy=3}, groups = {snappy=3},
sound = default.node_sound_wood_defaults(), sound = default and default.node_sound_wood_defaults() or nil,
drawtype = "nodebox", drawtype = "nodebox",
node_box = { node_box = {
type = "fixed", type = "fixed",

View file

@ -298,8 +298,7 @@ local function step(pos, fields)
t.score, close, buttons } t.score, close, buttons }
meta:set_string("formspec", concat(scr) meta:set_string("formspec", concat(scr))
..default.gui_bg..default.gui_bg_img..default.gui_slots)
meta:set_string("tetris", minetest.serialize(t)) meta:set_string("tetris", minetest.serialize(t))
end end
@ -326,8 +325,7 @@ minetest.register_node("computers:tetris_arcade", {
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("formspec", formsize meta:set_string("formspec", formsize
.."button[2,2.5;2,2;new;"..minetest.formspec_escape(S("New Game")).."]" .."button[2,2.5;2,2;new;"..minetest.formspec_escape(S("New Game")).."]")
..default.gui_bg..default.gui_bg_img..default.gui_slots)
end, end,
on_timer = function(pos) on_timer = function(pos)
return step(pos, nil) return step(pos, nil)

View file

@ -93,6 +93,9 @@ end
local MODPATH = minetest.get_modpath("computers") local MODPATH = minetest.get_modpath("computers")
dofile(MODPATH.."/computers.lua") dofile(MODPATH.."/computers.lua")
dofile(MODPATH.."/recipes.lua")
dofile(MODPATH.."/gaming.lua") dofile(MODPATH.."/gaming.lua")
dofile(MODPATH.."/aliases.lua") dofile(MODPATH.."/aliases.lua")
if minetest.get_modpath("default") and minetest.get_modpath("basic_materials") then
dofile(MODPATH.."/recipes.lua")
end

View file

@ -1,3 +1,2 @@
name = computers name = computers
depends = default, basic_materials optional_depends = screwdriver, default, basic_materials
optional_depends = screwdriver

View file

@ -17,7 +17,7 @@ minetest.register_node("home_workshop_machines:3dprinter_bedflinger", {
paramtype = "light", paramtype = "light",
walkable = true, walkable = true,
groups = {snappy=3, ud_param2_colorable = 1}, groups = {snappy=3, ud_param2_colorable = 1},
sound = default.node_sound_wood_defaults(), sound = default and default.node_sound_wood_defaults() or nil,
drawtype = "mesh", drawtype = "mesh",
mesh = "home_workshop_machines_3dprinter_bedflinger.obj", mesh = "home_workshop_machines_3dprinter_bedflinger.obj",
paramtype2 = "colorwallmounted", paramtype2 = "colorwallmounted",
@ -47,7 +47,7 @@ minetest.register_node("home_workshop_machines:3dprinter_corexy", {
paramtype = "light", paramtype = "light",
walkable = true, walkable = true,
groups = {snappy=3, ud_param2_colorable = 1}, groups = {snappy=3, ud_param2_colorable = 1},
sound = default.node_sound_wood_defaults(), sound = default and default.node_sound_wood_defaults() or nil,
drawtype = "mesh", drawtype = "mesh",
mesh = "home_workshop_machines_3dprinter_corexy.obj", mesh = "home_workshop_machines_3dprinter_corexy.obj",
paramtype2 = "colorwallmounted", paramtype2 = "colorwallmounted",

View file

@ -1,3 +1,4 @@
name = home_workshop_machines name = home_workshop_machines
depends = default, unifieddyes depends = unifieddyes
optional_depends = default
optional_depends = screwdriver optional_depends = screwdriver

View file

@ -76,7 +76,7 @@ minetest.register_node("home_workshop_misc:beer_mug", {
paramtype2 = "facedir", paramtype2 = "facedir",
groups = { snappy=3, oddly_breakable_by_hand=3 }, groups = { snappy=3, oddly_breakable_by_hand=3 },
walkable = false, walkable = false,
sounds = default.node_sound_glass_defaults(), sounds = default and default.node_sound_glass_defaults() or nil,
selection_box = beer_cbox, selection_box = beer_cbox,
on_use = function(itemstack, user, pointed_thing) on_use = function(itemstack, user, pointed_thing)
if not minetest.is_creative_enabled(user:get_player_name()) then if not minetest.is_creative_enabled(user:get_player_name()) then
@ -96,7 +96,9 @@ else
end end
local MODPATH = minetest.get_modpath("home_workshop_misc") local MODPATH = minetest.get_modpath("home_workshop_misc")
dofile(MODPATH.."/crafts.lua") if minetest.get_modpath("default") and minetest.get_modpath("basic_materials") then
dofile(MODPATH.."/crafts.lua")
end
minetest.register_alias("homedecor:tool_cabinet", "home_workshop_misc:tool_cabinet") minetest.register_alias("homedecor:tool_cabinet", "home_workshop_misc:tool_cabinet")
minetest.register_alias("homedecor:tool_cabinet_bottom", "home_workshop_misc:tool_cabinet") minetest.register_alias("homedecor:tool_cabinet_bottom", "home_workshop_misc:tool_cabinet")

View file

@ -1,3 +1,2 @@
name = home_workshop_misc name = home_workshop_misc
depends = default optional_depends = currency, screwdriver, homedecor_common, default
optional_depends = currency, screwdriver, homedecor_common

View file

@ -149,6 +149,8 @@ end
-- Use basic_materials brass if available, otherwise register our own. -- Use basic_materials brass if available, otherwise register our own.
if minetest.get_modpath("basic_materials") then if minetest.get_modpath("basic_materials") then
a.brass = "basic_materials:brass_ingot" a.brass = "basic_materials:brass_ingot"
elseif minetest.get_modpath("hades_extramaterials") then
a.brass = "hades_extramaterials:brass_ingot"
end end
local path = minetest.get_modpath("morelights") local path = minetest.get_modpath("morelights")

View file

@ -1,9 +0,0 @@
-----------------------------------------------------------------------------------------------
local title = "Along the Shore"
local version = "0.0.4"
local mname = "along_shore"
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
-----------------------------------------------------------------------------------------------

View file

@ -1,3 +0,0 @@
name = along_shore
depends = default, biome_lib
optional_depends = flowers_plus

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 B

View file

@ -1,30 +0,0 @@
-------------------------------------------------------------
Credit for textures of "along_shore"
-------------------------------------------------------------
(If more than one author is listed the names are in alphabetical order)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOLDER TEXTURE AUTHORS
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
../along_shore/textures along_shore_seaweed_1Darker.png Neuromancer, VanessaE
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
../along_shore/textures/old (along_shore_empty.png) (Mossmanikin)
along_shore_lilypads_1.png Mossmanikin, Neuromancer
along_shore_lilypads_2.png Mossmanikin, Neuromancer
along_shore_lilypads_3.png Mossmanikin, Neuromancer
along_shore_lilypads_4.png Mossmanikin, Neuromancer
along_shore_pondscum_1.png Neuromancer
along_shore_seaweed_1.png Neuromancer, VanessaE
along_shore_seaweed_2.png Mossmanikin, Neuromancer, VanessaE
along_shore_seaweed_3.png Mossmanikin, Neuromancer, VanessaE
along_shore_seaweed_4.png Mossmanikin, Neuromancer, VanessaE
flowers_seaweed.png Neuromancer, VanessaE
flowers_waterlily.png Mossmanikin, VanessaE
flowers_waterlily_22.5.png Mossmanikin, VanessaE
flowers_waterlily_45.png Mossmanikin, VanessaE
flowers_waterlily_67.5.png Mossmanikin, VanessaE
lillypad3Flower16x.png Neuromancer
LillyPad3x16.png Neuromancer
lillyPad5x16.png Neuromancer
MultiLilly16x.png Neuromancer
pondscum16xc.png Neuromancer
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Binary file not shown.

Before

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 543 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 543 B

View file

@ -8,30 +8,39 @@
-- support for i18n -- support for i18n
local S = minetest.get_translator("bushes") local S = minetest.get_translator("bushes")
abstract_bushes = {} abstract_bushes = {}
minetest.register_node("bushes:youngtree2_bottom", { local bushes_bush_rarity = tonumber(minetest.settings:get("bushes_bush_rarity")) or 99.9
local bushes_bush_rarity_fertility = tonumber(minetest.settings:get("bushes_bush_rarity_fertility")) or 1.5
local bushes_bush_fertility = tonumber(minetest.settings:get("bushes_bush_fertility")) or -1
local bushes_youngtrees_rarity = tonumber(minetest.settings:get("bushes_youngtrees_rarity")) or 100
local bushes_youngtrees_rarity_fertility = tonumber(minetest.settings:get("bushes_youngtrees_rarity_fertility")) or 0.6
local bushes_youngtrees_fertility = tonumber(minetest.settings:get("bushes_youngtrees_fertility")) or -0.5
minetest.register_node("bushes:youngtree2_bottom", {
description = S("Young Tree 2 (bottom)"), description = S("Young Tree 2 (bottom)"),
drawtype="nodebox", drawtype="nodebox",
tiles = {"bushes_youngtree2trunk.png"}, tiles = {"bushes_youngtree2trunk.png"},
inventory_image = "bushes_youngtree2trunk_inv.png", inventory_image = "bushes_youngtree2trunk_inv.png",
wield_image = "bushes_youngtree2trunk_inv.png", wield_image = "bushes_youngtree2trunk_inv.png",
paramtype = "light", paramtype = "light",
walkable = false, walkable = false,
is_ground_content = true, is_ground_content = true,
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = { fixed = {
--{0.375000,-0.500000,-0.500000,0.500000,0.500000,-0.375000}, --NodeBox 1 --{0.375000,-0.500000,-0.500000,0.500000,0.500000,-0.375000}, --NodeBox 1
{-0.0612,-0.500000,-0.500000,0.0612,0.500000,-0.375000}, --NodeBox 1 {-0.0612,-0.500000,-0.500000,0.0612,0.500000,-0.375000}, --NodeBox 1
} }
}, },
groups = {snappy=3,flammable=2,attached_node=1}, groups = {snappy=3,flammable=2,attached_node=1},
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
drop = 'default:stick' drop = 'default:stick'
}) })
local BushBranchCenter = { {1,1}, {3,2} } local BushBranchCenter = { {1,1}, {3,2} }
for i in pairs(BushBranchCenter) do for i in pairs(BushBranchCenter) do
local Num = BushBranchCenter[i][1] local Num = BushBranchCenter[i][1]
local TexNum = BushBranchCenter[i][2] local TexNum = BushBranchCenter[i][2]
@ -160,9 +169,8 @@ abstract_bushes.grow_bush = function(pos)
abstract_bushes.grow_bush_node(pos,5,leaf_type) abstract_bushes.grow_bush_node(pos,5,leaf_type)
end end
abstract_bushes.grow_bush_node = function(pos,dir, leaf_type) abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
local right_here = {x=pos.x, y=pos.y+1, z=pos.z} local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z} local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
@ -206,22 +214,21 @@ biome_lib.register_on_generate({
"sumpf:peat", "sumpf:peat",
"sumpf:sumpf" "sumpf:sumpf"
}, },
max_count = 15, --10,15 rarity = bushes_bush_rarity,
rarity = 101 - 4, --3,4 rarity_fertility = bushes_bush_rarity_fertility,
plantlife_limit = bushes_bush_fertility,
min_elevation = 1, -- above sea level min_elevation = 1, -- above sea level
plantlife_limit = -0.9,
}, },
abstract_bushes.grow_bush abstract_bushes.grow_bush
) )
abstract_bushes.grow_youngtree2 = function(pos) abstract_bushes.grow_youngtree2 = function(pos)
local height = math.random(4,5) local height = math.random(4,5)
abstract_bushes.grow_youngtree_node2(pos,height) abstract_bushes.grow_youngtree_node2(pos,height)
end end
abstract_bushes.grow_youngtree_node2 = function(pos, height) abstract_bushes.grow_youngtree_node2 = function(pos, height)
local right_here = {x=pos.x, y=pos.y+1, z=pos.z} local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z} local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
local two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z} local two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z}
@ -239,7 +246,6 @@ abstract_bushes.grow_youngtree_node2 = function(pos, height)
minetest.swap_node(three_above_right_here, {name="bushes:BushLeaves1" }) minetest.swap_node(three_above_right_here, {name="bushes:BushLeaves1" })
minetest.swap_node(three_above_right_here_south, {name="bushes:BushLeaves1" }) minetest.swap_node(three_above_right_here_south, {name="bushes:BushLeaves1" })
end end
end end
end end
@ -251,12 +257,10 @@ biome_lib.register_on_generate({
"sumpf:peat", "sumpf:peat",
"sumpf:sumpf" "sumpf:sumpf"
}, },
max_count = 55, --10,15 rarity = bushes_youngtrees_rarity,
rarity = 101 - 4, --3,4 rarity_fertility = bushes_youngtrees_rarity_fertility,
plantlife_limit = bushes_youngtrees_fertility,
min_elevation = 1, -- above sea level min_elevation = 1, -- above sea level
plantlife_limit = -0.9,
}, },
abstract_bushes.grow_youngtree2 abstract_bushes.grow_youngtree2
) )
--http://dev.minetest.net/Node_Drawtypes

View file

@ -0,0 +1,17 @@
#Bush rarity %
bushes_bush_rarity (Bush rarity %) float 99.9 0 100
#How much the rarity is reduced by fertility %
bushes_bush_rarity_fertility (Bush rarity fertility reduction %) float 1.5 0 100
#Bush minimum fertility (-1 to +1)
bushes_bush_fertility (Bush minimum fertility) float -0.7 -1 1
#Youngtree (from bushes mod) rarity %
bushes_youngtrees_rarity (Youngtree bush rarity %) float 100 0 100
#How much the rarity is reduced by fertility %
bushes_youngtrees_rarity_fertility (Youngtree bush rarity fertility reduction %) float 0.6 0 100
#Youngtree (from bushes mod) minimum fertility (-1 to +1)
bushes_youngtrees_fertility (Youngtree bush minimum fertility) float -0.5 -1 1

View file

@ -1,24 +0,0 @@
Changelog
---------
2012-08-06: Tweaked selection boxes on all nodes. Tweaked seaweed to use
signlike instead of raillike drawtype, (still forced to only spawn flat as
usual). Adjusted light level limits to give it more time to grow. Created
this changelog file using github commit messages as the basis. Shrunk the
geranium flower down a bit to better match the others.
2012-08-03: Tuned out the random-numbers-inside-ABM stuff. Uses the ABM's
chance setting instead. Should be approximately the same as before, but
hopefully using a tad less CPU. Minor tweak to ABM interval/growing delay.
2012-08-01: Added blue geranium to the collection of flowers.
2012-07-31: Disable debug by default.
2012-07-30: many updates over the course of the day - first commit, removed
some redundant files, added wield/inventory image entries for each item, to
force the game to draw them properly (these shouldn't be needed, must be a
bug). Tweaked spawn code so that the radius check also includes the name of
the item being spawned as well as items in group:flower, that way all items can
have a radius test, and not just those in group:flower. Fiddled with the spawn
rates a bit.

View file

@ -1,482 +0,0 @@
-- support for i18n
local S = minetest.get_translator("flowers_plus")
-- This file supplies a few additional plants and some related crafts
-- for the plantlife modpack. Last revision: 2013-04-24
flowers_plus = {}
local SPAWN_DELAY = 1000
local SPAWN_CHANCE = 200
local flowers_seed_diff = 329
local lilies_max_count = 320
local lilies_rarity = 33
local seaweed_max_count = 320
local seaweed_rarity = 33
local sunflowers_max_count = 10
local sunflowers_rarity = 25
-- register the various rotations of waterlilies
local lilies_list = {
{ nil , nil , 1 },
{ "225", "22.5" , 2 },
{ "45" , "45" , 3 },
{ "675", "67.5" , 4 },
{ "s1" , "small_1" , 5 },
{ "s2" , "small_2" , 6 },
{ "s3" , "small_3" , 7 },
{ "s4" , "small_4" , 8 },
}
for i in ipairs(lilies_list) do
local deg1 = ""
local deg2 = ""
local lily_groups = {snappy = 3,flammable=2,flower=1}
if lilies_list[i][1] ~= nil then
deg1 = "_"..lilies_list[i][1]
deg2 = "_"..lilies_list[i][2]
lily_groups = { snappy = 3,flammable=2,flower=1, not_in_creative_inventory=1 }
end
minetest.register_node(":flowers:waterlily"..deg1, {
description = S("Waterlily"),
drawtype = "nodebox",
tiles = {
"flowers_waterlily"..deg2..".png",
"flowers_waterlily"..deg2..".png^[transformFY"
},
inventory_image = "flowers_waterlily.png",
wield_image = "flowers_waterlily.png",
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = lily_groups,
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.4, -0.5, -0.4, 0.4, -0.45, 0.4 },
},
node_box = {
type = "fixed",
fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 },
},
buildable_to = true,
node_placement_prediction = "",
liquids_pointable = true,
drop = "flowers:waterlily",
on_place = function(itemstack, placer, pointed_thing)
local keys=placer:get_player_control()
local pt = pointed_thing
local place_pos = nil
local top_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
local under_node = minetest.get_node(pt.under)
local above_node = minetest.get_node(pt.above)
local top_node = minetest.get_node(top_pos)
if biome_lib.get_nodedef_field(under_node.name, "buildable_to") then
if under_node.name ~= "default:water_source" then
place_pos = pt.under
elseif top_node.name ~= "default:water_source"
and biome_lib.get_nodedef_field(top_node.name, "buildable_to") then
place_pos = top_pos
else
return
end
elseif biome_lib.get_nodedef_field(above_node.name, "buildable_to") then
place_pos = pt.above
end
if place_pos and not minetest.is_protected(place_pos, placer:get_player_name()) then
local nodename = "default:cobble" -- if this block appears, something went....wrong :-)
if not keys["sneak"] then
local node = minetest.get_node(pt.under)
local waterlily = math.random(1,8)
if waterlily == 1 then
nodename = "flowers:waterlily"
elseif waterlily == 2 then
nodename = "flowers:waterlily_225"
elseif waterlily == 3 then
nodename = "flowers:waterlily_45"
elseif waterlily == 4 then
nodename = "flowers:waterlily_675"
elseif waterlily == 5 then
nodename = "flowers:waterlily_s1"
elseif waterlily == 6 then
nodename = "flowers:waterlily_s2"
elseif waterlily == 7 then
nodename = "flowers:waterlily_s3"
elseif waterlily == 8 then
nodename = "flowers:waterlily_s4"
end
minetest.swap_node(place_pos, {name = nodename, param2 = math.random(0,3) })
else
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
minetest.swap_node(place_pos, {name = "flowers:waterlily", param2 = fdir})
end
if not biome_lib.expect_infinite_stacks then
itemstack:take_item()
end
return itemstack
end
end,
})
end
local algae_list = { {nil}, {2}, {3}, {4} }
for i in ipairs(algae_list) do
local num = ""
local algae_groups = {snappy = 3,flammable=2,flower=1}
if algae_list[i][1] ~= nil then
num = "_"..algae_list[i][1]
algae_groups = { snappy = 3,flammable=2,flower=1, not_in_creative_inventory=1 }
end
minetest.register_node(":flowers:seaweed"..num, {
description = S("Seaweed"),
drawtype = "nodebox",
tiles = {
"flowers_seaweed"..num..".png",
"flowers_seaweed"..num..".png^[transformFY"
},
inventory_image = "flowers_seaweed_2.png",
wield_image = "flowers_seaweed_2.png",
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = algae_groups,
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.4, -0.5, -0.4, 0.4, -0.45, 0.4 },
},
node_box = {
type = "fixed",
fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 },
},
buildable_to = true,
liquids_pointable = true,
drop = "flowers:seaweed",
on_place = function(itemstack, placer, pointed_thing)
local keys=placer:get_player_control()
local pt = pointed_thing
local place_pos = nil
local top_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
local under_node = minetest.get_node(pt.under)
local above_node = minetest.get_node(pt.above)
local top_node = minetest.get_node(top_pos)
if biome_lib.get_nodedef_field(under_node.name, "buildable_to") then
if under_node.name ~= "default:water_source" then
place_pos = pt.under
elseif top_node.name ~= "default:water_source"
and biome_lib.get_nodedef_field(top_node.name, "buildable_to") then
place_pos = top_pos
else
return
end
elseif biome_lib.get_nodedef_field(above_node.name, "buildable_to") then
place_pos = pt.above
end
if not place_pos then return end -- something went wrong :P
if not minetest.is_protected(place_pos, placer:get_player_name()) then
local nodename = "default:cobble" -- :D
if not keys["sneak"] then
--local node = minetest.get_node(pt.under)
local seaweed = math.random(1,4)
if seaweed == 1 then
nodename = "flowers:seaweed"
elseif seaweed == 2 then
nodename = "flowers:seaweed_2"
elseif seaweed == 3 then
nodename = "flowers:seaweed_3"
elseif seaweed == 4 then
nodename = "flowers:seaweed_4"
end
minetest.swap_node(place_pos, {name = nodename, param2 = math.random(0,3) })
else
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
minetest.swap_node(place_pos, {name = "flowers:seaweed", param2 = fdir})
end
if not biome_lib.expect_infinite_stacks then
itemstack:take_item()
end
return itemstack
end
end,
})
end
local box = {
type="fixed",
fixed = { { -0.2, -0.5, -0.2, 0.2, 0.5, 0.2 } },
}
local sunflower_drop = "farming:seed_wheat"
if minetest.registered_items["farming:seed_spelt"] then
sunflower_drop = "farming:seed_spelt"
end
minetest.register_node(":flowers:sunflower", {
description = S("Sunflower"),
drawtype = "mesh",
paramtype = "light",
paramtype2 = "facedir",
inventory_image = "flowers_sunflower_inv.png",
mesh = "flowers_sunflower.obj",
tiles = { "flowers_sunflower.png" },
walkable = false,
buildable_to = true,
is_ground_content = true,
groups = { dig_immediate=3, flora=1, flammable=3, attached_node=1 },
sounds = default.node_sound_leaves_defaults(),
selection_box = box,
collision_box = box,
drop = {
max_items = 1,
items = {
{items = {sunflower_drop}, rarity = 8},
{items = {"flowers:sunflower"}},
}
}
})
local extra_aliases = {
"waterlily",
"waterlily_225",
"waterlily_45",
"waterlily_675",
"seaweed"
}
for i in ipairs(extra_aliases) do
local flower = extra_aliases[i]
minetest.register_alias("flowers:flower_"..flower, "flowers:"..flower)
end
minetest.register_alias( "trunks:lilypad" , "flowers:waterlily_s1" )
minetest.register_alias( "along_shore:lilypads_1" , "flowers:waterlily_s1" )
minetest.register_alias( "along_shore:lilypads_2" , "flowers:waterlily_s2" )
minetest.register_alias( "along_shore:lilypads_3" , "flowers:waterlily_s3" )
minetest.register_alias( "along_shore:lilypads_4" , "flowers:waterlily_s4" )
minetest.register_alias( "along_shore:pondscum_1" , "flowers:seaweed" )
minetest.register_alias( "along_shore:seaweed_1" , "flowers:seaweed" )
minetest.register_alias( "along_shore:seaweed_2" , "flowers:seaweed_2" )
minetest.register_alias( "along_shore:seaweed_3" , "flowers:seaweed_3" )
minetest.register_alias( "along_shore:seaweed_4" , "flowers:seaweed_4" )
-- ongen registrations
flowers_plus.grow_waterlily = function(pos)
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
for i in ipairs(lilies_list) do
local chance = math.random(1,8)
local ext = ""
local num = lilies_list[i][3]
if lilies_list[i][1] ~= nil then
ext = "_"..lilies_list[i][1]
end
if chance == num then
minetest.swap_node(right_here, {name="flowers:waterlily"..ext, param2=math.random(0,3)})
end
end
end
biome_lib.register_on_generate({
surface = {"default:water_source"},
max_count = lilies_max_count,
rarity = lilies_rarity,
min_elevation = 1,
max_elevation = 40,
near_nodes = {"default:dirt_with_grass"},
near_nodes_size = 4,
near_nodes_vertical = 1,
near_nodes_count = 1,
plantlife_limit = -0.9,
temp_max = -0.22,
temp_min = 0.22,
},
flowers_plus.grow_waterlily
)
flowers_plus.grow_seaweed = function(pos)
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
minetest.swap_node(right_here, {name="along_shore:seaweed_"..math.random(1,4), param2=math.random(1,3)})
end
biome_lib.register_on_generate({
surface = {"default:water_source"},
max_count = seaweed_max_count,
rarity = seaweed_rarity,
min_elevation = 1,
max_elevation = 40,
near_nodes = {"default:dirt_with_grass"},
near_nodes_size = 4,
near_nodes_vertical = 1,
near_nodes_count = 1,
plantlife_limit = -0.9,
},
flowers_plus.grow_seaweed
)
-- seaweed at beaches
-- MM: not satisfied with it, but IMHO some beaches should have some algae
biome_lib.register_on_generate({
surface = {"default:water_source"},
max_count = seaweed_max_count,
rarity = seaweed_rarity,
min_elevation = 1,
max_elevation = 40,
near_nodes = {"default:sand"},
near_nodes_size = 1,
near_nodes_vertical = 0,
near_nodes_count = 3,
plantlife_limit = -0.9,
temp_max = -0.64, -- MM: more or less random values, just to make sure it's not everywhere
temp_min = -0.22, -- MM: more or less random values, just to make sure it's not everywhere
},
flowers_plus.grow_seaweed
)
biome_lib.register_on_generate({
surface = {"default:sand"},
max_count = seaweed_max_count*2,
rarity = seaweed_rarity/2,
min_elevation = 1,
max_elevation = 40,
near_nodes = {"default:water_source"},
near_nodes_size = 1,
near_nodes_vertical = 0,
near_nodes_count = 3,
plantlife_limit = -0.9,
temp_max = -0.64, -- MM: more or less random values, just to make sure it's not everywhere
temp_min = -0.22, -- MM: more or less random values, just to make sure it's not everywhere
},
flowers_plus.grow_seaweed
)
biome_lib.register_on_generate({
surface = {"default:dirt_with_grass"},
avoid_nodes = { "flowers:sunflower" },
max_count = sunflowers_max_count,
rarity = sunflowers_rarity,
min_elevation = 0,
plantlife_limit = -0.9,
temp_max = 0.53,
random_facedir = {0,3},
},
"flowers:sunflower"
)
-- spawn ABM registrations
biome_lib.register_active_spawner({
spawn_delay = SPAWN_DELAY/2,
spawn_plants = {
"flowers:waterlily",
"flowers:waterlily_225",
"flowers:waterlily_45",
"flowers:waterlily_675",
"flowers:waterlily_s1",
"flowers:waterlily_s2",
"flowers:waterlily_s3",
"flowers:waterlily_s4"
},
avoid_radius = 2.5,
spawn_chance = SPAWN_CHANCE*4,
spawn_surfaces = {"default:water_source"},
avoid_nodes = {"group:flower", "group:flora" },
seed_diff = flowers_seed_diff,
light_min = 9,
depth_max = 2,
random_facedir = {0,3}
})
biome_lib.register_active_spawner({
spawn_delay = SPAWN_DELAY*2,
spawn_plants = {"flowers:seaweed"},
spawn_chance = SPAWN_CHANCE*2,
spawn_surfaces = {"default:water_source"},
avoid_nodes = {"group:flower", "group:flora"},
seed_diff = flowers_seed_diff,
light_min = 4,
light_max = 10,
neighbors = {"default:dirt_with_grass"},
facedir = 1
})
biome_lib.register_active_spawner({
spawn_delay = SPAWN_DELAY*2,
spawn_plants = {"flowers:seaweed"},
spawn_chance = SPAWN_CHANCE*2,
spawn_surfaces = {"default:dirt_with_grass"},
avoid_nodes = {"group:flower", "group:flora" },
seed_diff = flowers_seed_diff,
light_min = 4,
light_max = 10,
neighbors = {"default:water_source"},
ncount = 1,
facedir = 1
})
biome_lib.register_active_spawner({
spawn_delay = SPAWN_DELAY*2,
spawn_plants = {"flowers:seaweed"},
spawn_chance = SPAWN_CHANCE*2,
spawn_surfaces = {"default:stone"},
avoid_nodes = {"group:flower", "group:flora" },
seed_diff = flowers_seed_diff,
light_min = 4,
light_max = 10,
neighbors = {"default:water_source"},
ncount = 6,
facedir = 1
})
biome_lib.register_active_spawner({
spawn_delay = SPAWN_DELAY*2,
spawn_plants = {"flowers:sunflower"},
spawn_chance = SPAWN_CHANCE*2,
spawn_surfaces = {"default:dirt_with_grass"},
avoid_nodes = {"group:flower", "flowers:sunflower"},
seed_diff = flowers_seed_diff,
light_min = 11,
light_max = 14,
min_elevation = 0,
plantlife_limit = -0.9,
temp_max = 0.53,
random_facedir = {0,3},
avoid_radius = 5
})
-- Cotton plants are now provided by the default "farming" mod.
-- old cotton plants -> farming cotton stage 8
-- cotton wads -> string (can be crafted into wool blocks)
-- potted cotton plants -> potted white dandelions
minetest.register_alias("flowers:cotton_plant", "farming:cotton_8")
minetest.register_alias("flowers:flower_cotton", "farming:cotton_8")
minetest.register_alias("flowers:flower_cotton_pot", "flowers:potted_dandelion_white")
minetest.register_alias("flowers:potted_cotton_plant", "flowers:potted_dandelion_white")
minetest.register_alias("flowers:cotton", "farming:string")
minetest.register_alias("flowers:cotton_wad", "farming:string")
minetest.register_alias("sunflower:sunflower", "flowers:sunflower")
print("[Flowers] Loaded.")

View file

@ -1,14 +1,13 @@
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------
local title = "Mole Hills"
local version = "0.0.3"
local mname = "molehills"
-----------------------------------------------------------------------------------------------
-- Idea by Sokomine -- Idea by Sokomine
-- Code & textures by Mossmanikin -- Code & textures by Mossmanikin
abstract_molehills = {} abstract_molehills = {}
dofile(minetest.get_modpath("molehills").."/molehills_settings.txt") local molehills_rarity = tonumber(minetest.settings:get("molehills_rarity")) or 99.5
local molehills_rarity_fertility = tonumber(minetest.settings:get("molehills_rarity_fertility")) or 1
local molehills_fertility = tonumber(minetest.settings:get("molehills_fertility")) or -0.6
-- support for i18n -- support for i18n
local S = minetest.get_translator("molehills") local S = minetest.get_translator("molehills")
@ -64,17 +63,13 @@ end
biome_lib.register_on_generate({ biome_lib.register_on_generate({
surface = {"default:dirt_with_grass"}, surface = {"default:dirt_with_grass"},
max_count = Molehills_Max_Count, rarity = molehills_rarity,
rarity = Molehills_Rarity, rarity_fertility = molehills_rarity_fertility,
plantlife_limit = molehills_fertility,
min_elevation = 1, min_elevation = 1,
max_elevation = 40, max_elevation = 40,
avoid_nodes = {"group:tree","group:liquid","group:stone","group:falling_node"--[[,"air"]]}, avoid_nodes = {"group:tree","group:liquid","group:stone","group:falling_node"--[[,"air"]]},
avoid_radius = 4, avoid_radius = 4,
plantlife_limit = -0.3,
}, },
abstract_molehills.place_molehill abstract_molehills.place_molehill
) )
-----------------------------------------------------------------------------------------------
print("[Mod] "..title.." ["..version.."] ["..mname.."]".."Loaded...")
-----------------------------------------------------------------------------------------------

View file

@ -1,6 +0,0 @@
-- Settings for generation of stuff (at map-generation time)
Molehills_Max_Count = 320 -- absolute maximum number in an area of 80x80x80 nodes
Molehills_Rarity = 95 -- larger values make molehills more rare (100 means chance of 0 %)

View file

@ -0,0 +1,8 @@
#Molehills rarity %
molehills_rarity (Molehills rarity %) float 99.5 0 100
#How much the rarity is reduced by fertility %
molehills_rarity_fertility (Molehills rarity fertility reduction %) float 1 0 100
#Molehills minimum fertility (-1 to +1)
molehills_fertility (Molehills minimum fertility) float -0.6 -1 1

View file

@ -0,0 +1,168 @@
-- support for i18n
local S = minetest.get_translator("pl_seaweed")
pl_seaweed = {}
local seaweed_max_count = tonumber(minetest.settings:get("pl_seaweed_max_count")) or 320
local seaweed_rarity = tonumber(minetest.settings:get("pl_seaweed_rarity")) or 33
local algae_list = { {nil}, {2}, {3}, {4} }
for i in ipairs(algae_list) do
local num = ""
local algae_groups = {snappy = 3,flammable=2,flower=1}
if algae_list[i][1] ~= nil then
num = "_"..algae_list[i][1]
algae_groups = { snappy = 3,flammable=2,flower=1, not_in_creative_inventory=1 }
end
minetest.register_node(":flowers:seaweed"..num, {
description = S("Seaweed"),
drawtype = "nodebox",
tiles = {
"flowers_seaweed"..num..".png",
"flowers_seaweed"..num..".png^[transformFY"
},
inventory_image = "flowers_seaweed_2.png",
wield_image = "flowers_seaweed_2.png",
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = algae_groups,
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.4, -0.5, -0.4, 0.4, -0.45, 0.4 },
},
node_box = {
type = "fixed",
fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 },
},
buildable_to = true,
liquids_pointable = true,
drop = "flowers:seaweed",
on_place = function(itemstack, placer, pointed_thing)
local keys=placer:get_player_control()
local pt = pointed_thing
local place_pos = nil
local top_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
local under_node = minetest.get_node(pt.under)
local above_node = minetest.get_node(pt.above)
local top_node = minetest.get_node(top_pos)
if biome_lib.get_nodedef_field(under_node.name, "buildable_to") then
if under_node.name ~= "default:water_source" then
place_pos = pt.under
elseif top_node.name ~= "default:water_source"
and biome_lib.get_nodedef_field(top_node.name, "buildable_to") then
place_pos = top_pos
else
return
end
elseif biome_lib.get_nodedef_field(above_node.name, "buildable_to") then
place_pos = pt.above
end
if not place_pos then return end -- something went wrong :P
if not minetest.is_protected(place_pos, placer:get_player_name()) then
local nodename = "default:cobble" -- :D
if not keys["sneak"] then
--local node = minetest.get_node(pt.under)
local seaweed = math.random(1,4)
if seaweed == 1 then
nodename = "flowers:seaweed"
elseif seaweed == 2 then
nodename = "flowers:seaweed_2"
elseif seaweed == 3 then
nodename = "flowers:seaweed_3"
elseif seaweed == 4 then
nodename = "flowers:seaweed_4"
end
minetest.swap_node(place_pos, {name = nodename, param2 = math.random(0,3) })
else
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
minetest.swap_node(place_pos, {name = "flowers:seaweed", param2 = fdir})
end
if not biome_lib.expect_infinite_stacks then
itemstack:take_item()
end
return itemstack
end
end,
})
end
pl_seaweed.grow_seaweed = function(pos)
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
local seaweed = math.random(1,4)
local node_name = "flowers:seaweed"
if seaweed > 1 then
node_name = node_name .. "_" .. seaweed
end
minetest.swap_node(right_here, {name=node_name, param2=math.random(1,3)})
end
biome_lib.register_on_generate({
surface = {"default:water_source"},
max_count = seaweed_max_count,
rarity = seaweed_rarity,
min_elevation = 1,
max_elevation = 40,
near_nodes = {"default:dirt_with_grass"},
near_nodes_size = 4,
near_nodes_vertical = 1,
near_nodes_count = 1,
plantlife_limit = -0.9,
},
pl_seaweed.grow_seaweed
)
-- pl_seaweed at beaches
-- MM: not satisfied with it, but IMHO some beaches should have some algae
biome_lib.register_on_generate({
surface = {"default:water_source"},
max_count = seaweed_max_count,
rarity = seaweed_rarity,
min_elevation = 1,
max_elevation = 40,
near_nodes = {"default:sand"},
near_nodes_size = 1,
near_nodes_vertical = 0,
near_nodes_count = 3,
plantlife_limit = -0.9,
temp_max = -0.64, -- MM: more or less random values, just to make sure it's not everywhere
temp_min = -0.22, -- MM: more or less random values, just to make sure it's not everywhere
},
pl_seaweed.grow_seaweed
)
biome_lib.register_on_generate({
surface = {"default:sand"},
max_count = seaweed_max_count*2,
rarity = seaweed_rarity/2,
min_elevation = 1,
max_elevation = 40,
near_nodes = {"default:water_source"},
near_nodes_size = 1,
near_nodes_vertical = 0,
near_nodes_count = 3,
plantlife_limit = -0.9,
temp_max = -0.64, -- MM: more or less random values, just to make sure it's not everywhere
temp_min = -0.22, -- MM: more or less random values, just to make sure it's not everywhere
},
pl_seaweed.grow_seaweed
)
minetest.register_alias( "flowers:flower_seaweed" , "flowers:seaweed" )
minetest.register_alias( "along_shore:pondscum_1" , "flowers:seaweed" )
minetest.register_alias( "along_shore:seaweed_1" , "flowers:seaweed" )
minetest.register_alias( "along_shore:seaweed_2" , "flowers:seaweed_2" )
minetest.register_alias( "along_shore:seaweed_3" , "flowers:seaweed_3" )
minetest.register_alias( "along_shore:seaweed_4" , "flowers:seaweed_4" )

View file

@ -0,0 +1,11 @@
# textdomain: pl_seaweed
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Xanthin, 2017.
#
Seaweed=Seetang

View file

@ -0,0 +1,10 @@
# textdomain: pl_seaweed
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# fat115 <fat115@framasoft.org>, 2017.
#
Seaweed=Algues

View file

@ -0,0 +1,10 @@
# textdomain: pl_seaweed
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# mahmutelmas06@hotmail.com, 2017.
#
Seaweed=Deniz yosunu

View file

@ -0,0 +1,10 @@
# textdomain: pl_seaweed
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Carlos Barraza <carlosbarrazaes@gmail.com>, 2017.
#
Seaweed=Algas marinas

View file

@ -0,0 +1,11 @@
# textdomain: pl_seaweed
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
Seaweed=

View file

@ -1,3 +1,3 @@
name = flowers_plus name = pl_seaweed
depends = biome_lib depends = biome_lib
optional_depends = farming, flowers optional_depends = farming, flowers

View file

@ -0,0 +1,5 @@
#Seaweed maximum count
pl_seaweed_max_count (Seaweed maximum count) int 320 1 1000
#Seaweed rarity
pl_seaweed_rarity (Seaweed rarity) int 33 0 100

View file

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 234 B

View file

Before

Width:  |  Height:  |  Size: 224 B

After

Width:  |  Height:  |  Size: 224 B

View file

Before

Width:  |  Height:  |  Size: 226 B

After

Width:  |  Height:  |  Size: 226 B

View file

Before

Width:  |  Height:  |  Size: 178 B

After

Width:  |  Height:  |  Size: 178 B

View file

@ -0,0 +1,55 @@
-- support for i18n
local S = minetest.get_translator("pl_sunflowers")
local sunflowers_max_count = tonumber(minetest.settings:get("pl_sunflowers_max_count")) or 10
local sunflowers_rarity = tonumber(minetest.settings:get("pl_sunflowers_rarity")) or 25
local box = {
type="fixed",
fixed = { { -0.2, -0.5, -0.2, 0.2, 0.5, 0.2 } },
}
local sunflower_drop = "farming:seed_wheat"
if minetest.registered_items["farming:seed_spelt"] then
sunflower_drop = "farming:seed_spelt"
end
minetest.register_node(":flowers:sunflower", {
description = S("Sunflower"),
drawtype = "mesh",
paramtype = "light",
paramtype2 = "facedir",
inventory_image = "flowers_sunflower_inv.png",
mesh = "flowers_sunflower.obj",
tiles = { "flowers_sunflower.png" },
walkable = false,
buildable_to = true,
is_ground_content = true,
groups = { dig_immediate=3, flora=1, flammable=3, attached_node=1 },
sounds = default.node_sound_leaves_defaults(),
selection_box = box,
collision_box = box,
drop = {
max_items = 1,
items = {
{items = {sunflower_drop}, rarity = 8},
{items = {"flowers:sunflower"}},
}
}
})
biome_lib.register_on_generate({
surface = {"default:dirt_with_grass"},
avoid_nodes = { "flowers:sunflower" },
max_count = sunflowers_max_count,
rarity = sunflowers_rarity,
min_elevation = 0,
plantlife_limit = -0.9,
temp_max = -0.1,
random_facedir = {0,3},
},
"flowers:sunflower"
)
minetest.register_alias("sunflower:sunflower", "flowers:sunflower")

View file

@ -1,4 +1,4 @@
# textdomain: flowers_plus # textdomain: pl_sunflowers
# SOME DESCRIPTIVE TITLE. # SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
@ -8,6 +8,4 @@
Waterlily=Seerose
Seaweed=Seetang
Sunflower=Sonnenblume Sunflower=Sonnenblume

View file

@ -0,0 +1,10 @@
# textdomain: pl_sunflowers
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Carlos Barraza <carlosbarrazaes@gmail.com>, 2017.
#
Sunflower=Girasol

View file

@ -1,4 +1,4 @@
# textdomain: flowers_plus # textdomain: pl_sunflowers
# SOME DESCRIPTIVE TITLE. # SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
@ -7,6 +7,4 @@
# #
Waterlily=Nénuphar
Seaweed=Algues
Sunflower=Tournesol Sunflower=Tournesol

View file

@ -1,4 +1,4 @@
# textdomain: flowers_plus # textdomain: pl_sunflowers
# SOME DESCRIPTIVE TITLE. # SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
@ -7,6 +7,4 @@
# #
Waterlily=Nilüfer
Seaweed=Deniz yosunu
Sunflower=Ayçiçeği Sunflower=Ayçiçeği

View file

@ -1,4 +1,4 @@
# textdomain: flowers_plus # textdomain: pl_sunflowers
# SOME DESCRIPTIVE TITLE. # SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
@ -8,6 +8,4 @@
Waterlily=
Seaweed=
Sunflower= Sunflower=

View file

@ -0,0 +1,3 @@
name = pl_sunflowers
depends = biome_lib
optional_depends = farming, flowers

View file

@ -0,0 +1,5 @@
#Sunflowers maximum count
pl_sunflowers_max_count (Sunflowers maximum count) int 10 1 1000
#Sunflowers rarity
pl_sunflowers_rarity (Sunflowers rarity) int 25 0 100

View file

Before

Width:  |  Height:  |  Size: 811 B

After

Width:  |  Height:  |  Size: 811 B

View file

@ -0,0 +1,164 @@
-- support for i18n
local S = minetest.get_translator("pl_waterlilies")
pl_waterlilies = {}
local lilies_max_count = tonumber(minetest.settings:get("pl_waterlilies_max_count")) or 320
local lilies_rarity = tonumber(minetest.settings:get("pl_waterlilies_rarity")) or 33
local lilies_list = {
{ nil , nil , 1 },
{ "225", "22.5" , 2 },
{ "45" , "45" , 3 },
{ "675", "67.5" , 4 },
{ "s1" , "small_1" , 5 },
{ "s2" , "small_2" , 6 },
{ "s3" , "small_3" , 7 },
{ "s4" , "small_4" , 8 },
}
for i in ipairs(lilies_list) do
local deg1 = ""
local deg2 = ""
local lily_groups = {snappy = 3,flammable=2,flower=1}
if lilies_list[i][1] ~= nil then
deg1 = "_"..lilies_list[i][1]
deg2 = "_"..lilies_list[i][2]
lily_groups = { snappy = 3,flammable=2,flower=1, not_in_creative_inventory=1 }
end
minetest.register_node(":flowers:waterlily"..deg1, {
description = S("Waterlily"),
drawtype = "nodebox",
tiles = {
"flowers_waterlily"..deg2..".png",
"flowers_waterlily"..deg2..".png^[transformFY"
},
inventory_image = "flowers_waterlily.png",
wield_image = "flowers_waterlily.png",
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
groups = lily_groups,
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.4, -0.5, -0.4, 0.4, -0.45, 0.4 },
},
node_box = {
type = "fixed",
fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 },
},
buildable_to = true,
node_placement_prediction = "",
liquids_pointable = true,
drop = "flowers:waterlily",
on_place = function(itemstack, placer, pointed_thing)
local keys=placer:get_player_control()
local pt = pointed_thing
local place_pos = nil
local top_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
local under_node = minetest.get_node(pt.under)
local above_node = minetest.get_node(pt.above)
local top_node = minetest.get_node(top_pos)
if biome_lib.get_nodedef_field(under_node.name, "buildable_to") then
if under_node.name ~= "default:water_source" then
place_pos = pt.under
elseif top_node.name ~= "default:water_source"
and biome_lib.get_nodedef_field(top_node.name, "buildable_to") then
place_pos = top_pos
else
return
end
elseif biome_lib.get_nodedef_field(above_node.name, "buildable_to") then
place_pos = pt.above
end
if place_pos and not minetest.is_protected(place_pos, placer:get_player_name()) then
local nodename = "default:cobble" -- if this block appears, something went....wrong :-)
if not keys["sneak"] then
local node = minetest.get_node(pt.under)
local waterlily = math.random(1,8)
if waterlily == 1 then
nodename = "flowers:waterlily"
elseif waterlily == 2 then
nodename = "flowers:waterlily_225"
elseif waterlily == 3 then
nodename = "flowers:waterlily_45"
elseif waterlily == 4 then
nodename = "flowers:waterlily_675"
elseif waterlily == 5 then
nodename = "flowers:waterlily_s1"
elseif waterlily == 6 then
nodename = "flowers:waterlily_s2"
elseif waterlily == 7 then
nodename = "flowers:waterlily_s3"
elseif waterlily == 8 then
nodename = "flowers:waterlily_s4"
end
minetest.swap_node(place_pos, {name = nodename, param2 = math.random(0,3) })
else
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
minetest.swap_node(place_pos, {name = "flowers:waterlily", param2 = fdir})
end
if not biome_lib.expect_infinite_stacks then
itemstack:take_item()
end
return itemstack
end
end,
})
end
pl_waterlilies.grow_waterlily = function(pos)
local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
for i in ipairs(lilies_list) do
local chance = math.random(1,8)
local ext = ""
local num = lilies_list[i][3]
if lilies_list[i][1] ~= nil then
ext = "_"..lilies_list[i][1]
end
if chance == num then
minetest.swap_node(right_here, {name="flowers:waterlily"..ext, param2=math.random(0,3)})
end
end
end
biome_lib.register_on_generate({
surface = {"default:water_source"},
max_count = lilies_max_count,
rarity = lilies_rarity,
min_elevation = 1,
max_elevation = 40,
near_nodes = {"default:dirt_with_grass"},
near_nodes_size = 4,
near_nodes_vertical = 1,
near_nodes_count = 1,
plantlife_limit = -0.9,
temp_max = -0.22,
temp_min = 0.22,
},
pl_waterlilies.grow_waterlily
)
minetest.register_alias( "flowers:flower_waterlily", "flowers:waterlily")
minetest.register_alias( "flowers:flower_waterlily_225", "flowers:waterlily_225")
minetest.register_alias( "flowers:flower_waterlily_45", "flowers:waterlily_45")
minetest.register_alias( "flowers:flower_waterlily_675", "flowers:waterlily_675")
minetest.register_alias( "trunks:lilypad" , "flowers:waterlily_s1" )
minetest.register_alias( "along_shore:lilypads_1" , "flowers:waterlily_s1" )
minetest.register_alias( "along_shore:lilypads_2" , "flowers:waterlily_s2" )
minetest.register_alias( "along_shore:lilypads_3" , "flowers:waterlily_s3" )
minetest.register_alias( "along_shore:lilypads_4" , "flowers:waterlily_s4" )

View file

@ -0,0 +1,11 @@
# textdomain: pl_waterlilies
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Xanthin, 2017.
#
Waterlily=Seerose

View file

@ -1,4 +1,4 @@
# textdomain: flowers_plus # textdomain: pl_waterlilies
# SOME DESCRIPTIVE TITLE. # SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
@ -8,5 +8,3 @@
Waterlily=Lirio de agua Waterlily=Lirio de agua
Seaweed=Algas marinas
Sunflower=Girasol

View file

@ -0,0 +1,10 @@
# textdomain: pl_waterlilies
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# fat115 <fat115@framasoft.org>, 2017.
#
Waterlily=Nénuphar

View file

@ -0,0 +1,10 @@
# textdomain: pl_waterlilies
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# mahmutelmas06@hotmail.com, 2017.
#
Waterlily=Nilüfer

View file

@ -0,0 +1,11 @@
# textdomain: pl_waterlillies
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
Waterlily=

View file

@ -0,0 +1,3 @@
name = pl_waterlilies
depends = biome_lib
optional_depends = farming, flowers

View file

@ -0,0 +1,5 @@
#Water-lilies maximum count
pl_waterlilies_max_count (Water-lilies maximum count) int 320 1 1000
#Water-lilies rarity
pl_waterlilies_rarity (Water-lilies rarity) int 33 0 100

View file

Before

Width:  |  Height:  |  Size: 412 B

After

Width:  |  Height:  |  Size: 412 B

View file

@ -4,11 +4,13 @@
-- TWiGS -- TWiGS
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------
local fakenode = { function check_node_buildable_to(pos)
name = "default:stone", -- could be anything that's guaranteed to exist at mapgen time, and isn't buildable_to local node = minetest.get_node(pos)
param1 = 0, local def = minetest.registered_nodes[node.name]
param2 = 0 if def then
} return def.buildable_to
end
end
abstract_trunks.place_twig = function(pos) abstract_trunks.place_twig = function(pos)
local twig_size = math.random(1,27) local twig_size = math.random(1,27)
@ -23,25 +25,6 @@ abstract_trunks.place_twig = function(pos)
local west = {x=pos.x-1, y=pos.y+1, z=pos.z } local west = {x=pos.x-1, y=pos.y+1, z=pos.z }
local north_west = {x=pos.x-1, y=pos.y+1, z=pos.z+1} local north_west = {x=pos.x-1, y=pos.y+1, z=pos.z+1}
local node_here = minetest.get_node(right_here)
local node_north = minetest.get_node(north)
local node_n_e = minetest.get_node(north_east)
local node_east = minetest.get_node(east)
local node_s_e = minetest.get_node(south_east)
local node_south = minetest.get_node(south)
local node_s_w = minetest.get_node(south_west)
local node_west = minetest.get_node(west)
local node_n_w = minetest.get_node(north_west)
node_north = minetest.registered_nodes[node_north.name] and node_north or fakenode
node_n_e = minetest.registered_nodes[node_n_e.name] and node_n_e or fakenode
node_east = minetest.registered_nodes[node_east.name] and node_east or fakenode
node_s_e = minetest.registered_nodes[node_s_e.name] and node_s_e or fakenode
node_south = minetest.registered_nodes[node_south.name] and node_south or fakenode
node_s_w = minetest.registered_nodes[node_s_w.name] and node_s_w or fakenode
node_west = minetest.registered_nodes[node_west.name] and node_west or fakenode
node_n_w = minetest.registered_nodes[node_n_w.name] and node_n_w or fakenode
-- small twigs -- small twigs
if twig_size <= 16 then if twig_size <= 16 then
minetest.swap_node(right_here, {name="trunks:twig_"..math.random(1,4), param2=math.random(0,3)}) minetest.swap_node(right_here, {name="trunks:twig_"..math.random(1,4), param2=math.random(0,3)})
@ -50,115 +33,115 @@ abstract_trunks.place_twig = function(pos)
if Big_Twigs == true then if Big_Twigs == true then
-- big twig 1 -- big twig 1
if twig_size == 17 then if twig_size == 17 then
if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z+1}).name].buildable_to if not (check_node_buildable_to({x=pos.x+1,y=pos.y,z=pos.z+1})
or minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z}).name].buildable_to) then or check_node_buildable_to({x=pos.x+1,y=pos.y,z=pos.z})) then
if minetest.registered_nodes[node_here.name].buildable_to then if check_node_buildable_to(right_here) then
minetest.swap_node(right_here, {name="trunks:twig_5"}) minetest.swap_node(right_here, {name="trunks:twig_5"})
end end
if minetest.registered_nodes[node_n_e.name].buildable_to then if check_node_buildable_to(north_east) then
minetest.swap_node(north_east, {name="trunks:twig_7"}) minetest.swap_node(north_east, {name="trunks:twig_7"})
end end
if minetest.registered_nodes[node_east.name].buildable_to then if check_node_buildable_to(east) then
minetest.swap_node(east, {name="trunks:twig_8"}) minetest.swap_node(east, {name="trunks:twig_8"})
end end
end end
elseif twig_size == 18 then elseif twig_size == 18 then
if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1}).name].buildable_to if not (check_node_buildable_to({x=pos.x+1,y=pos.y,z=pos.z-1})
or minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z-1}).name].buildable_to) then or check_node_buildable_to({x=pos.x,y=pos.y,z=pos.z-1})) then
if minetest.registered_nodes[node_here.name].buildable_to then if check_node_buildable_to(right_here) then
minetest.swap_node(right_here, {name="trunks:twig_5", param2=1}) minetest.swap_node(right_here, {name="trunks:twig_5", param2=1})
end end
if minetest.registered_nodes[node_s_e.name].buildable_to then if check_node_buildable_to(south_east) then
minetest.swap_node(south_east, {name="trunks:twig_7", param2=1}) minetest.swap_node(south_east, {name="trunks:twig_7", param2=1})
end end
if minetest.registered_nodes[node_south.name].buildable_to then if check_node_buildable_to(south) then
minetest.swap_node(south, {name="trunks:twig_8", param2=1}) minetest.swap_node(south, {name="trunks:twig_8", param2=1})
end end
end end
elseif twig_size == 19 then elseif twig_size == 19 then
if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1}).name].buildable_to if not (check_node_buildable_to({x=pos.x+1,y=pos.y,z=pos.z-1})
or minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z}).name].buildable_to) then or check_node_buildable_to({x=pos.x-1,y=pos.y,z=pos.z})) then
if minetest.registered_nodes[node_here.name].buildable_to then if check_node_buildable_to(right_here) then
minetest.swap_node(right_here, {name="trunks:twig_5", param2=2}) minetest.swap_node(right_here, {name="trunks:twig_5", param2=2})
end end
if minetest.registered_nodes[node_s_w.name].buildable_to then if check_node_buildable_to(south_west) then
minetest.swap_node(south_west, {name="trunks:twig_7", param2=2}) minetest.swap_node(south_west, {name="trunks:twig_7", param2=2})
end end
if minetest.registered_nodes[node_west.name].buildable_to then if check_node_buildable_to(west) then
minetest.swap_node(west, {name="trunks:twig_8", param2=2}) minetest.swap_node(west, {name="trunks:twig_8", param2=2})
end end
end end
elseif twig_size == 20 then elseif twig_size == 20 then
if not (minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z+1}).name].buildable_to if not (check_node_buildable_to({x=pos.x-1,y=pos.y,z=pos.z+1})
or minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z+1}).name].buildable_to) then or check_node_buildable_to({x=pos.x,y=pos.y,z=pos.z+1})) then
if minetest.registered_nodes[node_here.name].buildable_to then if check_node_buildable_to(right_here) then
minetest.swap_node(right_here, {name="trunks:twig_5", param2=3}) minetest.swap_node(right_here, {name="trunks:twig_5", param2=3})
end end
if minetest.registered_nodes[node_n_w.name].buildable_to then if check_node_buildable_to(north_west) then
minetest.swap_node(north_west, {name="trunks:twig_7", param2=3}) minetest.swap_node(north_west, {name="trunks:twig_7", param2=3})
end end
if minetest.registered_nodes[node_north.name].buildable_to then if check_node_buildable_to(north) then
minetest.swap_node(north, {name="trunks:twig_8", param2=3}) minetest.swap_node(north, {name="trunks:twig_8", param2=3})
end end
end end
-- big twig 2 -- big twig 2
elseif twig_size == 21 then elseif twig_size == 21 then
if not (minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z+1}).name].buildable_to if not (check_node_buildable_to({x=pos.x,y=pos.y,z=pos.z+1})
or minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z+1}).name].buildable_to) then or check_node_buildable_to({x=pos.x+1,y=pos.y,z=pos.z+1})) then
if minetest.registered_nodes[node_here.name].buildable_to then if check_node_buildable_to(right_here) then
minetest.swap_node(right_here, {name="trunks:twig_9"}) minetest.swap_node(right_here, {name="trunks:twig_9"})
end end
if minetest.registered_nodes[node_north.name].buildable_to then if check_node_buildable_to(north) then
minetest.swap_node(north, {name="trunks:twig_10"}) minetest.swap_node(north, {name="trunks:twig_10"})
end end
if minetest.registered_nodes[node_n_e.name].buildable_to then if check_node_buildable_to(north_east) then
minetest.swap_node(north_east, {name="trunks:twig_11"}) minetest.swap_node(north_east, {name="trunks:twig_11"})
end end
end end
elseif twig_size == 22 then elseif twig_size == 22 then
if not (minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z}).name].buildable_to if not (check_node_buildable_to({x=pos.x+1,y=pos.y,z=pos.z})
or minetest.registered_nodes[minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z-1}).name].buildable_to) then or check_node_buildable_to({x=pos.x+1,y=pos.y,z=pos.z-1})) then
if minetest.registered_nodes[node_here.name].buildable_to then if check_node_buildable_to(right_here) then
minetest.swap_node(right_here, {name="trunks:twig_9", param2=1}) minetest.swap_node(right_here, {name="trunks:twig_9", param2=1})
end end
if minetest.registered_nodes[node_east.name].buildable_to then if check_node_buildable_to(east) then
minetest.swap_node(east, {name="trunks:twig_10", param2=1}) minetest.swap_node(east, {name="trunks:twig_10", param2=1})
end end
if minetest.registered_nodes[node_s_e.name].buildable_to then if check_node_buildable_to(south_east) then
minetest.swap_node(south_east, {name="trunks:twig_11", param2=1}) minetest.swap_node(south_east, {name="trunks:twig_11", param2=1})
end end
end end
elseif twig_size == 23 then elseif twig_size == 23 then
if not (minetest.registered_nodes[minetest.get_node({x=pos.x,y=pos.y,z=pos.z-1}).name].buildable_to if not (check_node_buildable_to({x=pos.x,y=pos.y,z=pos.z-1})
or minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z-1}).name].buildable_to) then or check_node_buildable_to({x=pos.x-1,y=pos.y,z=pos.z-1})) then
if minetest.registered_nodes[node_here.name].buildable_to then if check_node_buildable_to(right_here) then
minetest.swap_node(right_here, {name="trunks:twig_9", param2=2}) minetest.swap_node(right_here, {name="trunks:twig_9", param2=2})
end end
if minetest.registered_nodes[node_south.name].buildable_to then if check_node_buildable_to(south) then
minetest.swap_node(south, {name="trunks:twig_10", param2=2}) minetest.swap_node(south, {name="trunks:twig_10", param2=2})
end end
if minetest.registered_nodes[node_s_w.name].buildable_to then if check_node_buildable_to(south_west) then
minetest.swap_node(south_west, {name="trunks:twig_11", param2=2}) minetest.swap_node(south_west, {name="trunks:twig_11", param2=2})
end end
end end
elseif twig_size == 24 then elseif twig_size == 24 then
if not (minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z}).name].buildable_to if not (check_node_buildable_to({x=pos.x-1,y=pos.y,z=pos.z})
or minetest.registered_nodes[minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z+1}).name].buildable_to) then or check_node_buildable_to({x=pos.x-1,y=pos.y,z=pos.z+1})) then
if minetest.registered_nodes[node_here.name].buildable_to then if check_node_buildable_to(right_here) then
minetest.swap_node(right_here, {name="trunks:twig_9", param2=3}) minetest.swap_node(right_here, {name="trunks:twig_9", param2=3})
end end
if minetest.registered_nodes[node_west.name].buildable_to then if check_node_buildable_to(west) then
minetest.swap_node(west, {name="trunks:twig_10", param2=3}) minetest.swap_node(west, {name="trunks:twig_10", param2=3})
end end
if minetest.registered_nodes[node_n_w.name].buildable_to then if check_node_buildable_to(north_west) then
minetest.swap_node(north_west, {name="trunks:twig_11", param2=3}) minetest.swap_node(north_west, {name="trunks:twig_11", param2=3})
end end
end end
@ -256,16 +239,7 @@ abstract_trunks.place_trunk = function(pos)
local east = {x=pos.x+1, y=pos.y+1, z=pos.z} local east = {x=pos.x+1, y=pos.y+1, z=pos.z}
local east2 = {x=pos.x+2, y=pos.y+1, z=pos.z} local east2 = {x=pos.x+2, y=pos.y+1, z=pos.z}
local node_here = minetest.get_node(right_here) if check_node_buildable_to(right_here) then -- instead of check_air = true,
local node_north = minetest.get_node(north)
local node_north2 = minetest.get_node(north2)
local node_south = minetest.get_node(south)
local node_south2 = minetest.get_node(south2)
local node_west = minetest.get_node(west)
local node_west2 = minetest.get_node(west2)
local node_east = minetest.get_node(east)
local node_east2 = minetest.get_node(east2)
if minetest.registered_nodes[node_here.name].buildable_to then -- instead of check_air = true,
for i in pairs(TRuNKS) do for i in pairs(TRuNKS) do
local MoD = TRuNKS[i][1] local MoD = TRuNKS[i][1]
local TRuNK = TRuNKS[i][2] local TRuNK = TRuNKS[i][2]
@ -282,63 +256,63 @@ abstract_trunks.place_trunk = function(pos)
end end
elseif trunk_type == 2 and Horizontal_Trunks == true then elseif trunk_type == 2 and Horizontal_Trunks == true then
if minetest.get_modpath(MoD) ~= nil then if minetest.get_modpath(MoD) ~= nil then
if minetest.registered_nodes[node_north.name].buildable_to then if check_node_buildable_to(north) then
minetest.swap_node(north, {name=MoD..":"..TRuNK, param2=4}) minetest.swap_node(north, {name=MoD..":"..TRuNK, param2=4})
end end
if length >= 4 and minetest.registered_nodes[node_north2.name].buildable_to then if length >= 4 and check_node_buildable_to(north2) then
minetest.swap_node(north2, {name=MoD..":"..TRuNK, param2=4}) minetest.swap_node(north2, {name=MoD..":"..TRuNK, param2=4})
end end
minetest.swap_node(right_here, {name=MoD..":"..TRuNK, param2=4}) minetest.swap_node(right_here, {name=MoD..":"..TRuNK, param2=4})
if minetest.registered_nodes[node_south.name].buildable_to then if check_node_buildable_to(south) then
minetest.swap_node(south, {name=MoD..":"..TRuNK, param2=4}) minetest.swap_node(south, {name=MoD..":"..TRuNK, param2=4})
end end
if length == 5 and minetest.registered_nodes[node_south2.name].buildable_to then if length == 5 and check_node_buildable_to(south2) then
minetest.swap_node(south2, {name=MoD..":"..TRuNK, param2=4}) minetest.swap_node(south2, {name=MoD..":"..TRuNK, param2=4})
end end
else else
if minetest.registered_nodes[node_north.name].buildable_to then if check_node_buildable_to(north) then
minetest.swap_node(north, {name="default:tree", param2=4}) minetest.swap_node(north, {name="default:tree", param2=4})
end end
if length >= 4 and minetest.registered_nodes[node_north2.name].buildable_to then if length >= 4 and check_node_buildable_to(north2) then
minetest.swap_node(north2, {name="default:tree", param2=4}) minetest.swap_node(north2, {name="default:tree", param2=4})
end end
minetest.swap_node(right_here, {name="default:tree", param2=4}) minetest.swap_node(right_here, {name="default:tree", param2=4})
if minetest.registered_nodes[node_south.name].buildable_to then if check_node_buildable_to(south) then
minetest.swap_node(south, {name="default:tree", param2=4}) minetest.swap_node(south, {name="default:tree", param2=4})
end end
if length == 5 and minetest.registered_nodes[node_south2.name].buildable_to then if length == 5 and check_node_buildable_to(south2) then
minetest.swap_node(south2, {name="default:tree", param2=4}) minetest.swap_node(south2, {name="default:tree", param2=4})
end end
end end
elseif trunk_type == 3 and Horizontal_Trunks == true then elseif trunk_type == 3 and Horizontal_Trunks == true then
if minetest.get_modpath(MoD) ~= nil then if minetest.get_modpath(MoD) ~= nil then
if minetest.registered_nodes[node_west.name].buildable_to then if check_node_buildable_to(west) then
minetest.swap_node(west, {name=MoD..":"..TRuNK, param2=12}) minetest.swap_node(west, {name=MoD..":"..TRuNK, param2=12})
end end
if length >= 4 and minetest.registered_nodes[node_west2.name].buildable_to then if length >= 4 and check_node_buildable_to(west2) then
minetest.swap_node(west2, {name=MoD..":"..TRuNK, param2=12}) minetest.swap_node(west2, {name=MoD..":"..TRuNK, param2=12})
end end
minetest.swap_node(right_here, {name=MoD..":"..TRuNK, param2=12}) minetest.swap_node(right_here, {name=MoD..":"..TRuNK, param2=12})
if minetest.registered_nodes[node_east.name].buildable_to then if check_node_buildable_to(east) then
minetest.swap_node(east, {name=MoD..":"..TRuNK, param2=12}) minetest.swap_node(east, {name=MoD..":"..TRuNK, param2=12})
end end
if length == 5 and minetest.registered_nodes[node_east2.name].buildable_to then if length == 5 and check_node_buildable_to(east2) then
minetest.swap_node(east2, {name=MoD..":"..TRuNK, param2=12}) minetest.swap_node(east2, {name=MoD..":"..TRuNK, param2=12})
end end
else else
if minetest.registered_nodes[node_west.name].buildable_to then if check_node_buildable_to(west) then
minetest.swap_node(west, {name="default:tree", param2=12}) minetest.swap_node(west, {name="default:tree", param2=12})
end end
if length >= 4 and minetest.registered_nodes[node_west2.name].buildable_to then if length >= 4 and check_node_buildable_to(west2) then
minetest.swap_node(west2, {name="default:tree", param2=12}) minetest.swap_node(west2, {name="default:tree", param2=12})
end end
minetest.swap_node(right_here, {name="default:tree", param2=12}) minetest.swap_node(right_here, {name="default:tree", param2=12})
if minetest.registered_nodes[node_east.name].buildable_to then if check_node_buildable_to(east) then
minetest.swap_node(east, {name="default:tree", param2=12}) minetest.swap_node(east, {name="default:tree", param2=12})
end end
if length == 5 and minetest.registered_nodes[node_east2.name].buildable_to then if length == 5 and check_node_buildable_to(east2) then
minetest.swap_node(east2, {name="default:tree", param2=12}) minetest.swap_node(east2, {name="default:tree", param2=12})
end end
end end
@ -413,17 +387,9 @@ abstract_trunks.grow_moss_on_trunk = function(pos)
local at_side_e = {x=pos.x+1, y=pos.y, z=pos.z} local at_side_e = {x=pos.x+1, y=pos.y, z=pos.z}
local at_side_s = {x=pos.x, y=pos.y, z=pos.z-1} local at_side_s = {x=pos.x, y=pos.y, z=pos.z-1}
local at_side_w = {x=pos.x-1, y=pos.y, z=pos.z} local at_side_w = {x=pos.x-1, y=pos.y, z=pos.z}
local undrneath = {x=pos.x, y=pos.y-1, z=pos.z}
local node_here = minetest.get_node(on_ground)
local node_north = minetest.get_node(at_side_n)
local node_east = minetest.get_node(at_side_e)
local node_south = minetest.get_node(at_side_s)
local node_west = minetest.get_node(at_side_w)
local node_under = minetest.get_node(undrneath)
--if minetest.get_item_group(node_under.name, "tree") < 1 then --if minetest.get_item_group(node_under.name, "tree") < 1 then
if minetest.registered_nodes[node_here.name].buildable_to then if check_node_buildable_to(on_ground) then
local moss_type = math.random(1,41) local moss_type = math.random(1,41)
local rot = math.random(0,3) local rot = math.random(0,3)
if moss_type == 1 then if moss_type == 1 then
@ -432,7 +398,7 @@ abstract_trunks.grow_moss_on_trunk = function(pos)
minetest.swap_node(on_ground, {name="trunks:moss_plain_"..rot, param2=1}) minetest.swap_node(on_ground, {name="trunks:moss_plain_"..rot, param2=1})
end end
end end
if minetest.registered_nodes[node_north.name].buildable_to then if check_node_buildable_to(at_side_n) then
local moss_type = math.random(1,31) -- cliche of more moss at north local moss_type = math.random(1,31) -- cliche of more moss at north
local rot = math.random(0,3) local rot = math.random(0,3)
if moss_type == 1 then if moss_type == 1 then
@ -441,7 +407,7 @@ abstract_trunks.grow_moss_on_trunk = function(pos)
minetest.swap_node(at_side_n, {name="trunks:moss_plain_"..rot, param2=5}) minetest.swap_node(at_side_n, {name="trunks:moss_plain_"..rot, param2=5})
end end
end end
if minetest.registered_nodes[node_east.name].buildable_to then if check_node_buildable_to(at_side_e) then
local moss_type = math.random(1,41) local moss_type = math.random(1,41)
local rot = math.random(0,3) local rot = math.random(0,3)
if moss_type == 1 then if moss_type == 1 then
@ -450,7 +416,7 @@ abstract_trunks.grow_moss_on_trunk = function(pos)
minetest.swap_node(at_side_e, {name="trunks:moss_plain_"..rot, param2=3}) minetest.swap_node(at_side_e, {name="trunks:moss_plain_"..rot, param2=3})
end end
end end
if minetest.registered_nodes[node_south.name].buildable_to then if check_node_buildable_to(at_side_s) then
local moss_type = math.random(1,41) local moss_type = math.random(1,41)
local rot = math.random(0,3) local rot = math.random(0,3)
if moss_type == 1 then if moss_type == 1 then
@ -459,7 +425,7 @@ abstract_trunks.grow_moss_on_trunk = function(pos)
minetest.swap_node(at_side_s, {name="trunks:moss_plain_"..rot, param2=4}) minetest.swap_node(at_side_s, {name="trunks:moss_plain_"..rot, param2=4})
end end
end end
if minetest.registered_nodes[node_west.name].buildable_to then if check_node_buildable_to(at_side_w) then
local moss_type = math.random(1,41) local moss_type = math.random(1,41)
local rot = math.random(0,3) local rot = math.random(0,3)
if moss_type == 1 then if moss_type == 1 then
@ -520,10 +486,6 @@ abstract_trunks.grow_roots = function(pos)
local node_here = minetest.get_node(right_here) local node_here = minetest.get_node(right_here)
local node_below = minetest.get_node(below) local node_below = minetest.get_node(below)
local node_north = minetest.get_node(north)
local node_east = minetest.get_node(east)
local node_south = minetest.get_node(south)
local node_west = minetest.get_node(west)
for i in pairs(TRuNKS) do for i in pairs(TRuNKS) do
local MoD = TRuNKS[i][1] local MoD = TRuNKS[i][1]
@ -532,16 +494,16 @@ abstract_trunks.grow_roots = function(pos)
and node_here.name == MoD..":"..TRuNK and node_here.name == MoD..":"..TRuNK
and string.find(node_below.name, "dirt") and string.find(node_below.name, "dirt")
and node_here.param2 == 0 then and node_here.param2 == 0 then
if minetest.registered_nodes[node_north.name].buildable_to then if check_node_buildable_to(north) then
minetest.swap_node(north, {name="trunks:"..TRuNK.."root", param2=2}) minetest.swap_node(north, {name="trunks:"..TRuNK.."root", param2=2})
end end
if minetest.registered_nodes[node_east.name].buildable_to then if check_node_buildable_to(east) then
minetest.swap_node(east, {name="trunks:"..TRuNK.."root", param2=3}) minetest.swap_node(east, {name="trunks:"..TRuNK.."root", param2=3})
end end
if minetest.registered_nodes[node_south.name].buildable_to then if check_node_buildable_to(south) then
minetest.swap_node(south, {name="trunks:"..TRuNK.."root", param2=0}) minetest.swap_node(south, {name="trunks:"..TRuNK.."root", param2=0})
end end
if minetest.registered_nodes[node_west.name].buildable_to then if check_node_buildable_to(west) then
minetest.swap_node(west, {name="trunks:"..TRuNK.."root", param2=1}) minetest.swap_node(west, {name="trunks:"..TRuNK.."root", param2=1})
end end
end end

View file

@ -11,8 +11,8 @@ local enable_side = minetest.settings:get_bool("vines_enable_side", true)
local enable_jungle = minetest.settings:get_bool("vines_enable_jungle", true) local enable_jungle = minetest.settings:get_bool("vines_enable_jungle", true)
local enable_willow = minetest.settings:get_bool("vines_enable_willow", true) local enable_willow = minetest.settings:get_bool("vines_enable_willow", true)
local default_rarity = 75 local rarity_roots = tonumber(minetest.settings:get("vines_rarity_roots")) or 70
local rarity_roots = tonumber(minetest.settings:get("vines_rarity_roots")) or default_rarity local default_rarity = 95
local rarity_standard = tonumber(minetest.settings:get("vines_rarity_standard")) or default_rarity local rarity_standard = tonumber(minetest.settings:get("vines_rarity_standard")) or default_rarity
local rarity_side = tonumber(minetest.settings:get("vines_rarity_side")) or default_rarity local rarity_side = tonumber(minetest.settings:get("vines_rarity_side")) or default_rarity
local rarity_jungle = tonumber(minetest.settings:get("vines_rarity_jungle")) or default_rarity local rarity_jungle = tonumber(minetest.settings:get("vines_rarity_jungle")) or default_rarity
@ -43,7 +43,7 @@ local function on_dig(pos, node, player)
drop_item = vine_name_end drop_item = vine_name_end
end end
wielded_item = player:get_wielded_item() wielded_item = player and player:get_wielded_item()
if wielded_item then if wielded_item then
wielded_item:add_wear(1) wielded_item:add_wear(1)
if wielded_item:get_name() == 'vines:shears' then if wielded_item:get_name() == 'vines:shears' then
@ -371,6 +371,7 @@ if enable_roots ~= false then
spawn_on_bottom = true, spawn_on_bottom = true,
plantlife_limit = -0.6, plantlife_limit = -0.6,
rarity = rarity_roots, rarity = rarity_roots,
tries = 3,
humidity_min = 0.4, humidity_min = 0.4,
temp_min = 0.4, temp_min = 0.4,
}) })
@ -395,6 +396,7 @@ if enable_standard ~= false then
spawn_on_bottom = true, spawn_on_bottom = true,
plantlife_limit = -0.9, plantlife_limit = -0.9,
rarity = rarity_standard, rarity = rarity_standard,
tries = 1,
humidity_min = 0.7, humidity_min = 0.7,
temp_min = 0.4, temp_min = 0.4,
}) })
@ -419,6 +421,7 @@ if enable_side ~= false then
spawn_on_side = true, spawn_on_side = true,
plantlife_limit = -0.9, plantlife_limit = -0.9,
rarity = rarity_side, rarity = rarity_side,
tries = 1,
humidity_min = 0.4, humidity_min = 0.4,
temp_min = 0.4, temp_min = 0.4,
}) })
@ -451,6 +454,7 @@ if enable_jungle ~= false then
spawn_on_side = true, spawn_on_side = true,
plantlife_limit = -0.9, plantlife_limit = -0.9,
rarity = rarity_jungle, rarity = rarity_jungle,
tries = 1,
humidity_min = 0.2, humidity_min = 0.2,
temp_min = 0.3, temp_min = 0.3,
}) })
@ -473,6 +477,7 @@ if enable_willow ~= false then
spawn_on_side = true, spawn_on_side = true,
surface = {"moretrees:willow_leaves"}, surface = {"moretrees:willow_leaves"},
rarity = rarity_willow, rarity = rarity_willow,
tries = 1,
humidity_min = 0.5, humidity_min = 0.5,
temp_min = 0.5, temp_min = 0.5,
}) })

View file

@ -8,31 +8,31 @@ vines_enable_rope (Enable vine ropes) bool true
vines_enable_roots (Enable root vines) bool true vines_enable_roots (Enable root vines) bool true
#Rarity of root vines, from 1 to 100, higher numbers are rarer. #Rarity of root vines, from 1 to 100, higher numbers are rarer.
vines_rarity_roots (Rarity of roots vines) int 75 1 100 vines_rarity_roots (Rarity of roots vines) float 95 0 100
#Enables the standard type of vines. #Enables the standard type of vines.
vines_enable_standard (Enable standard vines) bool true vines_enable_standard (Enable standard vines) bool true
#Rarity of standard vines, from 1 to 100, higher numbers are rarer. #Rarity of standard vines, from 1 to 100, higher numbers are rarer.
vines_rarity_standard (Rarity of standard vines) int 75 1 100 vines_rarity_standard (Rarity of standard vines) float 95 0 100
#Enables the type of vines that grow on the sides of leaf blocks. #Enables the type of vines that grow on the sides of leaf blocks.
vines_enable_side (Enable side vines) bool true vines_enable_side (Enable side vines) bool true
#Rarity of side vines, from 1 to 100, higher numbers are rarer. #Rarity of side vines, from 1 to 100, higher numbers are rarer.
vines_rarity_side (Rarity of side vines) int 75 1 100 vines_rarity_side (Rarity of side vines) float 95 0 100
#Enables jungle style vines. #Enables jungle style vines.
vines_enable_jungle (Enable jungle vines) bool true vines_enable_jungle (Enable jungle vines) bool true
#Rarity of jungle vines, from 1 to 100, higher numbers are rarer. #Rarity of jungle vines, from 1 to 100, higher numbers are rarer.
vines_rarity_jungle (Rarity of jungle vines) int 75 1 100 vines_rarity_jungle (Rarity of jungle vines) float 95 0 100
#Enables willow vines. #Enables willow vines.
vines_enable_willow (Enable willow vines) bool true vines_enable_willow (Enable willow vines) bool true
#Rarity of willow vines, from 1 to 100, higher numbers are rarer. #Rarity of willow vines, from 1 to 100, higher numbers are rarer.
vines_rarity_willow (Rarity of willow vines) int 75 1 100 vines_rarity_willow (Rarity of willow vines) float 95 0 100
#Vine growth speed, minimum number of seconds between each growth. #Vine growth speed, minimum number of seconds between each growth.
vines_growth_min (Minimum number of seconds between growth) int 180 1 3600 vines_growth_min (Minimum number of seconds between growth) int 180 1 3600

View file

@ -1,8 +1,12 @@
-- support for i18n -- support for i18n
local S = minetest.get_translator("youngtrees") local S = minetest.get_translator("youngtrees")
abstract_youngtrees = {} abstract_youngtrees = {}
local youngtrees_youngtrees_rarity = tonumber(minetest.settings:get("youngtrees_youngtrees_rarity")) or 100
local youngtrees_youngtrees_rarity_fertility = tonumber(minetest.settings:get("youngtrees_youngtrees_rarity_fertility")) or 0.5
local youngtrees_youngtrees_fertility = tonumber(minetest.settings:get("youngtrees_youngtrees_fertility")) or -0.3
minetest.register_node("youngtrees:bamboo", { minetest.register_node("youngtrees:bamboo", {
description = S("Young Bamboo Tree"), description = S("Young Bamboo Tree"),
drawtype="nodebox", drawtype="nodebox",
@ -63,7 +67,6 @@ minetest.register_node("youngtrees:youngtree_top", {
drop = 'trunks:twig_1' drop = 'trunks:twig_1'
}) })
minetest.register_node("youngtrees:youngtree_middle", { minetest.register_node("youngtrees:youngtree_middle", {
description = S("Young Tree (middle)"), description = S("Young Tree (middle)"),
drawtype = "plantlike", drawtype = "plantlike",
@ -82,8 +85,6 @@ minetest.register_node("youngtrees:youngtree_middle", {
drop = 'trunks:twig_1' drop = 'trunks:twig_1'
}) })
minetest.register_node("youngtrees:youngtree_bottom", { minetest.register_node("youngtrees:youngtree_bottom", {
description = S("Young Tree (bottom)"), description = S("Young Tree (bottom)"),
drawtype = "plantlike", drawtype = "plantlike",
@ -103,14 +104,13 @@ minetest.register_node("youngtrees:youngtree_bottom", {
}) })
abstract_youngtrees.grow_youngtree = function(pos) abstract_youngtrees.grow_youngtree = function(pos)
local height = math.random(1,3) local height = math.random(1,3)
abstract_youngtrees.grow_youngtree_node(pos,height) abstract_youngtrees.grow_youngtree_node(pos,height)
end end
abstract_youngtrees.grow_youngtree_node = function(pos, height) abstract_youngtrees.grow_youngtree_node = function(pos, height)
local right_here = {x=pos.x, y=pos.y+1, z=pos.z} local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z} local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
@ -140,10 +140,10 @@ biome_lib.register_on_generate({
"sumpf:peat", "sumpf:peat",
"sumpf:sumpf" "sumpf:sumpf"
}, },
max_count = 55, --10,15 rarity = youngtrees_youngtrees_rarity,
rarity = 101 - 4, --3,4 rarity_fertility = youngtrees_youngtrees_rarity_fertility,
plantlife_limit = youngtrees_youngtrees_fertility,
min_elevation = 1, -- above sea level min_elevation = 1, -- above sea level
plantlife_limit = -0.9,
}, },
abstract_youngtrees.grow_youngtree abstract_youngtrees.grow_youngtree
) )

View file

@ -0,0 +1,8 @@
#Youngtree rarity %
youngtrees_youngtrees_rarity (Youngtree rarity %) float 100 0 100
#How much the rarity is reduced by fertility %
youngtrees_youngtrees_rarity_fertility (Youngtree rarity fertility reduction %) float 0.5 0 100
#Youngtree minimum fertility (-1 to +1)
youngtrees_youngtrees_fertility (Youngtree minimum fertility) float -0.3 -1 1

View file

@ -0,0 +1,3 @@
Haruko
tractionmain
CC BY-NC-SA 3.0

View file

@ -0,0 +1,3 @@
Haruko
Grampsman
CC BY-NC-SA 3.0

View file

@ -0,0 +1,3 @@
Tom From SkyBlock Telesight Server
yotuderconnect
CC 0 (1.0)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 842 B

View file

@ -1,2 +1,2 @@
default default?
intllib? intllib?

View file

@ -332,7 +332,9 @@ function ui.apply_filter(player, filter, search_dir)
return true return true
end end
else else
local lang = minetest.get_player_information(player_name).lang_code local player_info = minetest.get_player_information(player_name)
local lang = player_info and player_info.lang_code or ""
ffilter = function(name, def) ffilter = function(name, def)
local lname = string.lower(name) local lname = string.lower(name)
local ldesc = string.lower(def.description) local ldesc = string.lower(def.description)

View file

@ -499,6 +499,14 @@ local function craftguide_craft(player, formname, fields)
local alternate = ui.alternate[player_name] local alternate = ui.alternate[player_name]
local craft = crafts[alternate] local craft = crafts[alternate]
if not craft.width then
if not craft.output then
minetest.log("warning", "[unified_inventory] Craft has no output.")
else
minetest.log("warning", ("[unified_inventory] Craft for '%s' has no width."):format(craft.output))
end
return
end
if craft.width > 3 then return end if craft.width > 3 then return end
ui.craftguide_match_craft(player, "main", "craft", craft, amount) ui.craftguide_match_craft(player, "main", "craft", craft, amount)

View file

@ -36,6 +36,7 @@ check=
Bowl= Bowl=
Bowl of soup= Bowl of soup=
Cauldron= Cauldron=
Cauldron (active)=
Cauldron (active) - Drop foods inside to make a soup= Cauldron (active) - Drop foods inside to make a soup=
Cauldron (active) - Use a bowl to eat the soup= Cauldron (active) - Use a bowl to eat the soup=
Cauldron (empty)= Cauldron (empty)=

Some files were not shown because too many files have changed in this diff Show more