1
0
mirror of https://codeberg.org/tenplus1/farming.git synced 2025-06-29 06:40:45 +02:00

add random seed for each registered decoration, tidy code

This commit is contained in:
tenplus1
2022-09-13 18:30:55 +01:00
parent 97d15d3ea1
commit 6ac255d4c0
38 changed files with 170 additions and 181 deletions

View File

@ -104,7 +104,7 @@ end
-- Growth Logic
local STAGE_LENGTH_AVG = tonumber(
minetest.settings:get("farming_stage_length")) or 200 -- 160
minetest.settings:get("farming_stage_length")) or 200
local STAGE_LENGTH_DEV = STAGE_LENGTH_AVG / 6
@ -367,8 +367,8 @@ function farming.plant_growth_timer(pos, elapsed, node_name)
growth = 1
else
local night_light = (minetest.get_node_light(light_pos, 0) or 0)
local day_light = (minetest.get_node_light(light_pos, 0.5) or 0)
local night_light = (minetest.get_node_light(light_pos, 0) or 0)
local day_light = (minetest.get_node_light(light_pos, 0.5) or 0)
local night_growth = night_light >= MIN_LIGHT and night_light <= MAX_LIGHT
local day_growth = day_light >= MIN_LIGHT and day_light <= MAX_LIGHT
@ -746,4 +746,9 @@ ddoo("spinach.lua", farming.eggplant)
dofile(farming.path .. "/food.lua")
dofile(farming.path .. "/compatibility.lua") -- Farming Plus compatibility
dofile(farming.path .. "/lucky_block.lua")
if minetest.get_modpath("lucky_block") then
dofile(farming.path .. "/lucky_block.lua")
end
print("[MOD] Farming Redo loaded")