Редактирование: Модуль:FoodDetails
Материал из Eco - Русская Wiki
Сделанные вами изменения будут показаны читателям после того, как их утвердит уполномоченный участник (подробнее).
Правка может быть отменена. Пожалуйста, просмотрите сравнение версий ниже, чтобы убедиться, что это нужная вам правка, и запишите страницу ниже, чтобы отменить правку.
Текущая версия | Ваш текст | ||
Строка 17: | Строка 17: | ||
local header = "<table class=\"wikitable sortable\"> \n " | local header = "<table class=\"wikitable sortable\"> \n " | ||
header = header .. "<tr> \n " | header = header .. "<tr> \n " | ||
header = header .. "<th> | header = header .. "<th>Food</th> \n " | ||
header = header .. "<th> | header = header .. "<th>Calories</th> \n " | ||
header = header .. "<th data-sort-type=\"descending\" style=\"color: red;\"> | header = header .. "<th data-sort-type=\"descending\" style=\"color: red;\">Carbs</th> \n " | ||
header = header .. "<th style=\"color: orange;\"> | header = header .. "<th style=\"color: orange;\">Protein</th> \n " | ||
header = header .. "<th style=\"color: yellow;\"> | header = header .. "<th style=\"color: yellow;\">Fat</th> \n " | ||
header = header .. "<th style=\"color: lightgreen;\"> | header = header .. "<th style=\"color: lightgreen;\">Vitamins</th> \n " | ||
header = header .. "<th> | header = header .. "<th>Nutrition</th> \n " | ||
header = header .. "<th> | header = header .. "<th>Density (/100kcal)</th> \n " | ||
header = header .. "<th> | header = header .. "<th>Skill Point Contribution</th> \n " | ||
header = header .. "<th> | header = header .. "<th>Created With</th> \n " | ||
header = header .. "<th> | header = header .. "<th>Skill Needed</th> \n " | ||
header = header .. "<th data-sort-type=\"number\"> | header = header .. "<th>Skill Level</th> \n " | ||
header = header .. "<th data-sort-type=\"number\">Base Crafting Time(Min)</th> \n " | |||
header = header .. "</tr> \n " | header = header .. "</tr> \n " | ||
Строка 35: | Строка 36: | ||
for k,v in pairs(items) do | for k,v in pairs(items) do | ||
local row = '' | local row = '' | ||
if v.group == ' | if v.group == 'Food' then | ||
--if (k == "Basic Salad" or k == "Fiddlehead Salad" or k == "Bear S U P R E M E" or k == "Charred Tomato" or k == "Tallow" or k == "Beet" or k == "Campfire Beans" or k == "Wheat") then | --if (k == "Basic Salad" or k == "Fiddlehead Salad" or k == "Bear S U P R E M E" or k == "Charred Tomato" or k == "Tallow" or k == "Beet" or k == "Campfire Beans" or k == "Wheat") then | ||
local item = k | local item = k | ||
Строка 73: | Строка 74: | ||
end | end | ||
if recipe ~= '' then | if recipe ~= '' then | ||
created = recipe.craftStn | created = recipe.craftStn[1] | ||
if recipe.skillNeeds[1] == nil then | if recipe.skillNeeds[1] == nil then | ||
skill = " | skill = "none" -- implies a basic recipe like Campfire Beans | ||
skill_level = '-' | skill_level = '-' | ||
else | else | ||
Строка 92: | Строка 93: | ||
end | end | ||
if plant ~= '' then | if plant ~= '' then | ||
skill = " | skill = "Gathering" | ||
skill_level = 0 | skill_level = 0 | ||
if (plant.harvestTool ~= nil and plant.killOnHarvest == 'Yes') then | if (plant.harvestTool ~= nil and plant.killOnHarvest == 'Yes') then | ||
Строка 113: | Строка 114: | ||
end | end | ||
if (created ~= '' and created ~= ' | if (created ~= '' and created ~= 'none' and created ~= '-') then | ||
created = "[[" .. created .. "]]" | created = "[[" .. created .. "]]" | ||
end | end | ||
Строка 121: | Строка 122: | ||
-- print skill needed or none. | -- print skill needed or none. | ||
row = row .. "<td>" .. tostring(skill) .. "< | row = row .. "<td>" .. tostring(skill) .. "</td> \n" | ||
-- print skill level needed. | |||
row = row .. "<td>" .. tostring(skill_level) .. "</td> \n" | |||
-- print crafting minutes. | -- print crafting minutes. |