1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-29 21:30:26 +02:00

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
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)