Modul:ItemInfoCard: Unterschied zwischen den Versionen

Aus Eco - Deutsches Wiki
Wechseln zu:Navigation, Suche
[unmarkierte Version][unmarkierte Version]
Avaren (Diskussion | Beiträge)
Keine Bearbeitungszusammenfassung
K StalEF verschob die Seite Modul:Infobox Item nach Modul:ItemInfoCard, ohne dabei eine Weiterleitung anzulegen
 
(4 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
-- Credit: Original Infobox (now known as Infobox_Item) created by Pradoxzon was then edited by Nesphit and TreeNuts0. Fyre (FishAus) and Scotty (ZeelNightwolf) further edited the Infobox_Item. They then duplicated and used as a base for Infobox_Skill, Infobox_Plant, and Infobox_Animal.
local p = {}


local p = {}
local Utils = require('Module:Utils')
local Utils = require('Module:Utils')
local L = require('Module:Localization')
local RecipeUtils = require('Module:RecipeUtils')
 
local IconUtils = require('Module:IconUtils')
-- Build an Item Infobox
local InfoCardUtils = require('Module:InfoCardUtils')
function itemBox( args, itemData )
  -- check that all necessary arguments are passed correctly
  if args.name == nil or args.name == '' then
    return '\'name\' must be specified.'
  end
 
  local item = args.name
  local itemTable = itemData.items[item]
 
  if itemTable == nil then
    return item .. ' could not be found in Module:ItemData.'
  end
 
  local itemType = itemTable.type
  local itemEN = string.sub (itemType, 1, -5)
  local itemimagename = string.gsub(itemEN, ' ', '')
 
  -- string used to build the infobox
  local infobox = '{| class=\"infobox\"\n'
 
  -- 'Name and Image' section
  -- name of the item
  infobox = infobox .. '|- style=\"color: white; background-color: #1165AF; text-align: center;\"\n| colspan=\"2\" | \'\'\'<big>' .. item .. '</big>\'\'\'\n'
 
  -- the item's type (ItemData - group)
  infobox = infobox .. '|- style=\"text-align: center; color: white; background-color: '
 
  if itemTable.group == L.t('Food') then
    infobox = infobox .. '#85D66B;\"\n| colspan=\"2\" | \'\'\'' .. L.t('Food') .. '\'\'\'\n'
    -- Items:Food Icon Image
    local image = checkImage(itemimagename, 'Icon')
 
    infobox = infobox .. '|-\n| colspan=\"2\" style=\"padding: 10px;\" | <div class="iconContainer"><div class="iconStack">[[File:' .. image .. '|frameless|class=iconGreen]]</div><div class=iconBorder style=\"position:absolute;\"></div></div> \n'
 
  elseif itemTable.group == L.t('Skill Books') then
    infobox = infobox .. '#FFCF4D;\"\n| colspan=\"2\" | \'\'\'' .. itemTable.group .. '\'\'\'\n'
    -- Items:Skill Book Icon Image
    infobox = infobox .. '|-\n| colspan=\"2\" style=\"padding: 10px;\" | <div class="iconContainer"><div class="iconStack">[[File:SkillBook.png|link=https://wiki.play.eco/File:SkillBook.png|frameless|class=iconGold]]</div><div class=iconBorder style=\"position:absolute;\"></div></div> \n'
 
  elseif itemTable.group == L.t('Skill Scrolls') then
    infobox = infobox .. '#FFCF4D;\"\n| colspan=\"2\" | \'\'\'' .. itemTable.group .. '\'\'\'\n'
    -- Items:Skill Scrolls Icon Image
    infobox = infobox .. '|-\n| colspan=\"2\" style=\"padding: 10px;\" | <div class="iconContainer"><div class="iconStack">[[File:SkillScroll.png|link=https://wiki.play.eco/File:SkillScroll.png|frameless|class=iconGold]]</div><div class=iconBorder style=\"position:absolute;\"></div></div> \n'
 
  else
    infobox = infobox .. '#78B1FF;\"\n| colspan=\"2\" | \'\'\'' .. itemTable.group .. '\'\'\'\n'
    -- Items: Other Icon Image
    local image = checkImage(itemimagename, 'Icon')
    infobox = infobox .. '|-\n| colspan=\"2\" style=\"padding: 10px;\" | <div class="iconContainer"><div class="iconStack">[[File:' .. image .. '|frameless|class=iconBlue]]</div><div class=iconBorder style=\"position:absolute;\"></div></div> \n'
  end
 
  -- 'Description' section header
  infobox = infobox .. sectionHeader('Description')
 
  if itemTable.description == nil or itemTable.description == '' then
    infobox = infobox .. '|- style=\"text-align: center;\"\n| colspan=\"2\" | \'\'\''..L.t('None')..'\'\'\'\n'
  else
    infobox = infobox .. '|- style=\"text-align: center;\"\n| colspan=\"2\" | ' .. itemTable.description .. '\n'
  end
 
  --Crafting
  local craftingRecipes = mw.loadData( "Module:CraftingRecipes" )
 
  infobox = infobox .. generalSection(item, itemTable, craftingRecipes, args)
 
  infobox = infobox .. IDsSection(itemTable)
 
  -- Tags Header
  if itemTable.tagGroups ~= nil and itemTable.tagGroups ~= {} then
    infobox = infobox .. tagSection(itemTable, itemData)
  end
 
  -- 'Item' World Object header (if itemTable.group = Placeable or Blocks)
  if itemTable.group == L.t('Block Items') or itemTable.group == L.t('World Object Items') then
    infobox = infobox .. placementSection(itemTable, itemimagename)
 
    -- Object Form Image
    if itemTable.group == L.t('Block Items') then
      infobox = infobox .. objectFormSection(itemTable, itemimagename)
    end
 
    -- 'Housing' section (if there is a Room Category)
    if itemTable.roomCategory ~= nil then 
      infobox = infobox .. housingSection(itemTable)
    end
 
    -- 'Storage' Section (if inventorySlots is not nil)
    if itemTable.inventorySlots ~= nil then
      infobox = infobox .. storageSection(itemTable)
    end
 
    -- 'Power' section (if EngeryType is ``not nil)
    if itemTable.energyType ~= nil then 
      infobox = infobox .. powerSection(itemTable)
 
    end
 
    -- 'Fuel' Section (if fuelsUsed by Object)
    if itemTable.fuelsUsed ~= nil then
      infobox = infobox .. fuelsSection(itemTable)
    end
 
    -- 'Fluid' section (if fludisUsed is not nil)   
    if itemTable.fluidsUsed ~= nil or itemTable.fluidsProduced ~= nil then
      infobox = infobox .. fluidsSection(itemTable)
    end
  end
 
  -- Road Object header (if group == Road Items)
  if itemTable.group == L.t('Road Items') then
    infobox = infobox .. roadItemsSection(itemTable, itemimagename)
  end
  infobox = infobox .. '|}'
  return infobox
end
 
function sectionHeader(title, count)
  return "|- style=\"background-color: #4688C0; text-align: center;\"\n| colspan=\"2\" | '''" .. L.t(title, count) .. "'''\n"
end
 
function sectionRow(label, content, count, unit)
  if unit ~= nil then
    content = tonumber(content)
    unit = L.t(unit, content)
    local lang = mw.getContentLanguage()
    content = lang:formatNum(content)
  else
    unit = ''
  end
  return '|-\n| ' .. L.t(label, count) .. ':\n| style=\"text-align: right; padding: 3px;\" | ' .. content .. unit .. '\n'
end
 
function sectionImage(imageName, suffix)
  local image = checkImage(imageName, suffix)
  return '|-\n| colspan=\"2\" style=\"padding: 10px;\" | [[File:' .. image .. '|center|border|240px]]\n'
end
 
local function addToSet(set, key)
  set[key] = true
end
 
local function setNotContains(set, key)
  return set[key] == nil
end
 
local function craftingSubSection(title, item, productsOrIngredients, recipes)
  local stations = {}
  local sortStations = {}
  local stationString = ''
  for _, recipeName in ipairs( productsOrIngredients[item] ) do
    local currentRecipe = recipes[recipeName]
    if currentRecipe ~= nil then
      if currentRecipe.variants[recipeName] ~= nil then
        local currentStation = currentRecipe.craftStn[1][1]
        if setNotContains(stations, currentStation) then
          addToSet(stations, currentStation)
        end
      end
    end
  end
 
  if stations then
    for a, _ in pairs(stations) do
      table.insert(sortStations, a)
    end
    table.sort(sortStations)
    for i, n in ipairs(sortStations) do
      stationString = stationString .. ' [[' .. n .. ']]'
      if (n ~= sortStations[#sortStations]) then
        -- add a comma
        stationString = stationString .. ', '
      end
    end
    return sectionRow(title, stationString)
  else
    return sectionRow(title, L.t('N/A'))
  end
end
 
function generalSection(item, itemTable, craftingRecipes, args)
-- 'General' section header
  section = sectionHeader('General')
 
  -- Is a product at these tables
  if craftingRecipes.products[item] ~= nil and Utils.tableLen(craftingRecipes.products[item]) >= 1 then
    section = section .. craftingSubSection('Created at', item, craftingRecipes.products, craftingRecipes.recipes)
  end
 
  -- Is an ingredient at these tables
  if craftingRecipes.ingredients[item] ~= nil and Utils.tableLen(craftingRecipes.ingredients[item]) >= 1 then
    section = section .. craftingSubSection('Used at', item, craftingRecipes.ingredients, craftingRecipes.recipes)
  end
 
  -- calories and nutrients (if itemTable.group == 'Food')
  if itemTable.group == L.t('Food') then
    section = section .. sectionRow('Calorie', itemTable.calories, tonumber(itemTable.calories), 'cal')
    section = section .. '|- valign=\"center\"\n| rowspan=\"4\" | '..L.t('Nutrients')..':\n'
    section = section .. '| style=\"color: red; text-align: right; padding: 3px;\" | '..L.t('Carbs')..': ' .. itemTable.carbs .. '\n'
    section = section .. '|- valign=\"center\"\n| style=\"color: orange; text-align: right; padding: 3px;\" | '..L.t('Protein')..': ' .. itemTable.protein .. '\n'
    section = section .. '|- valign=\"center\"\n| style=\"color: yellow; text-align: right; padding: 3px;\" | '..L.t('Fat')..': ' .. itemTable.fat .. '\n'
    section = section .. '|- valign=\"center\"\n| style=\"color: limegreen; text-align: right; padding: 3px;\" | '..L.t('Vitamins')..': ' .. itemTable.vitamins .. '\n'
    section = section .. sectionRow('Nutrition Density', L.t('%s per 100 cals'):format(itemTable.density))
  end
 
  -- carried
  local carried
  if args.carried ~= nil and args.carried ~= '' then carried = args.carried else carried = itemTable.carried end
  section = section .. sectionRow('Carried in', carried)
 
  -- weight
  local weight
  if itemTable.weight ~= nil then weight = itemTable.weight else weight = '0.0' end
  section = section .. sectionRow('Weight', weight, nil, 'kg')
 
  -- stack limit
  if itemTable.maxStack ~= nil then
    section = section .. sectionRow('Stack limit', itemTable.maxStack)
  end
 
  -- yield
  if itemTable.yield ~= nil then
    section = section .. sectionRow('Improve Gathering', itemTable.yield)
  end
 
  -- fuel
  if itemTable.fuel ~= nil then
    section = section .. sectionRow('Fuel energy', itemTable.fuel, nil, 'J')
  end
 
  -- currency
  if itemTable.currency ~= nil then
    section = section .. "|- style=\"text-align: center;\"\n| colspan=\"2\" | " .. L.t('Can back a currency') .. "\n"
  end
  return section
end
 
function IDsSection(itemTable)
  -- 'IDs' section header
  section = sectionHeader('ID', 2)
 
  -- item id (type)
  section = section .. sectionRow('Item ID', itemTable.type)
 
  -- id number (type id)
  section = section .. sectionRow('ID Number', itemTable.typeID)
 
  return section
end
 
function tagSection(itemTable, itemData)
  -- Tags Header
  local tags = itemTable.tagGroups
  section = sectionHeader('Tag', Utils.tableLen(tags))
  local list = ''
  -- for each item in the list (a is position, b is value)           
  for a,b in ipairs(tags) do
    --if not these tags listed here
    if (b ~=L.t('Object') or b ~= L.t('World  Object') or b ~= L.t('Housing  Object')) then
      -- add the tag to the list
      -- HACK: Some tag localisations have spaces in the tag name, but not in the tag data
      local tagLink
      -- Some tags have multiple spaces? Possible data quality issue
      bClean = b:gsub("%s+", " ")
      if itemData.tags[bClean] ~= nil then
        tagLink = bClean .. L.t('Tag')
      else
        tagLink = bClean:gsub(' ', '') .. L.t('Tag')
      end
 
      list = list .. '[[' .. tagLink ..'|' .. bClean ..']][[Category:' .. bClean .. ']]'
    end
    -- if not the last item in the list
    if (b ~= tags[#tags]) then
      -- add a comma
      list = list .. ', '
    end
  end
  -- Now the list is made add it to the infobox
  section = section .. '|- style=\"text-align: center;\"\n| colspan=\"2\" | ' .. list .. '\n'
 
  return section
end
 
function placementSection(itemTable, itemImageName)
  section = sectionHeader('World Object')
-- Object Placed Image
  section = section .. sectionImage(itemImageName, 'Placed')
 
  -- 'Placement' section
  --Placement Header
  section = section .. sectionHeader('Placement')
 
  --Vechile
  if itemTable.mobile ~= nil then
    section = section .. sectionRow('Vehicle/Mobile Object', itemTable.mobile)
  end
 
  --Dimensions
  if itemTable.footprint ~= nil then
    section = section .. sectionRow('Dimensions (X,Y,Z)', itemTable.footprint)
  end
 
  --Material Tier
  if itemTable.materialTier ~= nil or itemTable.materialTier == 0 then
    section = section .. sectionRow('Room Material', itemTable.materialTier)  .. '[[Category:Tier '.. itemTable.materialTier ..']]\n'
  end
 
  --Room Req.
  if itemTable.roomContainReq ~= nil then
    section = section .. sectionRow('Room Required', itemTable.roomContainReq)
  end
 
  --Room Size. Req.
  if itemTable.roomSizeReq ~= nil then
    section = section .. sectionRow('Room Size', itemTable.roomSizeReq, nil, 'm³')
  end
 
  --Room Mat. Req.
  if itemTable.roomMatReq ~= nil then
    section = section .. sectionRow('Room Materials', itemTable.roomMatReq)
  end
  return section
end
 
function objectFormSection(itemTable, itemImageName)
  return sectionImage(itemImageName, 'Form')
end
 
function housingSection(itemTable)
-- Housing Header
  section = sectionHeader('Housing')
 
  --roomCategory
  section = section .. sectionRow('Room Category', itemTable.roomCategory) .. '[[Category:' .. itemTable.roomCategory .. ']]\n'
 
  if itemTable.roomCategory ~= L.t('Industrial') then
    if itemTable.furnitureType ~= nil then
      --furnitureType
      section = section .. sectionRow('Furniture Type', itemTable.furnitureType) .. '[[Category:' .. itemTable.furnitureType .. ']]\n'
 
      --Value of the object
      section = section .. sectionRow('Value', itemTable.skillValue)
 
      --Dim. Return % of Object 
      section = section .. sectionRow('Dim. Return %', itemTable.repeatsDepreciation*100, nil, '%')
    end
  end
 
  if itemTable.roomCategory == L.t('Industrial') then
    section = section .. "|- style=\"background-color: #red; text-align: center;\"\n| colspan=\"2\" | '''" .. L.t('ALL ROOM VALUE LOST') .. "'''\n"
  end
 
  return section
end
 
function storageSection(itemTable)
  -- Storage Header
  section = sectionHeader('Storage')
 
  --Inventory Slots
  section = section .. sectionRow('Inventory Slots', itemTable.inventorySlots)
 
  --inventoryMaxWeight
  if itemTable.inventoryMaxWeight ~= nil then
    maxWeightKg = itemTable.inventoryMaxWeight/1000
    section = section ..sectionRow('Inventory Max Weight', maxWeightKg, nil, 'kg')
  else
    section = section .. sectionRow('Inventory Max Weight', L.t('Unlimited'))
  end
 
  return section
end
 
 
function powerSection(itemTable)
  -- Power Header
  section = sectionHeader('Power')
 
  --EngergyType
  section = section .. sectionRow('Energy Type', itemTable.energyType) .. '[[Category:' .. itemTable.energyType .. ']]\n'
 
  --Grid Radius
  section = section .. sectionRow('Grid Radius', itemTable.gridRadius, nil, 'm')
 
  --Energy Produced
  section = section .. sectionRow('Energy Produced', itemTable.energyProduced, nil, 'w')
 
  --Energy Used
  section = section .. sectionRow('Energy Used', itemTable.energyUsed, nil, 'w')
 
  return section
end
 
function fuelsSection(itemTable)
  -- Fuel Header
  section = sectionHeader('Fuel')
 
  --Fuels Used by Object
  section = section .. sectionRow('Fuels Used', itemTable.fuelsUsed)
 
  return section
end
 
function fluidsSection(itemTable)
-- Liquid/Gas Header
  section = sectionHeader('Liquid/Gas')
 
--Input (fludisUsed)
  if itemTable.fluidsUsed ~= nil then
    local list = ''
    for a,b in ipairs(itemTable.fluidsUsed) do
      local acceptedType =  b[1]
      local cRateString = string.gsub(b[2], "%s+", "")
      local consumingRate = tonumber(cRateString)
      list = list .. L.t('%s at %sL'):format(acceptedType, consumingRate)
     
      if (a ~= #itemTable.fluidsUsed) then
        list = list .. ', '
      end
    end
    section = section .. sectionRow('Input', list)
  end
 
--Output (liquidProduced)
  if itemTable.fluidsProduced ~= nil then
    local list = ''
    for a,b in ipairs(itemTable.fluidsProduced) do
      local producedType =  b[1]
      local pRateString = string.gsub(b[2], "%s+", "")
      local producingRate = tonumber(pRateString)
      if (producingRate == 0) then
        producingRate = 'Rate of Input'
      end
      list = list .. L.t('%s at %sL'):format(producedType, producingRate)
      if (a ~= #itemTable.fluidsProduced) then
        list = list .. ', '
      end
    end
    section = section .. sectionRow('Output', list)
  end
 
 
return section
end
 
function roadItemsSection(itemTable, itemImageName)
  section = sectionHeader('Road Object')
 
  -- Object Placed Image
  section = section .. sectionImage(itemImageName, 'Placed')
  return section
end


function checkImage(imageName, suffix)
local Lang = Utils.getLanguageName()
  local image = 'NoImage.png|link=https://wiki.play.eco/index.php?title=Special:Upload&wpDestFile=' .. imageName .. '_'..suffix..'.png|[[Category:Pages_with_missing_'..suffix:lower()..']]'
  if mw.title.makeTitle('File', imageName .. '_'..suffix..'.png').file.exists then
    image = imageName .. '_'..suffix..'.png'
  elseif mw.title.makeTitle('File', imageName .. '_'..suffix..'.jpg').file.exists then
    image = imageName .. '_'..suffix..'.jpg'
  end
  return image
end


-- Main entry point for the Module
function p.main(frame)
function p.ItemMain(frame)
local PageName = frame.args[1]
  -- get args from the Template
if (Lang == 'English') then ItemName = PageName else ItemName = Utils.ItemSearch(PageName) end
  local args = Utils.normaliseArgs(frame)
local ItemData = mw.loadData( "Module:ItemData" )
    local Item = ItemData.items[ItemName]
local WikiText =''
WikiText =  WikiText ..'__NOTOC__'
WikiText =  WikiText ..'Page name get test: ' .. PageName ..'</br>'
WikiText =  WikiText ..'Item name get test: ' .. ItemName ..'</br>'
WikiText =  WikiText .. '<div class="row gy-4 gx-5"><div class="col-md-6">'
WikiText =  WikiText .. '</div>'
WikiText =  WikiText ..'<div class="col-md-6"><div class="card border-primary"><div class="card-body">'
    WikiText =  WikiText ..'<h2 class="card-title fs-40">' .. IconUtils.main{name = Item.Name[Lang], id = Item.ID , size = 48, style = 1} .. '  ' .. Item.Name[Lang] .. '</h2>'
WikiText =  WikiText ..'<p class="col-lg-10 card-text">' .. Item.Description[Lang] .. '</p>'
WikiText =  WikiText ..'</div></div></div></div>'
local RecipeItemCraft = RecipeUtils.ItemCraft(ItemName)
if (RecipeItemCraft ~= "") then
WikiText =  WikiText .. '<h3>' .. Utils.Translate("Crafted At") .. ':</h3>';
WikiText =  WikiText .. RecipeUtils.CraftTable(RecipeItemCraft);
end
local RecipeItemIngredient = RecipeUtils.ItemIngredient(ItemName)
if (RecipeItemIngredient ~= "") then
WikiText =  WikiText .. '<h3>' .. Utils.Translate("Used in") .. ':</h3>';
WikiText =  WikiText .. RecipeUtils.CraftTable(RecipeItemIngredient)
end
local ItemTagList = Utils.ItemTags(Item.Tags);
if (ItemTagList ~= "") then
WikiText = WikiText .. '<h3>' .. Utils.Translate("Tags Applying to") .. ':</h3>';
WikiText =  WikiText .. ItemTagList
end
local RecipeTagsIngredient = RecipeUtils.TagsIngredient(Item.Tags)
if (RecipeTagsIngredient ~= "") then
WikiText =  WikiText .. '<h3>Used as Tag item in:</h3>';
WikiText =  WikiText .. RecipeUtils.CraftTable(RecipeTagsIngredient)
end
if (Item.WorldObjectItem == "True") then WikiText =  WikiText .. InfoCardUtils.WorldObjectModule(ItemName) end
WikiText =  WikiText .. '<h3>How use Icon:</h3>'
WikiText =  WikiText .. '<p>' .. Item.Name[Lang] .. ' icon can be used on any sign that has a text component, including on [[Vehicles]]:</br>'
WikiText =  WikiText .. 'Icon with background: <icon name="' .. Item.ID .. '"></br>'
WikiText =  WikiText .. 'Icon without background: <icon name="' .. Item.ID .. '" type="nobg"></p>'


  -- get item data
if (Lang ~= 'English') then WikiText =  WikiText .. '[[en:' .. Item.Name.English .. ']]' end
  local itemData = mw.loadData( "Module:ItemData" )
if (Lang ~= 'Russian') then WikiText = WikiText .. '[[ru:' .. Item.Name.Russian .. ']]' end
  return itemBox( args, itemData )
if (Lang ~= 'German') then WikiText =  WikiText .. '[[de:' .. Item.Name.German .. ']]' end
if (Lang ~= 'French') then WikiText =  WikiText .. '[[fr:' .. Item.Name.French .. ']]' end
return WikiText
end
end


return p
return p

Aktuelle Version vom 3. März 2026, 19:44 Uhr


local p = {}

local Utils = require('Module:Utils')
local RecipeUtils = require('Module:RecipeUtils')
local IconUtils = require('Module:IconUtils')
local InfoCardUtils = require('Module:InfoCardUtils')

local Lang = Utils.getLanguageName()

function p.main(frame)
	local PageName = frame.args[1]
	if (Lang == 'English') then ItemName = PageName else ItemName = Utils.ItemSearch(PageName) end
	local ItemData = mw.loadData( "Module:ItemData" )
    local Item = ItemData.items[ItemName]
	local WikiText =''
	
	WikiText =  WikiText ..'__NOTOC__'
	WikiText =  WikiText ..'Page name get test: ' .. PageName ..'</br>'
	WikiText =  WikiText ..'Item name get test: ' .. ItemName ..'</br>'
	
	WikiText =  WikiText .. '<div class="row gy-4 gx-5"><div class="col-md-6">'
	
	WikiText =  WikiText .. '</div>'
	WikiText =  WikiText ..'<div class="col-md-6"><div class="card border-primary"><div class="card-body">'
    WikiText =  WikiText ..'<h2 class="card-title fs-40">' .. IconUtils.main{name = Item.Name[Lang], id = Item.ID , size = 48, style = 1} .. '  ' .. Item.Name[Lang] .. '</h2>'
	WikiText =  WikiText ..'<p class="col-lg-10 card-text">' .. Item.Description[Lang] .. '</p>'
	
	WikiText =  WikiText ..'</div></div></div></div>'
	
	local RecipeItemCraft = RecipeUtils.ItemCraft(ItemName)
	if (RecipeItemCraft ~= "") then
		WikiText =  WikiText .. '<h3>' .. Utils.Translate("Crafted At") .. ':</h3>';
		WikiText =  WikiText .. RecipeUtils.CraftTable(RecipeItemCraft);
	end
	
	local RecipeItemIngredient = RecipeUtils.ItemIngredient(ItemName)
	if (RecipeItemIngredient ~= "") then
		WikiText =  WikiText .. '<h3>' .. Utils.Translate("Used in") .. ':</h3>';
		WikiText =  WikiText .. RecipeUtils.CraftTable(RecipeItemIngredient)
	end
	
	local ItemTagList = Utils.ItemTags(Item.Tags);
	if (ItemTagList ~= "") then
		WikiText =  WikiText .. '<h3>' .. Utils.Translate("Tags Applying to") .. ':</h3>';
		WikiText =  WikiText .. ItemTagList
	end
	
	local RecipeTagsIngredient = RecipeUtils.TagsIngredient(Item.Tags)
	if (RecipeTagsIngredient ~= "") then
		WikiText =  WikiText .. '<h3>Used as Tag item in:</h3>';
		WikiText =  WikiText .. RecipeUtils.CraftTable(RecipeTagsIngredient)
	end
	
	if (Item.WorldObjectItem == "True") then WikiText =  WikiText .. InfoCardUtils.WorldObjectModule(ItemName) end
	
	
	WikiText =  WikiText .. '<h3>How use Icon:</h3>'
	WikiText =  WikiText .. '<p>' .. Item.Name[Lang] .. ' icon can be used on any sign that has a text component, including on [[Vehicles]]:</br>'
	WikiText =  WikiText .. 'Icon with background: <icon name="' .. Item.ID .. '"></br>'
	WikiText =  WikiText .. 'Icon without background: <icon name="' .. Item.ID .. '" type="nobg"></p>'

	if (Lang ~= 'English') then WikiText =  WikiText .. '[[en:' .. Item.Name.English .. ']]' end
	if (Lang ~= 'Russian') then WikiText =  WikiText .. '[[ru:' .. Item.Name.Russian .. ']]' end
	if (Lang ~= 'German') then WikiText =  WikiText .. '[[de:' .. Item.Name.German .. ']]' end
	if (Lang ~= 'French') then WikiText =  WikiText .. '[[fr:' .. Item.Name.French .. ']]' end
	
	return WikiText
end

return p