Module:Constants: Difference between revisions

Update for change in structure of equipmentSlots data
m (fix missing percentage sign for Ranged Accuracy bonus text in modifierTypes array)
(Update for change in structure of equipmentSlots data)
Line 671: Line 671:


function p.getEquipmentSlotName(id)
function p.getEquipmentSlotName(id)
return type(id) == 'number' and GameData.rawData.equipmentSlots[id] or 'Invalid'
return GameData.getEntityByID('equipmentSlots', id)
end
end


function p.getEquipmentSlotID(name)
function p.getEquipmentSlotID(name)
return GameData.rawData.equipmentSlots[name]
return GameData.getEntityByName('equipmentSlots', name)
end
end