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

Modul:Fahrzeug/Data

Aus Star Citizen Wiki

Modulinfo

Dieses Modul enthält Konfigurationseinstellungen zu Fahrzeugseiten.

Über diese Seite werden abweichende Fahrzeugnamen in der API oder die Anzeige von Broschüren gesteuert.


local p = {
    vehicle = '',

    data = {
        -- Ships
        ['100i'] = {
            brochure = 'ORIG_100_Serie_Broschüre.pdf',
        },
        ['125a'] = {
            brochure = 'ORIG_100_Serie_Broschüre.pdf',
        },
        ['135c'] = {
            brochure = 'ORIG_100_Serie_Broschüre.pdf',
        },

        ['300i'] = {
            brochure = 'ORIG_300_Serie_Broschüre.pdf',
        },
        ['315p'] = {
            brochure = 'ORIG_300_Serie_Broschüre.pdf',
        },
        ['325a'] = {
            brochure = 'ORIG_300_Serie_Broschüre.pdf',
        },
        ['350r'] = {
            brochure = 'ORIG_300_Serie_Broschüre.pdf',
        },

        ['600i Explorer'] = {
            brochure = 'ORIG_600i_Serie_Broschüre.pdf',
        },
        ['600i Tourung'] = {
            brochure = 'ORIG_600i_Serie_Broschüre.pdf',
        },

        ['A2 Hercules'] = {
            brochure = 'CRSD_Hercules_Serie_Broschüre.pdf',
        },
        ['Apollo Medivac'] = {
            brochure = 'RSI_Apollo_Serie_Broschüre.pdf',
        },
        ['Apollo Triage'] = {
            brochure = 'RSI_Apollo_Serie_Broschüre.pdf',
        },

        ['Ares Inferno'] = {
            brochure = 'CRSD_Ares_Broschüre.pdf',
        },
        ['Ares Ion'] = {
            brochure = 'CRSD_Ares_Broschüre.pdf',
        },

        ['Mole Carbon Edition'] = {
            api_name = 'Argo Mole Carbon Edition',
        },
        ['Mole Talus Edition'] = {
            api_name = 'Argo Mole Talus Edition',
        },

        ['Aurora CL'] = {
            brochure = 'RSI_Aurora_Serie_Broschüre.pdf',
        },
        ['Aurora ES'] = {
            brochure = 'RSI_Aurora_Serie_Broschüre.pdf',
        },
        ['Aurora LN'] = {
            brochure = 'RSI_Aurora_Serie_Broschüre.pdf',
        },
        ['Aurora MR'] = {
            brochure = 'RSI_Aurora_Serie_Broschüre.pdf',
        },

        ['C2 Hercules'] = {
            brochure = 'CRSD Hercules_Serie_Broschüre.pdf',
        },
        ['Cutlass Black'] = {
            brochure = 'DRAK_Cutlass_Serie_Broschüre.pdf'
        },
        ['Cutlass Blue'] = {
            brochure = 'DRAK_Cutlass_Serie_Broschüre.pdf'
        },
        ['Cutlass Red'] = {
            brochure = 'DRAK_Cutlass_Serie_Broschüre.pdf'
        },

        ['Defender'] = {
            api_name = 'Banu Defender',
        },

        ['Dragonfly Black'] = {
            brochure = 'DRAK_Dragonfly_Serie_Broschüre.pdf',
        },
        ['Dragonfly Yellowjacket'] = {
            brochure = 'DRAK_Dragonfly_Serie_Broschüre.pdf',
        },

        ['F7C Hornet'] = {
            brochure = 'ANVL_F7C_Serie_Broschüre.pdf',
        },
        ['F7C-S Hornet Ghost'] = {
            brochure = 'ANVL_F7C_Serie_Broschüre.pdf',
        },
        ['F7C-M Super Hornet'] = {
            brochure = 'ANVL_F7C_Serie_Broschüre.pdf',
        },
        ['F7C-R Hornet Tracker'] = {
            brochure = 'ANVL_F7C_Serie_Broschüre.pdf',
        },
        [ 'F8C Lightning'] = {
            api_name = 'F8 Lightning',
        },

        ['Freelancer'] = {
            brochure = 'MISC_Freelancer_Serie_Broschüre.pdf',
        },
        ['Freelancer DUR'] = {
            brochure = 'MISC_Freelancer_Serie_Broschüre.pdf',
        },
        ['Freelancer MIS'] = {
            brochure = 'MISC_Freelancer_Serie_Broschüre.pdf',
        },
        ['Freelancer MAX'] = {
            brochure = 'MISC_Freelancer_Serie_Broschüre.pdf',
        },

        ['M2 Hercules'] = {
            brochure = 'CRSD Hercules_Serie_Broschüre.pdf',
        },
        ['MPUV Cargo'] = {
            brochure = 'ARGO MPUV_Serie_Broschüre.pdf',
        },
        ['MPUV Personell'] = {
            brochure = 'ARGO MPUV_Serie_Broschüre.pdf',
        },
        ['Mustang Alpha'] = {
            brochure = 'CNOU_Mustang_Serie_Broschüre.pdf',
        },
        ['Mustang Beta'] = {
            brochure = 'CNOU_Mustang_Serie_Broschüre.pdf',
        },
        ['Mustang Gamma'] = {
            brochure = 'CNOU_Mustang_Serie_Broschüre.pdf',
        },
        ['Mustang Delta'] = {
            brochure = 'CNOU_Mustang_Serie_Broschüre.pdf',
        },
        ['Mustang Omega'] = {
            brochure = 'CNOU_Mustang_Serie_Broschüre.pdf',
        },

        ['Nautilus Solstice Edition'] = {
            brochure = 'AEGS_Nautilus_Broschüre.pdf',
        },

        ['Nox Kue'] = {
            brochure = 'AOPOA_Box_Broschüre.pdf',
        },

        ['Orion (Raumschiff)'] = {
            api_name = 'Orion',
        },

        ['P-72 Archimedes'] = {
            api_name = 'P72 Archimedes',
        },

        ['Retaliator Base'] = {
            brochure = 'AEGS_Retaliator_Broschüre.pdf',
        },
        ['Retaliator Bomber'] = {
            brochure = 'AEGS_Retaliator_Broschüre.pdf',
        },

        ['Perseus'] = {
            brochure = 'Comm-Link_17881_Perseus_Broschüre.pdf',
        },

        ['Scorpius'] = {
            brochure = 'Comm-Link_17881_Perseus_Broschüre.pdf',
        },

        ['Vulture (Raumschiff)'] = {
            api_name = 'Vulture',
        },

        ['X1 Force'] = {
            brochure = 'ORIG_X1_Base_Broschüre.pdf',
        },
        ['X1 Velocity'] = {
            brochure = 'ORIG_X1_Base_Broschüre.pdf',
        },
        ['X1 Base'] = {
            api_name = 'X1',
        },

        -- Vehicles
        ['Cyclone'] = {
            brochure = 'TMBL_Cyclone_Broschüre.pdf',
        },
        ['Cyclone-AA'] = {
            brochure = 'TMBL_Cyclone_Broschüre.pdf',
        },

        ['G12'] = {
            api_method = 'ship',
        },
        ['G12a'] = {
            brochure = 'ORIG_G12_Broschüre.pdf',
        },
        ['G12r'] = {
            brochure = 'ORIG_G12_Broschüre.pdf',
        },

        ['Ranger CV'] = {
            brochure = 'TMBL_Ranger_Broschüre.pdf',
        },
        ['Ranger TR'] = {
            brochure = 'TMBL_Ranger_Broschüre.pdf',
        },
        ['Ranger RC'] = {
            brochure = 'TMBL_Ranger_Broschüre.pdf',
        }
    }
}

