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



    World Trigger Wiki
    Revision as of 16:59, May 16, 2024 by Desk gun (talk | contribs) (Replaced content with "local data = require("Module:Which_Chapter/data") local chapters = data[1] ---@param num integer local function get_chapter(num) for i, v in ipairs(chapters) do if i == num then return v end end return "TBA" end local util = require("Module:Util") local mod = { chapters = chapters } function mod.where_chapter(frame) local args = frame.args local parent = frame:getParent() local pargs={} if parent then p...")

    Usage: {{#invoke:Which Chapter|where_chapter|number}}

    For Chapter 89+ specifically, use {{#invoke:Which Chapter|where_chapter|89+}}


    local data = require("Module:Which_Chapter/data")
    
    local chapters = data[1]
    
    ---@param num integer
    local function get_chapter(num)
        for i, v in ipairs(chapters) do
            if i == num then
                return v
            end
        end
        return "TBA"
    end
    
    local util = require("Module:Util")
    
    local mod = {
        chapters = chapters
    }
    
    function mod.where_chapter(frame)
        local args = frame.args
        local parent = frame:getParent()
        local pargs={}
        if parent then pargs=parent.args end
        local n = args[1] or pargs[1] or ""
        if n == "89+" then return "Chapter 89+" end
        local num = tonumber(n) or #chapters + 1
        local resolve = args[2] or pargs[2] or nil
        local res = frame:preprocess(get_chapter(num))
        if resolve ~= nil then
            if res == "TBA" then return res end
            return util.resolve_text(res)
        else
            return res
        end
    end
    
    return mod
    
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.

    Recent changes

  • Desk gun • 11 minutes ago
  • Desk gun • 16 minutes ago
  • Desk gun • 25 minutes ago
  • Desk gun • 25 minutes 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!

    July 3

    Rui Osano

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