show global replacements in preview list

master
Sokomine 2017-06-26 23:43:05 +02:00
parent 782184f032
commit 86f1cffdd2
2 changed files with 7 additions and 0 deletions

View File

@ -138,6 +138,10 @@ build_chest.replacements_get_list_formspec = function( pos, selected_row, allow_
repl = r[2];
end
end
-- show global replacements
if( handle_schematics.global_replacement_table[ repl ]) then
repl = handle_schematics.global_replacement_table[ repl ];
end
-- avoid empty lines at the end
if( not_the_first_entry ) then

View File

@ -33,3 +33,6 @@ end
-- just some examples for testing:
--handle_schematics.global_replacement_table[ 'default:wood' ] = 'default:mese';
--handle_schematics.global_replacement_table[ 'stairs:stair_wood' ] = 'default:diamondblock';
-- many people prefer the new 3d torch even if it will melt some snow
handle_schematics.global_replacement_table[ 'mg_villages:torch' ] = 'default:torch';