Wir laden dich herzlich auf den Star Citizen Wiki Discord Server ein! Du kannst uns auch auf unserem neuen YouTube-Chanel finden!

Modul:Hersteller

From Star Citizen Wiki

Modulabhängigkeiten

Dokumentation unvollständig.


local p = {}
local config = mw.loadData( 'Module:Hersteller/Data' )


-- Get a Manufacturer Name from its code
function p.getNameFromCode( code )
	if code and code.args then
		code = code.args[ 1 ]
	end

    for _, obj in pairs( config.manufacturers ) do
        if obj.code == code then
            return obj.name
        end
    end

    return code
end


-- Get a Manufacturer Code from its name
function p.getCodeFromName( name )
	if name and name.args then
		name = name.args[ 1 ]
	end

    for _, obj in pairs( config.manufacturers ) do
        if obj.name == name then
            return obj.code
        end
    end

    return name
end


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