1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-28 04:40:22 +02:00

Fix some placer nil checks

This commit is contained in:
sfan5
2024-01-11 15:50:36 +01:00
committed by GitHub
parent a3b171e317
commit 70cf7a26fd
6 changed files with 18 additions and 18 deletions

View File

@ -178,7 +178,9 @@ farming.place_seed = function(itemstack, placer, pointed_thing, plantname)
end
-- add the node and remove 1 item from the itemstack
default.log_player_action(placer, "places node", plantname, "at", pt.above)
if placer then
default.log_player_action(placer, "places node", plantname, "at", pt.above)
end
minetest.add_node(pt.above, {name = plantname, param2 = 1})
tick(pt.above)
if not minetest.is_creative_enabled(player_name) then