put replacements where they belong

This commit is contained in:
Dirk Sohler 2018-09-30 19:38:04 +02:00
parent c641e0e917
commit dbdf094855
No known key found for this signature in database
GPG Key ID: B9751241BD7D4E1A
2 changed files with 14 additions and 18 deletions

@ -4,22 +4,6 @@ uniham.modpath = minetest.get_modpath(minetest.get_current_modname())
uniham.syspath = uniham.modpath..DIR_DELIM..'system' 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 -- Load mod
dofile(uniham.syspath..DIR_DELIM..'use_hammer.lua') dofile(uniham.syspath..DIR_DELIM..'use_hammer.lua')
dofile(uniham.syspath..DIR_DELIM..'register_hammer.lua') dofile(uniham.syspath..DIR_DELIM..'register_hammer.lua')

@ -1,5 +1,17 @@
-- Localize -- Register replacements for the hammer. Entry ID is the ID of the node to
local replacements = uniham.replacements -- replace and entry value is the ID of the node to replace with.
local 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',
}
-- Hammer use function -- Hammer use function