diff options
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 33 |
1 files changed, 28 insertions, 5 deletions
@@ -115,12 +115,35 @@ local image_overrides = { doc.sub.items.add_real_group_names(groupdefs) doc.sub.items.add_notable_groups(miscgroups) -doc.sub.items.add_forced_item_entries(forced_items) -doc.sub.items.add_suppressed_item_entries(suppressed_items) -doc.sub.items.add_hidden_item_entries(hidden_items) -doc.sub.items.add_item_name_overrides(item_name_overrides) -doc.sub.items.add_item_image_overrides(image_overrides) +for i=1, #hidden_items do + local item = minetest.registered_items[hidden_items[i]] + if item then + minetest.override_item(hidden_items[i], { x_doc_items_hidden = true } ) + end +end +for i=1, #forced_items do + local item = minetest.registered_items[forced_items[i]] + if item then + minetest.override_item(forced_items[i], { x_doc_items_create_entry = true} ) + end +end +for i=1, #suppressed_items do + local item = minetest.registered_items[suppressed_items[i]] + if item then + minetest.override_item(suppressed_items[i], { x_doc_items_create_entry = false} ) + end +end +for itemstring, data in pairs(item_name_overrides) do + if minetest.registered_items[itemstring] ~= nil then + minetest.override_item(itemstring, { x_doc_items_entry_name = data} ) + end +end +for itemstring, data in pairs(image_overrides) do + if minetest.registered_items[itemstring] ~= nil then + minetest.override_item(itemstring, { x_doc_items_image = data} ) + end +end -- Minetest Game Factoids |