1
0
mirror of https://github.com/mt-mods/plantlife_modpack.git synced 2025-07-15 14:20:32 +02:00

get rid of ancient settings in dryplants

This commit is contained in:
wsor4035
2023-07-21 11:21:54 -04:00
parent ed2cfa4c2c
commit 87fbe6fc8d
6 changed files with 122 additions and 130 deletions

View File

@ -3,7 +3,7 @@ allow_defined_top = true
max_line_length = 185 max_line_length = 185
globals = { globals = {
"biome_lib", "biome_lib", "abstract_dryplants",
} }
read_globals = { read_globals = {

View File

@ -14,15 +14,11 @@ local S = minetest.get_translator("dryplants")
dofile(minetest.get_modpath("dryplants").."/crafting.lua") dofile(minetest.get_modpath("dryplants").."/crafting.lua")
dofile(minetest.get_modpath("dryplants").."/settings.txt") dofile(minetest.get_modpath("dryplants").."/settings.txt")
dofile(minetest.get_modpath("dryplants").."/reed.lua") dofile(minetest.get_modpath("dryplants").."/reed.lua")
if REEDMACE_GENERATES == true then
dofile(minetest.get_modpath("dryplants").."/reedmace.lua") dofile(minetest.get_modpath("dryplants").."/reedmace.lua")
end dofile(minetest.get_modpath("dryplants").."/juncus.lua")
if SMALL_JUNCUS_GENERATES == true then dofile(minetest.get_modpath("dryplants").."/moregrass.lua")
dofile(minetest.get_modpath("dryplants").."/juncus.lua")
end
if EXTRA_TALL_GRASS_GENERATES == true then
dofile(minetest.get_modpath("dryplants").."/moregrass.lua")
end
--dofile(minetest.get_modpath("dryplants").."/meadowvariation.lua") --dofile(minetest.get_modpath("dryplants").."/meadowvariation.lua")
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------
@ -140,7 +136,7 @@ minetest.register_node("dryplants:grass", {
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------
minetest.register_abm({ minetest.register_abm({
nodenames = {"dryplants:grass"}, nodenames = {"dryplants:grass"},
interval = HAY_DRYING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle interval = 3600, --1200, -- 20 minutes: a minetest-day/night-cycle
chance = 1, chance = 1,
action = function(pos) action = function(pos)
minetest.swap_node(pos, {name="dryplants:hay"}) minetest.swap_node(pos, {name="dryplants:hay"})
@ -186,8 +182,8 @@ minetest.register_node("dryplants:grass_short", {
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------
minetest.register_abm({ minetest.register_abm({
nodenames = {"dryplants:grass_short"}, nodenames = {"dryplants:grass_short"},
interval = GRASS_REGROWING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle interval = 1200, --1200, -- 20 minutes: a minetest-day/night-cycle
chance = 100/GRASS_REGROWING_CHANCE, chance = 100/1200,
action = function(pos) action = function(pos)
-- Only become dirt with grass if no cut grass or hay lies on top -- Only become dirt with grass if no cut grass or hay lies on top
local above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}) local above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})
@ -196,3 +192,5 @@ minetest.register_abm({
end end
end, end,
}) })
abstract_dryplants.loaded = true

View File

@ -105,8 +105,8 @@ biome_lib.register_on_generate({
"sumpf:peat", "sumpf:peat",
"sumpf:sumpf" "sumpf:sumpf"
}, },
max_count = JUNCUS_NEAR_WATER_PER_MAPBLOCK, max_count = 70,
rarity = 101 - JUNCUS_NEAR_WATER_RARITY, rarity = 101 - 75,
min_elevation = 1, -- above sea level min_elevation = 1, -- above sea level
near_nodes = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"}, near_nodes = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
near_nodes_size = 2, near_nodes_size = 2,
@ -126,8 +126,8 @@ biome_lib.register_on_generate({
--"sumpf:peat", --"sumpf:peat",
--"sumpf:sumpf" --"sumpf:sumpf"
}, },
max_count = JUNCUS_AT_BEACH_PER_MAPBLOCK, max_count = 70,
rarity = 101 - JUNCUS_AT_BEACH_RARITY, rarity = 101 - 75,
min_elevation = 1, -- above sea level min_elevation = 1, -- above sea level
near_nodes = {"default:dirt_with_grass"}, near_nodes = {"default:dirt_with_grass"},
near_nodes_size = 2, near_nodes_size = 2,

View File

@ -15,8 +15,8 @@ biome_lib.register_on_generate(
"sumpf:peat", "sumpf:peat",
"sumpf:sumpf" "sumpf:sumpf"
}, },
max_count = TALL_GRASS_PER_MAPBLOCK, max_count = 4800,
rarity = 101 - TALL_GRASS_RARITY, rarity = 101 - 75,
min_elevation = 1, -- above sea level min_elevation = 1, -- above sea level
plantlife_limit = -0.9, plantlife_limit = -0.9,
check_air = true, check_air = true,

View File

@ -75,15 +75,13 @@ minetest.register_node("dryplants:wetreed_roof", {
sounds = default.node_sound_leaves_defaults(), sounds = default.node_sound_leaves_defaults(),
}) })
if AUTO_ROOF_CORNER == true then local CoRNeR = {
local CoRNeR = {
-- MaTeRiaL -- MaTeRiaL
{"wetreed"}, {"wetreed"},
{"reed"} {"reed"}
} }
for i in pairs(CoRNeR) do for i in pairs(CoRNeR) do
local MaTeRiaL = CoRNeR[i][1] local MaTeRiaL = CoRNeR[i][1]
local roof = "dryplants:"..MaTeRiaL.."_roof" local roof = "dryplants:"..MaTeRiaL.."_roof"
@ -167,7 +165,6 @@ if AUTO_ROOF_CORNER == true then
end, end,
}) })
end
end end
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------
@ -233,31 +230,28 @@ minetest.register_node("dryplants:wetreed_roof_corner_2", {
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------
-- Wet Reed becomes (dry) Reed over time -- Wet Reed becomes (dry) Reed over time
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------
if REED_WILL_DRY == true then local DRyiNG = {
local DRyiNG = {
-- WeT DRy -- WeT DRy
{"dryplants:wetreed", "dryplants:reed"}, {"dryplants:wetreed", "dryplants:reed"},
{"dryplants:wetreed_slab", "dryplants:reed_slab"}, {"dryplants:wetreed_slab", "dryplants:reed_slab"},
{"dryplants:wetreed_roof", "dryplants:reed_roof"}, {"dryplants:wetreed_roof", "dryplants:reed_roof"},
{"dryplants:wetreed_roof_corner", "dryplants:reed_roof_corner"}, {"dryplants:wetreed_roof_corner", "dryplants:reed_roof_corner"},
{"dryplants:wetreed_roof_corner_2", "dryplants:reed_roof_corner_2"} {"dryplants:wetreed_roof_corner_2", "dryplants:reed_roof_corner_2"}
} }
for i in pairs(DRyiNG) do for i in pairs(DRyiNG) do
local WeT = DRyiNG[i][1] local WeT = DRyiNG[i][1]
local DRy = DRyiNG[i][2] local DRy = DRyiNG[i][2]
minetest.register_abm({ minetest.register_abm({
nodenames = {WeT}, nodenames = {WeT},
interval = REED_DRYING_TIME, --1200, -- 20 minutes: a minetest-day/night-cycle interval = 3600, --1200, -- 20 minutes: a minetest-day/night-cycle
chance = 1, chance = 1,
action = function(pos) action = function(pos)
local direction = minetest.get_node(pos).param2 local direction = minetest.get_node(pos).param2
minetest.swap_node(pos, {name=DRy, param2=direction}) minetest.swap_node(pos, {name=DRy, param2=direction})
end, end,
}) })
end
end end
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------

View File

@ -276,8 +276,8 @@ minetest.register_node("dryplants:reedmace_sapling", {
-- abm -- abm
minetest.register_abm({ minetest.register_abm({
nodenames = "dryplants:reedmace_sapling", nodenames = "dryplants:reedmace_sapling",
interval = REEDMACE_GROWING_TIME, interval = 600,
chance = 100/REEDMACE_GROWING_CHANCE, chance = 100/5,
action = function(pos, node, _, _) action = function(pos, node, _, _)
if string.find(minetest.get_node({x = pos.x + 1, y = pos.y, z = pos.z }).name, "default:water") if string.find(minetest.get_node({x = pos.x + 1, y = pos.y, z = pos.z }).name, "default:water")
or string.find(minetest.get_node({x = pos.x, y = pos.y, z = pos.z + 1}).name, "default:water") or string.find(minetest.get_node({x = pos.x, y = pos.y, z = pos.z + 1}).name, "default:water")
@ -357,8 +357,8 @@ biome_lib.register_on_generate({
"sumpf:peat", "sumpf:peat",
"sumpf:sumpf" "sumpf:sumpf"
}, },
max_count = REEDMACE_NEAR_WATER_PER_MAPBLOCK, max_count = 35,
rarity = 101 - REEDMACE_NEAR_WATER_RARITY, rarity = 101 - 40,
--rarity = 60, --rarity = 60,
min_elevation = 1, -- above sea level min_elevation = 1, -- above sea level
near_nodes = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"}, near_nodes = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
@ -380,8 +380,8 @@ biome_lib.register_on_generate({
"sumpf:peat", "sumpf:peat",
"sumpf:sumpf" "sumpf:sumpf"
}, },
max_count = REEDMACE_IN_WATER_PER_MAPBLOCK, max_count = 35,
rarity = 101 - REEDMACE_IN_WATER_RARITY, rarity = 101 - 65,
--rarity = 35, --rarity = 35,
min_elevation = 0, -- a bit below sea level min_elevation = 0, -- a bit below sea level
max_elevation = 0, -- "" max_elevation = 0, -- ""
@ -398,8 +398,8 @@ biome_lib.register_on_generate({
"default:sand", "default:sand",
"sumpf:sumpf" "sumpf:sumpf"
}, },
max_count = REEDMACE_FOR_OASES_PER_MAPBLOCK, max_count = 35,
rarity = 101 - REEDMACE_FOR_OASES_RARITY, rarity = 101 - 90,
--rarity = 10, --rarity = 10,
neighbors = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"}, neighbors = {"default:water_source","sumpf:dirtywater_source","sumpf:sumpf"},
ncount = 1, ncount = 1,