mirror of
https://codeberg.org/tenplus1/farming.git
synced 2024-12-26 18:50:20 +01:00
add nil check for itemstack when placing and taking seed from inventory
This commit is contained in:
parent
4465c49a19
commit
d5dab7938a
5
init.lua
5
init.lua
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
farming = {
|
farming = {
|
||||||
mod = "redo",
|
mod = "redo",
|
||||||
version = "20190625",
|
version = "20190728",
|
||||||
path = minetest.get_modpath("farming"),
|
path = minetest.get_modpath("farming"),
|
||||||
select = {
|
select = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
@ -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})
|
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()
|
local name = itemstack:get_name()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user