ARK: Survival Evolved Wiki
Advertisement
Template-info Documentation

Displays a list of needed crafting stations needed to craft the given resources.

Parameter

  • craftedin: station that is needed to craft the item
  • Resources as list, separated by |

Usage

{{RequiredCraftingStations|<resources>}}
{{RequiredCraftingStations|craftedin=<station>|<resources>}}

Example

{{RequiredCraftingStations|Narcotic|Metal Ingot}}

Lua error at line 6: bad argument #1 to 'ipairs' (table expected, got nil).

{{RequiredCraftingStations|craftedin=Fabricator|Narcotic|Metal Ingot}}

Lua error at line 6: bad argument #1 to 'ipairs' (table expected, got nil).


local p = {}
function p.neededstations( f )
  local resources = f:getParent().args
  local stations = {}

  for _,res in ipairs(args) do
    if res == 'Metal Ingot' then
      table.insert(stations,'Refining Forge')
    end
    if res == 'Narcotic' then
      table.insert(stations,'Mortar and Pestle')
    end
    if res == 'Stimulant' then
      table.insert(stations,'Mortar and Pestle')
    end
    if res == 'Gunpowder' then
      table.insert(stations,'Mortar and Pestle')
    end
    if res == 'Sparkpowder' then
      table.insert(stations,'Mortar and Pestle')
    end
    if res == 'Cementing Paste' then
      table.insert(stations,'Mortar and Pestle')
    end
  end
  return table.concat(stations,', ')
end
return p
Advertisement