Module:Inventory slot/Aliases: Difference between revisions

mNo edit summary
No edit summary
Line 769: Line 769:
         'Dark Oak',
         'Dark Oak',
         'Mangrove',
         'Mangrove',
        'Bamboo',
     },
     },
     nether = {
     nether = {
         'Crimson',
         'Crimson',
         'Warped'
         'Warped',
     },
     },
     both = {},
     both = {},
Line 861: Line 862:
itemName = wood .. ' ' .. itemName
itemName = wood .. ' ' .. itemName
end
end
table.insert(woodAliases, itemName)
-- special handling
local badItems = {
['Bamboo Sapling'] = 1,
['Bamboo Wood'] = 1,
['Bamboo Log'] = 1,
['Stripped Bamboo Wood'] = 1,
['Stripped Bamboo Log'] = 1,
}
local itemMapping = {
['Mangrove Sapling'] = 'Mangrove Propagule',
['Bamboo Boat'] = 'Bamboo Raft',
['Bamboo Boat with Chest'] = 'Bamboo Raft with Chest',
}
local badItemFlag = 0
if badItems[itemName] then
badItemFlag = 1
elseif itemMapping[itemName] then
itemName = itemMapping[itemName]
end
if badItemFlag == 0 then
table.insert(woodAliases, itemName)
end
end
end