mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-07-04 21:50:46 -04:00
Fix some placer nil checks
This commit is contained in:
parent
a3b171e317
commit
70cf7a26fd
6 changed files with 18 additions and 18 deletions
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue