mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2024-12-25 10:20:45 +01:00
add configuration for plant growth timers
This commit is contained in:
parent
03d1ce841a
commit
78a6f1a59f
16
config.lua
16
config.lua
@ -33,6 +33,15 @@ local trees = {
|
||||
{name="tower_cap", min_depth=-100, max_depth=-31000, delay_multiplier = 1},
|
||||
}
|
||||
|
||||
local plants = {
|
||||
{name="cave_wheat", delay_multiplier=1},
|
||||
{name="dimple_cup", delay_multiplier=3},
|
||||
{name="pig_tail", delay_multiplier=1},
|
||||
{name="plump_helmet", delay_multiplier=3},
|
||||
{name="quarry_bush", delay_multiplier=2},
|
||||
{name="sweet_pod", delay_multiplier=2},
|
||||
}
|
||||
|
||||
setting("int", "tree_min_growth_delay", 2400, "Minimum sapling growth delay")
|
||||
setting("int", "tree_max_growth_delay", 4800, "Maximum sapling growth delay")
|
||||
|
||||
@ -47,4 +56,11 @@ setting("int", "blood_thorn_growth_chance", 83, "blood_thorn growth ABM chance")
|
||||
setting("int", "blood_thorn_min_depth", -100, "blood_thorn minimum sapling growth depth")
|
||||
setting("int", "blood_thorn_max_depth", -31000, "blood_thorn maximum sapling growth depth")
|
||||
|
||||
setting("int", "plant_growth_timer", 100, "Base plant growth timer interval")
|
||||
setting("int", "plant_growth_chance", 4, "Base plant growth chance")
|
||||
|
||||
for _, plant in pairs(plants) do
|
||||
setting("float", plant.name.."_timer_multiplier", plant.delay_multiplier, plant.name.." growth delay multiplier")
|
||||
end
|
||||
|
||||
setting("bool", "light_kills_fungus", true, "Light kills fungus")
|
@ -51,7 +51,7 @@ end
|
||||
dfcaverns.register_seed("cave_wheat_seed", S("Cave Wheat Seed"), "dfcaverns_cave_wheat_seed.png", "dfcaverns:cave_wheat_1")
|
||||
table.insert(wheat_names, "dfcaverns:cave_wheat_seed")
|
||||
|
||||
dfcaverns.register_grow_abm(wheat_names, 10, 1)
|
||||
dfcaverns.register_grow_abm(wheat_names, dfcaverns.config.plant_growth_timer * dfcaverns.config.cave_wheat_timer_multiplier, dfcaverns.config.plant_growth_chance)
|
||||
|
||||
minetest.register_craftitem("dfcaverns:cave_wheat", {
|
||||
description = S("Cave Wheat"),
|
||||
|
@ -45,4 +45,4 @@ end
|
||||
dfcaverns.register_seed("dimple_cup_seed", S("Dimple Cup Spores"), "dfcaverns_dimple_cup_seed.png", "dfcaverns:dimple_cup_1")
|
||||
table.insert(dimple_names, "dfcaverns:dimple_cup_seed")
|
||||
|
||||
dfcaverns.register_grow_abm(dimple_names, 10, 1)
|
||||
dfcaverns.register_grow_abm(dimple_names, dfcaverns.config.plant_growth_timer * dfcaverns.config.dimple_cup_timer_multiplier, dfcaverns.config.plant_growth_chance)
|
||||
|
@ -51,7 +51,7 @@ end
|
||||
dfcaverns.register_seed("pig_tail_seed", S("Pig Tail Spore"), "dfcaverns_pig_tail_seed.png", "dfcaverns:pig_tail_1")
|
||||
table.insert(pig_tail_names, "dfcaverns:pig_tail_seed")
|
||||
|
||||
dfcaverns.register_grow_abm(pig_tail_names, 10, 1)
|
||||
dfcaverns.register_grow_abm(pig_tail_names, dfcaverns.config.plant_growth_timer * dfcaverns.config.pig_tail_timer_multiplier, dfcaverns.config.plant_growth_chance)
|
||||
|
||||
minetest.register_craftitem("dfcaverns:pig_tail_thread", {
|
||||
description = S("Pig tail thread"),
|
||||
|
@ -226,7 +226,8 @@ minetest.register_node("dfcaverns:plump_helmet_4", {
|
||||
})
|
||||
|
||||
local plump_names = {"dfcaverns:plump_helmet_spawn", "dfcaverns:plump_helmet_1", "dfcaverns:plump_helmet_2", "dfcaverns:plump_helmet_3"}
|
||||
dfcaverns.register_grow_abm(plump_names, 10, 1)
|
||||
|
||||
dfcaverns.register_grow_abm(plump_names, dfcaverns.config.plant_growth_timer * dfcaverns.config.plump_helmet_timer_multiplier, dfcaverns.config.plant_growth_chance)
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
|
@ -52,7 +52,7 @@ end
|
||||
dfcaverns.register_seed("quarry_bush_seed", S("Rock Nuts"), "dfcaverns_rock_nuts.png", "dfcaverns:quarry_bush_1")
|
||||
table.insert(quarry_names, "dfcaverns:quarry_bush_seed")
|
||||
|
||||
dfcaverns.register_grow_abm(quarry_names, 10, 1)
|
||||
dfcaverns.register_grow_abm(quarry_names, dfcaverns.config.plant_growth_timer * dfcaverns.config.quarry_bush_timer_multiplier, dfcaverns.config.plant_growth_chance)
|
||||
|
||||
minetest.register_craftitem("dfcaverns:quarry_bush_leaves", {
|
||||
description = S("Quarry Bush Leaves"),
|
||||
|
@ -50,7 +50,7 @@ end
|
||||
dfcaverns.register_seed("sweet_pod_seed", S("Sweet Pod Spores"), "dfcaverns_sweet_pod_seed.png", "dfcaverns:sweet_pod_1")
|
||||
table.insert(sweet_names, "dfcaverns:sweet_pod_seed")
|
||||
|
||||
dfcaverns.register_grow_abm(sweet_names, 10, 1)
|
||||
dfcaverns.register_grow_abm(sweet_names, dfcaverns.config.plant_growth_timer * dfcaverns.config.sweet_pod_timer_multiplier, dfcaverns.config.plant_growth_chance)
|
||||
|
||||
minetest.register_craftitem("dfcaverns:sweet_pods", {
|
||||
description = S("Sweet Pods"),
|
||||
|
@ -25,4 +25,12 @@ dfcaverns_blood_thorn_growth_interval (blood_thorn growth ABM interval) int 12
|
||||
dfcaverns_blood_thorn_growth_chance (blood_thorn growth ABM chance) int 83
|
||||
dfcaverns_blood_thorn_min_depth (blood_thorn minimum sapling growth depth) int -100
|
||||
dfcaverns_blood_thorn_max_depth (blood_thorn maximum sapling growth depth) int -31000
|
||||
dfcaverns_plant_growth_timer (Base plant growth timer interval) int 100
|
||||
dfcaverns_plant_growth_chance (Base plant growth chance) int 4
|
||||
dfcaverns_cave_wheat_timer_multiplier (cave_wheat growth delay multiplier) float 1
|
||||
dfcaverns_dimple_cup_timer_multiplier (dimple_cup growth delay multiplier) float 3
|
||||
dfcaverns_pig_tail_timer_multiplier (pig_tail growth delay multiplier) float 1
|
||||
dfcaverns_plump_helmet_timer_multiplier (plump_helmet growth delay multiplier) float 3
|
||||
dfcaverns_quarry_bush_timer_multiplier (quarry_bush growth delay multiplier) float 2
|
||||
dfcaverns_sweet_pod_timer_multiplier (sweet_pod growth delay multiplier) float 2
|
||||
dfcaverns_light_kills_fungus (Light kills fungus) bool true
|
Loading…
Reference in New Issue
Block a user