16,985
edits
(Cleanup migrated functions) Tag: Manual revert |
(Move getSkillRecipeKey from other modules) |
||
Line 30: | Line 30: | ||
end | end | ||
end | end | ||
end | |||
-- getSkillRecipeKey: Given a skill ID, returns the key under which all recipes | |||
-- for that skill reside. If the returned value is nil, then the skill has | |||
-- no recipes (that is, the skill does not produce any items) | |||
function p.getSkillRecipeKey(skillID) | |||
-- Convert skillID to local ID if not already | |||
local ns, localSkillID = Shared.getLocalID(skillID) | |||
local recipeIDs = { | |||
["Woodcutting"] = 'trees', | |||
["Fishing"] = 'fish', | |||
["Firemaking"] = 'logs', | |||
["Mining"] = 'rockData', | |||
["Thieving"] = 'npcs', | |||
["Agility"] = 'obstacles', | |||
["Cooking"] = 'recipes', | |||
["Smithing"] = 'recipes', | |||
["Farming"] = 'recipes', | |||
["Summoning"] = 'recipes', | |||
["Fletching"] = 'recipes', | |||
["Crafting"] = 'recipes', | |||
["Runecrafting"] = 'recipes', | |||
["Herblore"] = 'recipes', | |||
["Astrology"] = 'recipes', | |||
["Harvesting"] = 'veinData' | |||
} | |||
return recipeIDs[localSkillID] | |||
end | end | ||