p.prototype = {
    brochure = '',

    -- 3D Stuff
    enable_3d = true,

    ctm_file = '',

    api_method = '',
    api_name = '',

    scale = 1,

    rotation_x = 0,
    rotation_y = 0,
    rotation_z = 0,

    rotation_speed_x = 0,
    rotation_speed_y = 0.005,
    rotation_speed_z = 0,

    clear_color = '#ffffff',
    background_opacity = 0,

    camera_position_x = 0,
    camera_position_y = 5,
    camera_position_z = 20,
}

p.componentTranslations = {
    classes = {
        RSIAvionic = {
            de_DE = 'Avionik',
            en_EN = 'Avionics',
        },
        RSIPropulsion = {
            de_DE = 'Antrieb',
            en_EN = 'Propulsion',
        },
        RSIThruster = {
            de_DE = 'Triebwerk',
            en_EN = 'Engine',
        },
        RSIModular = {
            de_DE = 'Systeme',
            en_EN = 'Systems',
        },
        RSIWeapon = {
            de_DE = 'Bewaffnung',
            en_EN = 'Weapons',
        },
    },
    components = {
        RSIAvionic = {
            radar = {
                de_DE = 'Radar',
                en_EN = 'Radar',
            },
            computers = {
                de_DE = 'Rechner',
                en_EN = 'Computers',
            },
        },
        RSIModular = {
            power_plants = {
                de_DE = 'Kraftwerksanlage',
                en_EN = 'Power Plant',
            },
            coolers = {
                de_DE = 'Kühlaggregat',
                en_EN = 'Shield Generator',
            },
            shield_generators = {
                de_DE = 'Schildgenerator',
                en_EN = 'Cooler',
            },
            ['Power Plant'] = {
                de_DE = 'Kraftwerksanlage',
                en_EN = 'Power Plant',
            },
            ['Cooler'] = {
                de_DE = 'Kühlaggregat',
                en_EN = 'Shield Generator',
            },
            ['Shield Generator'] = {
                de_DE = 'Schildgenerator',
                en_EN = 'Cooler',
            },
        },
        RSIPropulsion = {
            fuel_intakes = {
                de_DE = 'Treibstoffeinlass',
                en_EN = 'Fuel Intake',
            },
            fuel_tanks = {
                de_DE = 'Treibstofftank',
                en_EN = 'Fuel Tank',
            },
            quantum_drives = {
                de_DE = 'Quantenantrieb',
                en_EN = 'Quantum Drive',
            },
            jump_modules = {
                de_DE = 'Sprungmodul',
                en_EN = 'Jump Module',
            },
            quantum_fuel_tanks = {
                de_DE = 'Quantentreibstofftank',
                en_EN = 'Quantum Fuel Tank',
            },

            ['Fuel Intake'] = {
                de_DE = 'Treibstoffeinlass',
                en_EN = 'Fuel Intake',
            },
            ['Fuel Tank'] = {
                de_DE = 'Treibstofftank',
                en_EN = 'Fuel Tank',
            },
            ['Jump Module'] = {
                de_DE = 'Sprungmodul',
                en_EN = 'Jump Module',
            },
            ['Quantum Fuel Tank'] = {
                de_DE = 'Quantentreibstofftank',
                en_EN = 'Quantum Fuel Tank',
            },
        },
        RSIThruster = {
            main_thrusters = {
                ['main_thrusters'] = {
                    de_DE = 'Primärtriebwerk',
                    en_EN = 'Main Thruster',
                },
                ['Main Thruster'] = {
                    de_DE = 'Primärschubdüse',
                    en_EN = 'Main Thruster',
                },
                ['Retro Thruster'] = {
                    de_DE = 'Retroschubdüse',
                    en_EN = 'Retro Thruster',
                },
                ['VTOL Thruster'] = {
                    de_DE = 'VTOL-Schubdüse',
                    en_EN = 'VTOL Thruster',
                },
                ['Gimbal Maneuvering Thruster'] = {
                    de_DE = 'kardanische Schubdüse',
                    en_EN = 'Gimbal Maneuvering Thruster',
                },
            },
            maneuvering_thrusters = {
                maneuvering_thrusters = {
                    de_DE = 'Manövriertriebwerk',
                    en_EN = 'Maneuvering Thruster',
                },
                ['Gimbal Maneuvering Thruster'] = {
                    de_DE = 'kardanische Manövrierdüse',
                    en_EN = 'Gimbal Maneuvering Thruster',
                },
                ['Retro Thruster'] = {
                    de_DE = 'Retroschubdüse',
                    en_EN = 'Retro Thruster',
                },
                ['Fixed Maneuvering Thruster'] = {
                    de_DE = 'feste Manövrierdüse',
                    en_EN = 'Fixed Maneuvering Thruster',
                },
                ['Joint Maneuvering Thrusters'] = {
                    de_DE = 'verbundene Manövrierdüse',
                    en_EN = 'Joint Maneuvering Thrusters',
                },
            },
        },
        RSIWeapon = {
            weapons = {
                de_DE = 'Waffen',
                en_EN = 'Weapons',
            },
            turrets = {
                turrets = {
                    de_DE = 'Türme',
                    en_EN = 'Turrets',
                },
                ['Manned Turrets'] = {
                    de_DE = 'Bemannte Türme',
                    en_EN = 'Manned Turrets',
                },
                ['Remote Turrets'] = {
                    de_DE = 'Ferngesteuerte Türme',
                    en_EN = 'Remote Turrets',
                },
                ['Manned Turret'] = {
                    de_DE = 'Bemannter Turm',
                    en_EN = 'Manned Turret',
                },
            },
            utility_items = {
                de_DE = 'Hilfsmittel',
                en_EN = 'Utility',
            },
            missiles = {
                de_DE = 'Flugkörper',
                en_EN = 'Missile',
            },
        },
    },
}


