16,254
edits
Falterfire (talk | contribs) (added getAreaRequirementsForBox) |
(_getAreaRequirements: Resolve cases where requirement text returned could contain empty lines) |
||
Line 72: | Line 72: | ||
local resultArray = {} | local resultArray = {} | ||
if area.entryRequirements ~= nil then | if area.entryRequirements ~= nil then | ||
local reqText = Common.getRequirementString(area.entryRequirements) | |||
if reqText ~= nil then | |||
table.insert(resultArray, reqText) | |||
end | |||
end | end | ||
Line 78: | Line 81: | ||
-- Avoid repeating the same requirements twice, can happen for some dungeons e.g. Impending Darkness | -- Avoid repeating the same requirements twice, can happen for some dungeons e.g. Impending Darkness | ||
if area.entryRequirements == nil or mw.dumpObject(area.unlockRequirement) ~= mw.dumpObject(area.entryRequirements) then | if area.entryRequirements == nil or mw.dumpObject(area.unlockRequirement) ~= mw.dumpObject(area.entryRequirements) then | ||
local reqText = Common.getRequirementString(area.unlockRequirement) | |||
if reqText ~= nil then | |||
table.insert(resultArray, reqText) | |||
end | |||
end | end | ||
end | end |