Anonymous

Module:Equipment: Difference between revisions

From Zelda Wiki, the Zelda encyclopedia
no edit summary
(Changed arrow icon to be arrow alone for)
No edit summary
 
Line 28: Line 28:
local plural = false
local plural = false
if #equipmentTypeQuery == 0 then
if #equipmentTypeQuery == 0 then
if not string.find(args.equipment, "Arrow") then
return h.err("The specified equipment is not in " .. tableName .. ".")
return h.err("The specified equipment is not in " .. tableName .. ".")
end
-- Arrows are a special case, are classified as Bow even if
-- they are not in the Cargo table, and have a pluralized link
plural = true
equipmentTypeQuery = { { type = (args.game == "BotW") and "Bow" or "Arrow" } }
end
end
Line 41: Line 34:
-- Every Material or Zonai Device is pluralized for this template
-- Every Material or Zonai Device is pluralized for this template
if equipmentType == "Material" or equipmentType == "Zonai Device" then
if equipmentType == "Arrow" or equipmentType == "Material" or equipmentType == "Zonai Device" then
plural = true
plural = true
end
end