Make all nodes un-blastable, increase stack size to 65535 (#32)

This commit is contained in:
fluxionary
2022-07-02 14:07:53 -07:00
committed by GitHub
parent f3464f5063
commit 2100ca04b1
4 changed files with 52 additions and 187 deletions

View File

@ -20,6 +20,25 @@ maptools.drop_msg = function(itemstack, player)
minetest.chat_send_player(name, S("[maptools] tools/nodes do not drop!"))
end
function maptools.register_node(name, def)
-- Increase the interaction range when holding Map Tools nodes to make building easier.
def.range = 12
def.stack_max = 65535
def.drop = ""
if def.groups then
if not def.groups.dig_immediate then
def.groups.unbreakable = 1
end
def.groups.not_in_creative_inventory = maptools.creative
else
def.groups = {unbreakable = 1, not_in_creative_inventory = maptools.creative}
end
def.on_drop = maptools.drop_msg
-- Prevent Map Tools nodes from being exploded by TNT.
def.on_blast = function() end
minetest.register_node(name, def)
end
dofile(modpath .. "/config.lua")
dofile(modpath .. "/aliases.lua")
dofile(modpath .. "/craftitems.lua")