1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-28 04:40:22 +02:00

Use creative.is_enabled_for for creative mode if possible (#1558)

This commit is contained in:
zaoqi
2017-03-29 21:02:26 +02:00
committed by SmallJoker
parent b847888cb7
commit 077316b4cd
13 changed files with 34 additions and 19 deletions

View File

@ -289,7 +289,8 @@ minetest.register_node("flowers:waterlily", {
if not minetest.is_protected(pos, player_name) then
minetest.set_node(pos, {name = "flowers:waterlily",
param2 = math.random(0, 3)})
if not minetest.setting_getbool("creative_mode") then
if not (creative and creative.is_enabled_for
and creative.is_enabled_for(player_name)) then
itemstack:take_item()
end
else