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

Die Dokumentation für dieses Modul kann unter Modul:Fahrzeug/Data/Doku erstellt werden

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'] = {
			api_name = 'Crusader Ares Inferno',
			brochure = 'CRSD_Ares_Broschüre.pdf',
		},        
		['Ares Ion'] = {
			api_name = 'Crusader Ares Ion',
			brochure = 'CRSD_Ares_Broschüre.pdf',
		},
	
		['Mole'] = {
			api_name = 'Argo Mole',
		},
		['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',
        },
        ['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',
        },
        ['Nomad'] = {
            api_name = 'CNOU Nomad',
        },
        
        ['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'] = {
			api_name = 'RSI-Perseus',
            brochure = 'Comm-Link_17881_Perseus_Broschüre.pdf',
		},
        
        ['Scorpius'] = {
			api_name = 'RSI Scorpius',
            brochure = 'Comm-Link_17881_Perseus_Broschüre.pdf',
		},

        ['Talon'] = {
            api_name = 'Esperia-Talon'
        },
        ['Talon Shrike'] = {
            api_name = 'Esperia-Talon-Shrike'
        },

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

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

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

        ['G12'] = {
            api_method = 'ship',
            api_name = 'Origin G12'
        },
        ['G12a'] = {
            api_name = 'Origin G12a',
        	brochure = 'ORIG_G12_Broschüre.pdf',
        },
        ['G12r'] = {
            api_name = 'Origin 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 = 'Avionik',
        RSIPropulsion = 'Antrieb',
        RSIThruster = 'Triebwerk',
        RSIModular = 'Systeme',
        RSIWeapon = 'Waffen',
    },
    components = {
        RSIAvionic = {
            radar = 'Radar',
            computers = 'Rechner',
        },
        RSIModular = {
            power_plants = 'Kraftwerksanlage',
            coolers = 'Kühlaggregat',
            shield_generators = 'Schildgenerator',
        },
        RSIPropulsion = {
            fuel_intakes = 'Treibstoffeinlass',
            fuel_tanks = 'Treibstofftank',
            quantum_drives = 'Quantenantrieb',
            jump_modules = 'Sprungmodul',
            quantum_fuel_tanks = 'Quantentreibstofftank',
        },
        RSIThruster = {
            main_thrusters = {
                main_thrusters = 'Primärtriebwerk',
                ['Main Thruster'] = 'Primärschubdüse',
                ['Retro Thruster'] = 'Retroschubdüse',
                ['VTOL Thruster'] = 'VTOL-Schubdüse',
                ['Gimbal Maneuvering Thruster'] = 'kardanische Schubdüse',
            },
            maneuvering_thrusters = {
                maneuvering_thrusters = 'Manövriertriebwerk',
                ['Gimbal Maneuvering Thruster'] = 'kardanische Manövrierdüse',
                ['Retro Thruster'] = 'Retroschubdüse',
                ['Fixed Maneuvering Thruster'] = 'feste Manövrierdüse',
                ['Joint Maneuvering Thrusters'] = 'verbundene Manövrierdüse',
            },
        },
        RSIWeapon = {
            weapons = 'Waffen',
            turrets = {
                turrets = 'Türme',
                ['Manned Turrets'] = 'Bemannte Türme',
                ['Remote Turrets'] = 'Ferngesteuerte Türme'
            },
            utility_items = 'Hilfsmittel',
            missiles = 'Flugkörper',
        },
    },
}


-- 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 'Undefiniert'
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
        return p.componentTranslations.components[ componentClass ][ key ][ key ]
    end

    if p.componentTranslations.components[ componentClass ][ key ] ~= nil then
        return p.componentTranslations.components[ componentClass ][ key ]
    end

    return 'Undefiniert';
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 ][ key ] ) == 'table' and
        p.componentTranslations.components[ componentClass ][ key ][ name ] ~= nil then
            return p.componentTranslations.components[ componentClass ][ key ][ name ]
    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.