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

@ -111,8 +111,7 @@ minetest.register_tool("fire:flint_and_steel", {
minetest.set_node(pointed_thing.above, {name = "fire:basic_flame"})
end
end
if not (creative and creative.is_enabled_for
and creative.is_enabled_for(player_name)) then
if not minetest.is_creative_enabled(player_name) then
-- Wear tool
local wdef = itemstack:get_definition()
itemstack:add_wear(1000)