1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-30 13:50:23 +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

@ -488,16 +488,15 @@ function default.sapling_on_place(itemstack, placer, pointed_thing,
interval) then
minetest.record_protection_violation(pos, player_name)
-- Print extra information to explain
-- minetest.chat_send_player(player_name,
-- itemstack:get_definition().description .. " will intersect protection " ..
-- "on growth")
minetest.chat_send_player(player_name,
S("@1 will intersect protection on growth.",
itemstack:get_definition().description))
return itemstack
end
default.log_player_action(placer, "places node", sapling_name, "at", pos)
if placer then
default.log_player_action(placer, "places node", sapling_name, "at", pos)
end
local take_item = not minetest.is_creative_enabled(player_name)
local newnode = {name = sapling_name}