Modulo:Fumetto e animazione/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
semplifico
m +
Riga 84:
setmetatable(self, { __index = Media })
 
self.argstipo = args.tipo
self.sottotipo = args.sottotipo
self.name = self:_getName()
self.alias = self:_getName(true)
self.year = self:_getYear()
 
return self
Riga 95:
function Media:inArray(...)
for _, value in ipairs({ ... }) do
if self.args.tipo == value or self.name == value then
return true
end
Riga 106:
local key_tipo = alias and 'prefisso_tipo' or 'tipo'
local key_sottotipo = alias and 'prefisso_sottotipo' or 'sottotipo'
local ret = cfg[key_sottotipo][self.args.tipo] and
cfg[key_sottotipo][self.args.tipo][self.args.sottotipo] or
cfg[key_tipo][self.args.tipo]
return ret and lcfirst(ret) or nil
end
Riga 176:
self:_addCategory(self.media.alias .. broadcaster)
end
elseif self.argsmedia.tipo == 'manga' then
self
:_addCategoriesBy('editore_manga')
Riga 187:
:_addCategoriesBy('etichetta')
:_addCategoriesBy('editore')
elseif self.argsmedia.tipo == 'fumetto' and self.media.name ~= 'fumetti' then
self
:_addCategoriesBy('etichetta_sottotipo', nil, self['_prependSubtype'])
Riga 198:
self:_addCategory(self.media.name)
end
elseif self.argsmedia.tipo == 'fumetto' then
self
:_addCategoriesBy('etichetta')
Riga 209:
self:_addCategory(self.media.name)
-- categorizzazione per anno delle opere previste
elseif self.year and self.argsmedia.sottotipo ~= 'film direct-to-video' then
local media = not self.argsmedia.tipo == 'anime' and self.media.alias or self.media.name
self:_addCategory(string.format('%s del %s', media, self.year))
end
Riga 320:
-- Antepone il sottotipo dell'opera a una stringa
function CategoryManager:_prependSubtype(value)
return self.argsmedia.sottotipo .. value
end