Jump to content
Discussions

Module:File/data

From Undertale Wiki

Additional data used in file descriptions.

Documentation

Package items

file_data.license (member; table)
Map of file license types to license text.
file_data.types (member; table)
Map of file types (used in type or file page title) to their names and categories.
file_data.authors (member; table)
Map of author names to their respective profile/article links. By default, the author of a file is Toby Fox, as specified in the default property.
file_data.numbering (member; table)
Map of number → position name. Used in numerical file descriptions, for example a mapping from File:Burgerpants face 5.png to "Burgerpants's fifth face."
file_data.typeorder (member; table)
Order of type deduction from filename. Screenshots go first because their names are usually the most complex and may include names of other types, which could confuse the file type deduction mechanism.

Private items

file_data.game (member; string • local)
Game's name. Because the same base module is used on Deltarune Wiki, where the game's name is "Deltarune."
--- Additional data used in file descriptions.
--  @file               file_data
--  @alias              p

--- Map of file license types to license text.
--  @property           {table} file_data.license

--- Map of file types (used in <code>type</code> or file page title) to their
--  names and categories.
--  @property           {table} file_data.types

--- Map of author names to their respective profile/article links.
--  By default, the author of a file is [[Toby Fox]], as
--  specified in the <code>default</code> property.
--  @property           {table} file_data.authors

--- Map of number &rarr; position name.
--  Used in numerical file descriptions, for example a mapping from
--  <code>File:Burgerpants face 5.png</code> to "Burgerpants's fifth face."
--  @property           {table} file_data.numbering

--- Order of type deduction from filename.
--  Screenshots go first because their names are usually the most complex and
--  may include names of other types, which could confuse the file type
--  deduction mechanism.
--  @property           {table} file_data.typeorder

--- Game's name.
--  Because the same base module is used on Deltarune Wiki, where the game's
--  name is "Deltarune."
--  @property           {string} file_data.game
local p = {
    license = {
        fairuse    = 'is copyrighted. It will be used in a way that qualifies as [[wikipedia:Fair use|fair use]] under US copyright law',
        music      = 'is a music file by [[Toby Fox]], © 2015 Royal Sciences LLC, used on the wiki by permission',
        ccbysa     = 'is licensed under the [https://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribution-Share Alike License]',
        pd         = 'is in the public domain',
        self       = 'was uploaded by the photographer or author',
        permission = 'is copyrighted. The copyright holder has given permission for its use on the wiki',
        default    = 'does not have information on its copyright status'
    },
    types = {
        artwork = {
            name     = 'Artwork',
            category = 'Artwork'
        },
        attack = {
            name     = 'Attack screenshot',
            category = 'Screenshots'
        },
        battle = {
            name     = 'Battle',
            category = 'Battle sprites'
        },
        cover = {
            name     = 'Cover art',
            category = 'Cover art'
        },
        cutcontent = {
            name     = 'Cut content',
            category = 'Cut content files'
        },
        face = {
            name     = 'Face',
            category = 'Face sprites'
        },
        item = {
            name     = 'Item',
            category = 'Item files'
        },
        motif = {
            name     = 'Motif',
            category = 'Motif files'
        },
        -- TODO: Remove after the leitmotifs -> motifs move.
        leitmotif = {
            name     = 'Motif',
            category = 'Motif files'
        },
        location = {
            name     = 'Location',
            category = 'Location files'
        },
        logo = {
            name     = 'Logo',
            category = 'Logos'
        },
        map = {
            name     = 'Map',
            category = 'Maps'
        },
        misc = {
            name     = 'Miscellaneous',
            category = 'Miscellaneous files'
        },
        music = {
            name     = 'Music',
            category = 'Audio'
        },
        overworld = {
            name     = 'Overworld',
            category = 'Overworld sprites'
        },
        photograph = {
            name     = 'Photograph',
            category = 'Photographs'
        },
        screenshot = {
            name     = 'Screenshot',
            category = 'Screenshots'
        },
        soundtrack = {
            name     = 'Soundtrack',
            category = 'Soundtrack files'
        },
        sprite = {
            name     = 'Sprite',
            category = 'Sprites'
        },
        tarot = {
            name     = 'Tarot',
            category = 'Tarot cards'
        }
    },
    typeorder = {
        -- Most important due to filename format
        'screenshot',
        -- Rest are sorted alphabetically
        'artwork',
        'attack',
        'battle',
        'cover',
        'cutcontent',
        'face',
        'item',
        'leitmotif',
        'location',
        -- Above music due to [[:File:Mettaton overworld musical.gif]]
        -- Above logo due to [[:File:Cooking show logo overworld Japanese.png]]
        'overworld',
        'logo',
        'map',
        'misc',
        'motif',
        'music',
        'photograph',
        'soundtrack',
        'sprite',
        'tarot'
    },
    authors = {
        ["default"] = '[[Toby Fox]]',
        ["Guzusuru"] = 'Angela "[[Guzusuru]]" Sham',
        ["Gigi D.G."] = '[[Gigi D.G.]]'
    },
    numbering = {
        'first',
        'second',
        'third',
        'fourth',
        'fifth',
        'sixth',
        'seventh',
        'eighth',
        'ninth',
        'tenth'
    },
    game = 'Undertale'
}

-- License aliases
p.license['fair use']         = p.license.fairuse
p.license['fair']             = p.license.fairuse
p.license['cc-by-sa']         = p.license.ccbysa
p.license['cc by sa']         = p.license.ccbysa
p.license['public domain']    = p.license.pd
p.license['own']              = p.license.self
-- Type aliases
p.types  ['concept']          = p.types.artwork
p.types  ['screen']           = p.types.screenshot
p.types  ['battle sprite']    = p.types.battle
p.types  ['overworld sprite'] = p.types.overworld
p.types  ['miscellaneous']    = p.types.misc
p.types  ['cut']              = p.types.cutcontent
p.types  ['cut content']      = p.types.cutcontent
p.types  ['photo']            = p.types.photograph

return p