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:
@ -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}
|
||||
|
Reference in New Issue
Block a user