17,105
edits
(Update for change in structure of equipmentSlots data) |
(Fix equipment slot functions) |
||
Line 671: | Line 671: | ||
function p.getEquipmentSlotName(id) | function p.getEquipmentSlotName(id) | ||
local slotData = GameData.getEntityByID('equipmentSlots', id) | |||
if slotData ~= nil then | |||
return slotData.name | |||
end | |||
end | end | ||
function p.getEquipmentSlotID(name) | function p.getEquipmentSlotID(name) | ||
local slotData = GameData.getEntityByName('equipmentSlots', name) | |||
if slotData ~= nil then | |||
return slotData.id | |||
end | |||
end | end | ||