-- Component Translation Methods
-- Translate the component class
function p.getTranslatedComponentClass( component )
    if p.componentTranslations.classes[ component.component_class ] ~= nil then
        return p.componentTranslations.classes[ component.component_class ]
    end

    return {
        de_DE = 'Undefiniert',
        en_EN = 'Undefined',
    }
end

-- Translated component type
function p.getTranslatedComponentType( component )
    local componentClass = component.component_class
    local key = component.type

    if type( p.componentTranslations.components[ componentClass ][ key ] ) == 'table' then
        if type( p.componentTranslations.components[ componentClass ][ key ].de_DE ) == 'string' then
            return p.componentTranslations.components[ componentClass ][ key ]
        else
            return p.componentTranslations.components[ componentClass ][ key ][ key ]
        end
    end

    return {
        de_DE = 'Undefiniert',
        en_EN = 'Undefined',
    }
end

-- Translated component name
-- If no translation is found, returns the original name
function p.getTranslatedComponentName( component )
    local componentClass = component.component_class
    local key = component.type
    local name = component.name

    if type( p.componentTranslations.components[ componentClass ][ name ] ) == 'table' then
        return p.componentTranslations.components[ componentClass ][ name ].de_DE
    end

    if type( p.componentTranslations.components[ componentClass ][ key ] ) == 'table' and
            p.componentTranslations.components[ componentClass ][ key ][ name ] ~= nil then
        return p.componentTranslations.components[ componentClass ][ key ][ name ].de_DE
    end

    return name
end

-- Returns the manufacturer if it is not empty or TBD
function p.getComponentManufacturer( component )
    if component.manufacturer == nil or component.manufacturer == '' or component.manufacturer == 'TBD' then
        return nil
    end

    return component.manufacturer
end

function p.get( key )
    if p.data[p.vehicle] and p.data[p.vehicle][key] then
        return p.data[p.vehicle][key]
    elseif p.prototype[key] then
        return p.prototype[key]
    else
        error( 'Key ' .. key .. 'does not exist in Vehicle config', 0 )
    end
end

function p.set( key, value )
    if p.vehicle ~= '' then
        if p.data[p.vehicle] == nil then
            p.data[p.vehicle] = {}
        end

        p.data[p.vehicle][key] = value
    end
end

function p.new( vehicle )
    p.vehicle = vehicle

    return p
end

return p
Cookies helfen uns bei der Bereitstellung dieses Wikis. Durch die Nutzung des Star Citizen Wiki erklärst du dich damit einverstanden, dass wir Cookies speichern.