mirror of
https://github.com/minetest-mods/maptools.git
synced 2025-07-05 00:00:23 +02:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
19
init.lua
19
init.lua
@ -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")
|
||||
|
Reference in New Issue
Block a user