Use Minetest 5.3 'minetest.is_creative_enabled' API (#2795)

This commit is contained in:
Maksim 2020-12-13 18:59:19 +01:00 committed by GitHub
parent 9c29019301
commit e6aec880de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 34 additions and 65 deletions

View file

@ -575,8 +575,7 @@ function default.sapling_on_place(itemstack, placer, pointed_thing,
minetest.log("action", player_name .. " places node "
.. sapling_name .. " at " .. minetest.pos_to_string(pos))
local take_item = not (creative and creative.is_enabled_for
and creative.is_enabled_for(player_name))
local take_item = not minetest.is_creative_enabled(player_name)
local newnode = {name = sapling_name}
local ndef = minetest.registered_nodes[sapling_name]
minetest.set_node(pos, newnode)