2018-09-22 16:12:22 +02:00
|
|
|
-- 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 = {
|
2018-09-22 17:33:55 +02:00
|
|
|
-- sefault stone crushing
|
|
|
|
['default:obsidian'] = 'default:stone',
|
|
|
|
['default:stone'] = 'default:cobble',
|
2018-09-22 16:12:22 +02:00
|
|
|
['default:cobble'] = 'default:gravel',
|
|
|
|
['default:gravel'] = 'default:sand',
|
2018-09-22 17:33:55 +02:00
|
|
|
-- sandstone types to sand
|
2018-09-22 16:12:22 +02:00
|
|
|
['default:sandstone'] = 'default:sand',
|
2018-09-22 17:33:55 +02:00
|
|
|
['default:desert_sandstone'] = 'default:desert_cobble',
|
|
|
|
['default:desert_cobble'] = 'default:desert_sand',
|
2018-09-22 16:12:22 +02:00
|
|
|
['default:silver_sandstone'] = 'default:silver_sand',
|
2018-09-22 01:15:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-09-22 16:12:22 +02:00
|
|
|
-- 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')
|
2018-09-22 01:15:44 +02:00
|
|
|
|
|
|
|
|
2018-09-22 16:12:22 +02:00
|
|
|
-- Clean up
|
2018-09-22 17:28:08 +02:00
|
|
|
--
|
|
|
|
-- `uniham.register_hammer` is kept available for API purposes
|
|
|
|
uniham.replacements = nil
|
|
|
|
uniham.syspath = nil
|
|
|
|
uniham.modpath = nil
|
|
|
|
uniham.use_hammer = nil
|