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
6 changed files with 15 additions and 8 deletions

View File

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

View File

@ -1,5 +1,2 @@
#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
# Sunflower rarity (higher number -> higher probability)
pl_sunflowers.sunflower_rarity (Sunflower rarity) float 0.005 0.0001 1