Anonymous

Module:Items/SourceTables: Difference between revisions

From Melvor Idle
_getCreationTable: Fix generation of various farming produce
mNo edit summary
(_getCreationTable: Fix generation of various farming produce)
Line 186: Line 186:


--had to add cooking to the list of valid categories here to account for cherries/apples
--had to add cooking to the list of valid categories here to account for cherries/apples
if item.category == 'Cooking' or item.type == "Harvest" or item.type == "Herb" or item.type == "Logs" or Shared.contains(item.name, '(Perfect)') then
if item.type == 'Herb' or item.type == 'Logs' or (item.type == 'Food' and item.category ~= 'Cooking') or Shared.contains(item.name, '(Perfect)') then
--Harvest/Herb means farming
-- Herb means farming
--Logs might mean farming or might not. Depends on the logs
-- Logs/Food might mean farming or might not. Depends on the item
for i, item2 in pairs(ItemData.Items) do
for i, item2 in pairs(ItemData.Items) do
if item2.grownItemID == item.id then
if item2.grownItemID == item.id then