new module to enable jsreport for selected factions.

This commit is contained in:
Enno Rehling 2015-04-04 09:19:10 +02:00
parent 9664f2b191
commit d8c1f03f55
2 changed files with 19 additions and 0 deletions

View File

@ -13,5 +13,6 @@ return {
require('eressea.ponnuki'), require('eressea.ponnuki'),
require('eressea.astral'), require('eressea.astral'),
require('eressea.locales'), require('eressea.locales'),
require('eressea.jsreport'),
require('eressea.ents') require('eressea.ents')
} }

View File

@ -0,0 +1,18 @@
local pkg = {}
function pkg.update()
local factions = { '777', '1wpy', 'd08a', 'hani', 'scaL' }
for id in ipairs(factions) do
local f = faction.get(id)
if f then
local o = f.options
local bit = (math.floor(o / 8) % 2)
if bit==0 then
eressea.log.debug("enable JSON report for " .. tostring(f))
f.options = o + 8
end
end
end
end
return pkg