1
0
mirror of https://codeberg.org/tenplus1/farming.git synced 2024-12-26 18:50:20 +01:00

fix creative check for hoebomb

This commit is contained in:
TenPlus1 2018-05-22 19:51:01 +01:00
parent 3176cd5127
commit f971ffef04

View File

@ -4,13 +4,6 @@ local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua") local S, NS = dofile(MP.."/intllib.lua")
-- creative check
local creative_mode_cache = minetest.settings:get_bool("creative_mode")
function is_creative(name)
return creative_mode_cache or minetest.check_player_privs(name, {creative = true})
end
-- hoe bomb function -- hoe bomb function
local function hoe_area(pos, player) local function hoe_area(pos, player)
@ -138,7 +131,7 @@ minetest.register_craftitem("farming:hoe_bomb", {
else else
throw_potion(itemstack, user) throw_potion(itemstack, user)
if not is_creative(user:get_player_name()) then if not farming.is_creative(user:get_player_name()) then
itemstack:take_item() itemstack:take_item()