mirror of
https://codeberg.org/tenplus1/farming.git
synced 2025-06-30 15:20:42 +02:00
Merge branch 'master' of yunohost.local:mtcontrib/farming into nalc-1.2-dev
This commit is contained in:
15
init.lua
15
init.lua
@ -7,7 +7,7 @@
|
||||
|
||||
farming = {
|
||||
mod = "redo",
|
||||
version = "20190427",
|
||||
version = "20191202",
|
||||
path = minetest.get_modpath("farming"),
|
||||
select = {
|
||||
type = "fixed",
|
||||
@ -269,7 +269,7 @@ end
|
||||
|
||||
minetest.after(0, function()
|
||||
|
||||
for _, node_def in ipairs(minetest.registered_nodes) do
|
||||
for _, node_def in pairs(minetest.registered_nodes) do
|
||||
register_plant_node(node_def)
|
||||
end
|
||||
end)
|
||||
@ -278,7 +278,7 @@ end)
|
||||
-- Just in case a growing type or added node is missed (also catches existing
|
||||
-- nodes added to map before timers were incorporated).
|
||||
minetest.register_abm({
|
||||
nodenames = { "group:growing" },
|
||||
nodenames = {"group:growing"},
|
||||
interval = 300,
|
||||
chance = 1,
|
||||
catch_up = false,
|
||||
@ -421,7 +421,7 @@ function farming.place_seed(itemstack, placer, pointed_thing, plantname)
|
||||
-- am I right-clicking on something that has a custom on_place set?
|
||||
-- thanks to Krock for helping with this issue :)
|
||||
local def = minetest.registered_nodes[under.name]
|
||||
if placer and def and def.on_rightclick then
|
||||
if placer and itemstack and def and def.on_rightclick then
|
||||
return def.on_rightclick(pt.under, under, placer, itemstack)
|
||||
end
|
||||
|
||||
@ -461,7 +461,8 @@ function farming.place_seed(itemstack, placer, pointed_thing, plantname)
|
||||
|
||||
minetest.sound_play("default_place_node", {pos = pt.above, gain = 1.0})
|
||||
|
||||
if placer and not farming.is_creative(placer:get_player_name()) then
|
||||
if placer and itemstack
|
||||
and not farming.is_creative(placer:get_player_name()) then
|
||||
|
||||
local name = itemstack:get_name()
|
||||
|
||||
@ -614,8 +615,8 @@ farming.rhubarb = 0.001
|
||||
farming.beans = 0.001
|
||||
farming.grapes = 0.001
|
||||
farming.barley = true
|
||||
farming.chili = 0.002
|
||||
farming.hemp = 0.002
|
||||
farming.chili = 0.003
|
||||
farming.hemp = 0.003
|
||||
farming.garlic = 0.001
|
||||
farming.onion = 0.001
|
||||
farming.pepper = 0.002
|
||||
|
Reference in New Issue
Block a user