Anonymous

Module:Items/SourceTables: Difference between revisions

From Melvor Idle
(_getItemUpgradeTable: Prevent GP being shown if upgrade GP cost is zero or less (e.g. Water Chest))
Line 14: Line 14:
local Shop = require('Module:Shop')
local Shop = require('Module:Shop')
local Monsters = require('Module:Monsters')
local Monsters = require('Module:Monsters')
local GatheringSkills = require('Module:Skills/Gathering')
local Skills = require('Module:Skills')


local SkillEnum = mw.loadData('Module:Constants/data').skill
local SkillEnum = mw.loadData('Module:Constants/data').skill
Line 450: Line 450:


--Next: Can we take it from somebody else -without- killing them?
--Next: Can we take it from somebody else -without- killing them?
local thiefItems = GatheringSkills.getThievingSourcesForItem(item.id)
local thiefItems = Skills.getThievingSourcesForItem(item.id)
if type(thiefItems) == 'table' then
if type(thiefItems) == 'table' then
local thiefPart = {}
local thiefPart = {}
Line 782: Line 782:
--Finally, let's try just stealing it
--Finally, let's try just stealing it
local thiefType = Icons.Icon({"Thieving", type='skill'})
local thiefType = Icons.Icon({"Thieving", type='skill'})
local thiefItems = GatheringSkills.getThievingSourcesForItem(item.id)
local thiefItems = Skills.getThievingSourcesForItem(item.id)
for i, thiefRow in ipairs(thiefItems) do
for i, thiefRow in ipairs(thiefItems) do
local sourceTxt = ''
local sourceTxt = ''