mirror of
https://codeberg.org/tenplus1/farming.git
synced 2025-06-29 23:01:00 +02:00
code tidy and tweak
This commit is contained in:
16
init.lua
16
init.lua
@ -7,7 +7,7 @@
|
||||
|
||||
farming = {
|
||||
mod = "redo",
|
||||
version = "20200527",
|
||||
version = "20200702",
|
||||
path = minetest.get_modpath("farming"),
|
||||
select = {
|
||||
type = "fixed",
|
||||
@ -80,7 +80,7 @@ end
|
||||
|
||||
-- Growth Logic
|
||||
local STAGE_LENGTH_AVG = tonumber(
|
||||
minetest.settings:get("farming_stage_length")) or 160
|
||||
minetest.settings:get("farming_stage_length")) or 200 -- 160
|
||||
local STAGE_LENGTH_DEV = STAGE_LENGTH_AVG / 6
|
||||
|
||||
|
||||
@ -315,7 +315,7 @@ function farming.plant_growth_timer(pos, elapsed, node_name)
|
||||
|
||||
-- otherwise check for wet soil beneath crop
|
||||
else
|
||||
local under = minetest.get_node({ x = pos.x, y = pos.y - 1, z = pos.z })
|
||||
local under = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z})
|
||||
|
||||
if minetest.get_item_group(under.name, "soil") < 3 then
|
||||
return true
|
||||
@ -582,7 +582,7 @@ farming.register_plant = function(name, def)
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
minlight = def.minlight,
|
||||
maxlight = def.maxlight,
|
||||
next_plant = next_plant,
|
||||
next_plant = next_plant
|
||||
})
|
||||
end
|
||||
|
||||
@ -693,7 +693,7 @@ ddoo("ryeoatrice.lua", farming.grains)
|
||||
ddoo("mint.lua", farming.mint)
|
||||
ddoo("cabbage.lua", farming.cabbage)
|
||||
|
||||
dofile(farming.path.."/food.lua")
|
||||
dofile(farming.path.."/mapgen.lua")
|
||||
dofile(farming.path.."/compatibility.lua") -- Farming Plus compatibility
|
||||
dofile(farming.path.."/lucky_block.lua")
|
||||
dofile(farming.path .. "/food.lua")
|
||||
dofile(farming.path .. "/mapgen.lua")
|
||||
dofile(farming.path .. "/compatibility.lua") -- Farming Plus compatibility
|
||||
dofile(farming.path .. "/lucky_block.lua")
|
||||
|
Reference in New Issue
Block a user