Module:Prayer: Difference between revisions

Updated how prayer effects are written to match the new system
(formatting tweaks)
(Updated how prayer effects are written to match the new system)
Line 5: Line 5:
local Shared = require('Module:Shared')
local Shared = require('Module:Shared')
local Icons = require('Module:Icons')
local Icons = require('Module:Icons')
local Constants = require('Module:Constants')


function p.getPrayerByID(id)
function p.getPrayerByID(id)
Line 84: Line 85:
   local chr = asList and '* ' or ''
   local chr = asList and '* ' or ''
   local bonusLines = {}
   local bonusLines = {}
  --[[
   for i, var in Shared.skpairs(prayer.vars) do
   for i, var in Shared.skpairs(prayer.vars) do
     local val = prayer.values[i]
     local val = prayer.values[i]
     table.insert(bonusLines, chr..p.formatEffectLine(var, val))
     table.insert(bonusLines, chr..p.formatEffectLine(var, val))
  end
  --]]
  for bonusKey, bonusVal in Shared.skpairs(prayer.modifiers) do
    table.insert(bonusLines, chr..Constants.getModifierText(bonusKey, bonusVal, false))
   end
   end