17,105
edits
m (Fix typo in Enhancement3) |
(Remove separation of one-handed & two-handed weapons) |
||
Line 23: | Line 23: | ||
local slotOverrides = { | local slotOverrides = { | ||
['Enhancement'] = 'melvorD:Enhancement' | ['Enhancement'] = 'melvorD:Enhancement' | ||
} | } | ||
Line 95: | Line 94: | ||
for _, slotLocalID in ipairs(item.validSlots) do | for _, slotLocalID in ipairs(item.validSlots) do | ||
local newSlotID = slotLocalID | local newSlotID = slotLocalID | ||
-- Classify javelins and throwing knives as weapons | -- Classify javelins and throwing knives as weapons | ||
if slotLocalID == 'Quiver' and Shared.contains({'Javelins', 'ThrowingKnives'}, item.ammoType) then | |||
newSlotID = 'Weapon' | newSlotID = 'Weapon' | ||
-- Combine all enhancements | -- Combine all enhancements | ||
Line 107: | Line 103: | ||
equipEntry.slots[newSlotID] = true | equipEntry.slots[newSlotID] = true | ||
end | end | ||
equipEntry.isWeapon = equipEntry.slots['Weapon | equipEntry.isWeapon = equipEntry.slots['Weapon'] or Shared.contains(occupiesSlots, 'Weapon') | ||
-- Determine the style of the item (Melee, Ranged, Magic, Other) | -- Determine the style of the item (Melee, Ranged, Magic, Other) | ||
Line 327: | Line 323: | ||
:toTable() | :toTable() | ||
local isWeapon = (slot == 'Weapon | local isWeapon = (slot == 'Weapon') | ||
local itemColspan = 3 | local itemColspan = 3 | ||
if isWeapon == true then itemColspan = 4 end | if isWeapon == true then itemColspan = 4 end |