Module:Inventory slot/Aliases: Difference between revisions

No edit summary
mNo edit summary
Line 864: Line 864:
-- special handling
-- special handling
local itemMapping = {
['Mangrove Sapling'] = 'Mangrove Propagule',
['Bamboo Boat'] = 'Bamboo Raft',
['Bamboo Boat with Chest'] = 'Bamboo Raft with Chest',
}
if itemMapping[itemName] then
itemName = itemMapping[itemName]
end
local badItems = {
local badItems = {
['Bamboo Sapling'] = 1,
['Bamboo Sapling'] = 1,
Line 871: Line 879:
['Stripped Bamboo Log'] = 1,
['Stripped Bamboo Log'] = 1,
}
}
local itemMapping = {
if not badItems[itemName] then
['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)
table.insert(woodAliases, itemName)
end
end