mirror of
https://github.com/Sokomine/replacer.git
synced 2025-01-23 22:30:21 +01:00
added support for realtest
This commit is contained in:
parent
c549c489f9
commit
9d61650e99
21
inspect.lua
21
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",
|
minetest.register_tool( "replacer:inspect",
|
||||||
{
|
{
|
||||||
description = "Node inspection tool",
|
description = "Node inspection tool",
|
||||||
@ -146,6 +164,9 @@ end
|
|||||||
|
|
||||||
replacer.image_button_link = function( stack_string )
|
replacer.image_button_link = function( stack_string )
|
||||||
local group = '';
|
local group = '';
|
||||||
|
if( replacer.image_replacements[ stack_string ] ) then
|
||||||
|
stack_string = replacer.image_replacements[ stack_string ];
|
||||||
|
end
|
||||||
if( replacer.group_placeholder[ stack_string ] ) then
|
if( replacer.group_placeholder[ stack_string ] ) then
|
||||||
stack_string = replacer.group_placeholder[ stack_string ];
|
stack_string = replacer.group_placeholder[ stack_string ];
|
||||||
group = 'G';
|
group = 'G';
|
||||||
|
Loading…
Reference in New Issue
Block a user