Use Minetest 5.3 'minetest.is_creative_enabled' API (#2795)
This commit is contained in:
parent
9c29019301
commit
e6aec880de
19 changed files with 34 additions and 65 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue