Module:Icons: Difference between revisions

Added some disambiguation
(actually should have everything this time.)
(Added some disambiguation)
Line 108: Line 108:
   ["Chicken Soup"] = 'png',
   ["Chicken Soup"] = 'png',
   ["Chicken (Perfect)"] = 'png',
   ["Chicken (Perfect)"] = 'png',
  ["Chicken"] = 'png',
   ["Chest of Gems"] = 'png',
   ["Chest of Gems"] = 'png',
   ["Cherry Seeds"] = 'png',
   ["Cherry Seeds"] = 'png',
Line 144: Line 143:
   ["Absorbing Shield"] = 'png',
   ["Absorbing Shield"] = 'png',
}
}
--Some overrides only apply for a specific type
local typeExtOverrides = {
['item'] = {
['Chicken'] = 'png'
}
}


--When calling for an icon of type Key, instead use type Value
--When calling for an icon of type Key, instead use type Value
Line 175: Line 181:
}
}
--Ambiguous overrides section
--Ambiguous overrides section
local ambiguousOverrides = {'Golbin', 'Chick'}
local ambiguousOverrides = {'Golbin', 'Chick', 'Chicken'}


local Shared= require("Module:Shared")
local Shared= require("Module:Shared")
Line 212: Line 218:
     link = linkOverrides[link]
     link = linkOverrides[link]
   end
   end
   if extOverrides[img] ~= nil then  
   if typeExtOverrides[type] ~= nil and typeExtOverrides[type][img] ~= nil then
     ext = extOverrides[img]  
  ext = typeExtOverrides[type][img]
  elseif extOverrides[img] ~= nil then  
     ext = extOverrides[img]
   elseif type == 'mark' then
   elseif type == 'mark' then
     ext = 'png'
     ext = 'png'