FANDOM


local utils = require("Module:Utils")
local InfoboxUtils = require("Module:InfoboxUtils")
local yesno = require('Dev:Yesno')
 
local categorize = utils.categorize('Star')
 
local p = {}
 
p._format_theory = function(args)
    if yesno(args.theory) then
        return "Theorized" .. categorize("Theorized Star")
        end
end
 
p.format_theory = utils.make_wrapper_function(p._format_theory)
 
p._format_constellation = function(args)
    local it = args.constellation
    return "Star is in the constellation of [[Constellation:"..args.constellation.."|"..args.constellation.."]]"..categorize("Stars in the constellation of "..args.constellation)
end
 
p.format_constellation = utils.make_wrapper_function(p._format_constellation)
 
 p._format_type = function(args)
    local type = args.type
    if type == "Yellow Dwarf" then
        return "Yellow Dwarf".. categorize("Yellow Dwarf Stars")
    elseif type == "Red Dwarf" then
        return "Red Dwarf" .. categorize("Red Dwarf Stars")
    elseif type == "Blue Main Sequence Star" then
        return "Blue Main Sequence Star" .. categorize("Blue Main Sequence Stars")
    elseif type == "Red Giant" then
        return "Red Giant" .. categorize("Red Giant Stars")
    elseif type == "Black hole" then
        return "Black hole" .. categorize("Black holes")
    elseif type == "White Dwarf" then
        return "White Dwarf" .. categorize("White Dwarf Stars")
    elseif type == "Black Dwarf" then
        return "Black Dwarf" .. categorize("Black Dwarf Stars")
    elseif type == "Brown Dwarf" then
        return "Brown Dwarf" .. categorize("Brown Dwarf Stars")
    elseif type == "Magnetar" then
        return "Magnetar" .. categorize("Magnetars")
    elseif type == "neutron star" then
        return "Neutron star" .. categorize("Neutron Stars")
    elseif type == "pulsar" then
        return "Pulsar" .. categorize("Pulsars")
    elseif type == "Red Supergiant" then
        return "Red Supergiant" .. categorize("Red Supergiant Stars")
    elseif type == "Supergiant" then
        return "Supergiant" .. categorize("Supergiant Stars")
    elseif type == "Subdwarf" then
        return "Subdwarf" .. categorize("Subdwarf Stars")
    elseif type == "Carbon" then
        return "Carbon" .. categorize("Carbon Stars")
    elseif type == "Main Sequence" then
        return "Main Sequence" .. categorize("Main Sequence Stars")
    elseif type == "Cepheid" then
        return "Cepheid" .. categorize("Cepheid Stars")
    elseif type == "Mira" then
        return "Mira" .. categorize("Mira stars")
    elseif type == "Dwarf" or type == "dwarf" then
        return utils.error_message("Please specify what type of Dwarf. The dwarf stars are Yellow Dwarf, Red Dwarf, White Dwarf, Black Dwarf, Brown Dwarf, Subdwarf")
    else
       return utils.error_message("Invalid type.  Must be Yellow Dwarf, Red Dwarf, Blue Main Sequence star, Red Giant, Black hole, White Dwarf, Black Dwarf, Brown Dwarf, Magnetar, neutron star, pulsar, Red Supergiant, Supergiant, Subdwarf, Carbon, Cepheid, Mira, or Main Sequence")
    end
end
 
p.format_type=utils.make_wrapper_function(p._format_type)
 
return p

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.