-- Init uniham = {} uniham.modpath = minetest.get_modpath(minetest.get_current_modname()) uniham.syspath = uniham.modpath..DIR_DELIM..'system' -- Register replacements for the hammer. Entry ID is the ID of the node to -- replace and entry value is the ID of the node to replace with. uniham.replacements = { -- sefault stone crushing ['default:obsidian'] = 'default:stone', ['default:stone'] = 'default:cobble', ['default:cobble'] = 'default:gravel', ['default:gravel'] = 'default:sand', -- sandstone types to sand ['default:sandstone'] = 'default:sand', ['default:desert_sandstone'] = 'default:desert_cobble', ['default:desert_cobble'] = 'default:desert_sand', ['default:silver_sandstone'] = 'default:silver_sand', } -- Load mod dofile(uniham.syspath..DIR_DELIM..'use_hammer.lua') dofile(uniham.syspath..DIR_DELIM..'register_hammer.lua') dofile(uniham.syspath..DIR_DELIM..'registry.lua') -- Clean up -- -- `uniham.register_hammer` is kept available for API purposes uniham.replacements = nil uniham.syspath = nil uniham.modpath = nil uniham.use_hammer = nil