Module:Items: Difference between revisions

Added level requirement to Alt Magic table
(Added alt magic tables to the item sources thing)
(Added level requirement to Alt Magic table)
Line 323: Line 323:
   local result = '{|class="wikitable"\r\n|-'
   local result = '{|class="wikitable"\r\n|-'
   result = result..'\r\n!colspan="2"|'..Icons.Icon({spell.name, type='spell'})
   result = result..'\r\n!colspan="2"|'..Icons.Icon({spell.name, type='spell'})
  result = result..'\r\n|-\r\n!style="text-align:right;"|Requirements'
  result = result..'\r\n|'..Icons._SkillReq('Magic', spell.magicLevelRequired)
   -- 1 means select any item. 0 would mean Superheat, but that's handled elsewhere
   -- 1 means select any item. 0 would mean Superheat, but that's handled elsewhere
   -- -1 means no item is needed, so hide this section
   -- -1 means no item is needed, so hide this section
   if spell.selectItem == 1 then
   if spell.selectItem == 1 then
     result = result..'\r\n|-\r\n!style="text-align:right;"|Requirements'
     result = result..'\r\n|-\r\n!style="text-align:right;"|Materials'
     result = result..'\r\n|1 of any item'
     result = result..'\r\n|1 of any item'
   end
   end