mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-24 08:59:32 +01:00
Merge pull request 'Don't subtract items when placing in gm-creative' (#2648) from creative_infiniplace into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2648
This commit is contained in:
commit
6dfaee297d
1 changed files with 13 additions and 8 deletions
|
@ -218,6 +218,11 @@ minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
|
|||
end
|
||||
end)
|
||||
|
||||
--Don't subtract from inv when placing in gamemode-creative
|
||||
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack, pointed_thing)
|
||||
if minetest.is_creative_enabled(placer:get_player_name()) then return true end
|
||||
end)
|
||||
|
||||
local function in_table(n,h)
|
||||
for k,v in pairs(h) do
|
||||
if v == n then return true end
|
||||
|
|
Loading…
Reference in a new issue