Anonymous

Module:Items/SourceTables: Difference between revisions

From Melvor Idle
m
Simple fix for Firemaking Primary and Secondary products not showing Firemaking as a source
(Allow Harvesting to show up in ItemBox Item Sources)
m (Simple fix for Firemaking Primary and Secondary products not showing Firemaking as a source)
Line 21: Line 21:
local function doesRecipeHaveItemID(recipe, itemID)
local function doesRecipeHaveItemID(recipe, itemID)
if recipe.productId == itemID then
if recipe.productId == itemID then
return true, nil
elseif Shared.contains(recipe.primaryProducts, itemID) or Shared.contains(recipe.secondaryProducts, itemID) then
return true, nil
return true, nil
elseif type(recipe.products) == 'table' then
elseif type(recipe.products) == 'table' then
Line 56: Line 58:
['Woodcutting'] = { recipeKey = 'trees' },
['Woodcutting'] = { recipeKey = 'trees' },
['Fishing'] = { recipeKey = 'fish' },
['Fishing'] = { recipeKey = 'fish' },
['Firemaking'] = { recipeKey = 'logs' },
['Mining'] = { recipeKey = 'rockData' },
['Mining'] = { recipeKey = 'rockData' },
['Farming'] = { recipeKey = 'recipes' },
['Farming'] = { recipeKey = 'recipes' },
Line 96: Line 99:
end
end
elseif recipe.baseInterval ~= nil then
elseif recipe.baseInterval ~= nil then
time = recipe.baseInterval /1000
time = recipe.baseInterval / 1000
elseif skillData.baseInterval ~= nil then
elseif skillData.baseInterval ~= nil then
time = skillData.baseInterval / 1000
time = skillData.baseInterval / 1000
end
if itemID == 'melvorF:Ash' then
qty = time
end
end
-- Special requirements
-- Special requirements
Line 478: Line 484:
['Woodcutting'] = { recipeKey = 'trees' },
['Woodcutting'] = { recipeKey = 'trees' },
['Fishing'] = { recipeKey = 'fish' },
['Fishing'] = { recipeKey = 'fish' },
['Firemaking'] = { recipeKey = 'logs' },
['Mining'] = { recipeKey = 'rockData' },
['Mining'] = { recipeKey = 'rockData' },
['Farming'] = { recipeKey = 'recipes' },
['Farming'] = { recipeKey = 'recipes' },