summaryrefslogtreecommitdiff
path: root/unified_inventory/api.lua
diff options
context:
space:
mode:
authorRealBadAngel <mk@realbadangel.pl>2013-02-18 03:15:00 +0100
committerRealBadAngel <mk@realbadangel.pl>2013-02-18 03:15:00 +0100
commit3a8a4635d7a5af48ab33c73e51c417e8e007c465 (patch)
treec8863dc3983f24ff8206e5db40e190e92e95d2ff /unified_inventory/api.lua
parent4a5877a2bcff39185eaaa2c7bee574019714831b (diff)
UI update
Diffstat (limited to 'unified_inventory/api.lua')
-rw-r--r--unified_inventory/api.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/unified_inventory/api.lua b/unified_inventory/api.lua
index e7888a0..8c210dd 100644
--- a/unified_inventory/api.lua
+++ b/unified_inventory/api.lua
@@ -53,7 +53,11 @@ local inv = minetest.create_detached_inventory(player:get_player_name().."craftr
return 0
end,
allow_take = function(inv, listname, index, stack, player)
- return 0
+ if minetest.setting_getbool("creative_mode") then
+ return stack:get_count()
+ else
+ return 0
+ end
end,
allow_move = function(inv, from_list, from_index, to_list, to_index, count, player)
return 0