Re-add simple spawn settings for some plants (#62)

* Red-add simple spawn settings for some plants

* Add pl_
This commit is contained in:
Niklp 2023-10-24 12:52:42 +02:00 committed by GitHub
parent 46608a7fb9
commit 3fce92a9f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 8 deletions

View File

@ -4,6 +4,8 @@
-- support for i18n -- support for i18n
local S = minetest.get_translator("molehills") local S = minetest.get_translator("molehills")
local molehill_rarity = minetest.settings:get("molehills.molehill_rarity") or 0.002
-- Node -- Node
local mh_cbox = { local mh_cbox = {
type = "fixed", type = "fixed",
@ -38,7 +40,7 @@ minetest.register_decoration({
decoration = { decoration = {
"molehills:molehill" "molehills:molehill"
}, },
fill_ratio = 0.002, fill_ratio = molehill_rarity,
y_min = 1, y_min = 1,
y_max = 40, y_max = 40,
place_on = { place_on = {

View File

@ -0,0 +1,2 @@
# Molehill rarity (higher number -> higher probability)
molehills.molehill_rarity (Molehill rarity) float 0.002 0.0001 1

View File

@ -1,6 +1,8 @@
-- support for i18n -- support for i18n
local S = minetest.get_translator("pl_sunflowers") local S = minetest.get_translator("pl_sunflowers")
local sunflower_rarity = minetest.settings:get("pl_sunflowers.sunflower_rarity") or 0.005
local box = { local box = {
type="fixed", type="fixed",
fixed = { { -0.2, -0.5, -0.2, 0.2, 0.5, 0.2 } }, fixed = { { -0.2, -0.5, -0.2, 0.2, 0.5, 0.2 } },
@ -40,7 +42,7 @@ minetest.register_decoration({
decoration = { decoration = {
"flowers:sunflower" "flowers:sunflower"
}, },
fill_ratio = 0.005, fill_ratio = sunflower_rarity,
y_min = 1, y_min = 1,
y_max = 40, y_max = 40,
param2 = 0, param2 = 0,

View File

@ -1,5 +1,2 @@
#Sunflowers maximum count # Sunflower rarity (higher number -> higher probability)
pl_sunflowers_max_count (Sunflowers maximum count) int 10 1 1000 pl_sunflowers.sunflower_rarity (Sunflower rarity) float 0.005 0.0001 1
#Sunflowers rarity
pl_sunflowers_rarity (Sunflowers rarity) int 25 0 100

View File

@ -1,6 +1,8 @@
-- support for i18n -- support for i18n
local S = minetest.get_translator("youngtrees") local S = minetest.get_translator("youngtrees")
local youngtree_rarity = minetest.settings:get("youngtrees.youngtree_rarity") or 0.0005
minetest.register_node("youngtrees:bamboo", { minetest.register_node("youngtrees:bamboo", {
description = S("Young Bamboo Tree"), description = S("Young Bamboo Tree"),
drawtype="nodebox", drawtype="nodebox",
@ -105,7 +107,7 @@ minetest.register_decoration({
decoration = { decoration = {
"youngtrees:youngtree_bottom" "youngtrees:youngtree_bottom"
}, },
fill_ratio = 0.0005, fill_ratio = youngtree_rarity,
y_min = 1, y_min = 1,
y_max = 40, y_max = 40,
param2 = 0, param2 = 0,

View File

@ -0,0 +1,2 @@
# Youngtree rarity (higher number -> higher probability)
youngtrees.youngtree_rarity (Youngtree rarity) float 0.0005 0.0001 1