Module:Config

From Hero Siege Wiki
Jump to navigation Jump to search

Documentation for this module may be created at Module:Config/doc

local cfg = {}
local func = require('Module:Func')

function cfg.imageFormat(itemType, itemName)
	if itemType == 'Amulet' then
		return string.format('Amulets_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Body Armor' then
		return string.format('Armors_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Belt' then
		return string.format('Belts_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Boots' then
		return string.format('Boots_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Charm' then
		return string.format('Charms_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Gloves' then
		return string.format('Gloves_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Helmet' then
		return string.format('Helmets_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Potion' then
		return string.format('Potions_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Ring' then
		return string.format('Rings_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Shield' then
		return string.format('Shields_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Axe' then
		return string.format('Weapons_Axe_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Book' then
		return string.format('Weapons_Book_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Bow' then
		return string.format('Weapons_Bow_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Cane' then
		return string.format('Weapons_Cane_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Chainsaw' then
		return string.format('Weapons_Chainsaw_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Claw' then
		return string.format('Weapons_Claw_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Dagger' then
		return string.format('Weapons_Dagger_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Flask' then
		return string.format('Weapons_Flask_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Gun' then
		return string.format('Weapons_Gun_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Mace' then
		return string.format('Weapons_Mace_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Polearm' then
		return string.format('Weapons_Polearm_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Spellblade' then
		return string.format('Weapons_Spellblade_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Staff' then
		return string.format('Weapons_Staff_%s.png', func.removeEncoding(itemName))

	elseif itemType == 'Sword' then
		return string.format('Weapons_Sword_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Throwing Weapon' then
		return string.format('Weapons_Throwing_Weapon_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Novelty' then
		return string.format('Weapons_Universal_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Wand' then
		return string.format('Weapons_Wand_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Material' then
		return string.format('Material_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Rune' then
		return string.format('Rune_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Consumable' then
		return string.format('Consumables_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Key' then
		return string.format('Keys_%s.png', func.removeEncoding(itemName))
		
	elseif itemType == 'Relic' then
		return string.format('Relics_%s.png', func.removeEncoding(itemName))	
		
	else
		return string.format('%s.png', func.removeEncoding(itemName))
	end
end
	
return cfg