diff --git a/inspect.lua b/inspect.lua index e2de75f..bdd54e4 100644 --- a/inspect.lua +++ b/inspect.lua @@ -1,4 +1,22 @@ +replacer.image_replacements = {}; + +-- support for RealTest +if( minetest.get_modpath("trees") + and minetest.get_modpath("core") + and minetest.get_modpath("instruments") + and minetest.get_modpath("anvil") + and minetest.get_modpath("scribing_table")) then + replacer.image_replacements[ "group:planks" ] = "trees:pine_planks"; + replacer.image_replacements[ "group:plank" ] = "trees:pine_plank"; + replacer.image_replacements[ "group:wood" ] = "trees:pine_planks"; + replacer.image_replacements[ "group:tree" ] = "trees:pine_log"; + replacer.image_replacements[ "group:sapling"] = "trees:pine_sapling"; + replacer.image_replacements[ "group:leaves" ] = "trees:pine_leaves"; + replacer.image_replacements[ "default:furnace" ] = "oven:oven"; + replacer.image_replacements[ "default:furnace_active" ] = "oven:oven_active"; +end + minetest.register_tool( "replacer:inspect", { description = "Node inspection tool", @@ -146,6 +164,9 @@ end replacer.image_button_link = function( stack_string ) local group = ''; + if( replacer.image_replacements[ stack_string ] ) then + stack_string = replacer.image_replacements[ stack_string ]; + end if( replacer.group_placeholder[ stack_string ] ) then stack_string = replacer.group_placeholder[ stack_string ]; group = 'G';