17,030
edits
(_getEquipmentTable: Implement Strength level requirement column) |
(Update for change in structure of equipmentSlots data) |
||
Line 278: | Line 278: | ||
function p._getCategoryTable(style, slot, other, includeModifiers, includeDescription, sortByName) | function p._getCategoryTable(style, slot, other, includeModifiers, includeDescription, sortByName) | ||
-- If slot is a slot name, convert it to the slot ID instead | |||
slot = Constants.getEquipmentSlotID(slot) or (Constants.getEquipmentSlotName(slot) ~= nil and slot) | |||
local itemList = Items.getItems(function(item) | local itemList = Items.getItems(function(item) | ||
Line 482: | Line 481: | ||
) | ) | ||
else | else | ||
-- If category is a slot name, convert it to the slot ID instead | |||
category = Constants.getEquipmentSlotID(category) or (Constants.getEquipmentSlotName(category) ~= nil and category) | |||
if category == nil then | |||
return Shared.printError('Invalid option. Choose either an equipment slot, Potion, or Other') | return Shared.printError('Invalid option. Choose either an equipment slot, Potion, or Other') | ||
end | end |