×
Create a new article
Write your page title here:
We currently have 1,393 articles on World Trigger Wiki. Type your article name above or create one of the articles listed here!



    World Trigger Wiki
    Revision as of 14:34, May 15, 2024 by Lord-Giganticus (talk | contribs) (Created page with "local data = require("Module:Which_Round/data") local episodes = data[1] local chapters = data[2] ---@return string function episodes.find(self, num) for _, v in pairs(self) do if type(v) == "table" then if num >= v[1] and num <= v[2] then return v[3] end end end return "" end ---@return string function chapters.find(self, num) for _, v in pairs(self) do if type(v) == "table" then...")
    (diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

    Documentation for this module may be created at Module:Which Round/doc

    local data = require("Module:Which_Round/data")
    
    local episodes = data[1]
    
    local chapters = data[2]
    
    ---@return string
    function episodes.find(self, num)
        for _, v in pairs(self) do
            if type(v) == "table" then
                if num >= v[1] and num <= v[2] then
                    return v[3]
                end
            end
        end
        return ""
    end
    
    ---@return string
    function chapters.find(self, num)
        for _, v in pairs(self) do
            if type(v) == "table" then
                if num >= v[1] and num <= v[2] then
                    return v[3]
                end
            end
        end
        return ""
    end
    
    local mod = {
        episodes = episodes,
        chapters = chapters
    }
    
    ---@type Util
    local util = require('Module:Util')
    
    ---@param frame frame
    function mod.which_round(frame)
        local args, pargs = util.get_args_and_pargs(frame)
        local num = args[1] or pargs[1] or ""
        local variant = args[2] or pargs[2] or ""
        local d = {}
        if variant == "episodes" then d = episodes else d = chapters end
        local n = tonumber(num) or #d
        return d:find(n)
    end
    
    return mod
    
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.

    Recent changes

  • Fairemont • 16 hours ago
  • Fairemont • 16 hours ago
  • Fairemont • 17 hours ago
  • Fairemont • 18 hours ago
  • Welcome to WorldTriggerWiki.com!

    We have completed moving the wiki here from FANDOM. This is the wiki that will be maintained and updated in the future (more information). Enjoy your stay!


    If you would like to get involved, or if you have questions or feedback, check out the Community Portal.

    Happy Birthday!

    Cookies help us deliver our services. By using our services, you agree to our use of cookies.