可在Module:VehicleHardpoint/Data/doc创建此模块的帮助文档
--- Hardcoded list of names that clash with other pages
local nameFixes = {
Beacon = 'Beacon (quantum drive)',
Castra = 'Castra (shield generator)',
Centurion = 'Centurion (power plant)',
Citadel = 'Citadel (shield generator)',
Eclipse = 'Eclipse (power plant)',
Nova = 'Nova (quantum drive)',
Mercury = 'Mercury (cooler)',
Odyssey = 'Odyssey (quantum drive)',
}
--- Hardcoded list of types that needs to be fixed for section label
local sectionLabelFixes = {
['Missiles'] = 'Ordnance',
['Missile rack'] = 'Ordnance',
['Weapon'] = 'Pilot weapon',
}
local hardPointNames = {
-- Types
MainThruster = 'Main thruster',
ManneuverThruster = 'Maneuvering thruster',
-- Sub Types
FixedThruster = 'Maneuvering thruster (fixed)',
JointThruster = 'Maneuvering thruster (gimbal)',
FlexThruster = 'Maneuvering thruster (gimbal)',
RetroThruster = 'Retro thruster',
VtolThruster = 'VTOL thruster',
GravLev = 'Grav Lev',
MainFixedThruster = 'Main thruster (fixed)',
MainJointThruster = 'Main thruster (gimbal)',
MainFlexThruster = 'Main thruster (gimbal)',
MainRetroThruster = 'Retro thruster',
MainVtolThruster = 'VTOL thruster',
DecoyLauncher = 'Countermeasure (decoy)',
NoiseLauncher = 'Countermeasure (noise)',
FuelTankSmall = 'Fuel tank (small)',
FuelTankLarge = 'Fuel tank (large)',
QuantumFuelTankSmall = 'Quantum fuel tank (small)',
QuantumFuelTankLarge = 'Quantum fuel tank (large)',
GunTurret = 'Remote turret',
MannedTurret = 'Manned turret',
MissileLauncher = 'Missile rack',
WeaponMining = 'Mining laser',
MiningArm = 'Mining arm',
SalvageArm = 'Salvage arm'
}
--- Maps SC Item 'type' to Hardpoint Class
--- Also includes alternative hardpoint name matches in case no 'type' is defined on the hardpoint
local hardPointMappings = {
['ArmorLocker'] = {
matches = {
'hardpoint_armory_cargo_%d+',
},
class = 'Cargo',
type = 'Armor storage',
},
['Bed'] = {
matches = {
'hardpoint_bed.*',
},
class = 'Facilities',
type = 'Bed',
},
['CargoGrid'] = {
matches = {
'hardpoint_cargo.*',
},
class = 'Cargo',
type = 'Cargo grid',
},
['Container'] = {
matches = {
'hardpoint_mining_pod.*',
},
class = 'Cargo',
type = 'Cargo pod',
},
['Cargo'] = {
matches = {
'hardpoint_personal_inventory.*',
'hardpoint_personal_storage.*',
'hardpoint_storage_%d',
'hardpoint_general_cargo_%d+'
},
class = 'Cargo',
type = 'Personal storage',
},
['Cooler'] = {
matches = {
-- _left / _right / _2
'hardpoint_cooler_.+',
'hardpoint_cooler',
},
class = 'Systems',
type = 'Cooler',
},
['EMP'] = {
matches = {},
class = 'Utility',
type = 'EMP device',
},
['ExternalFuelTank'] = {
matches = {},
class = 'Cargo',
type = 'Cargo pod',
},
['FuelIntake'] = {
matches = {
-- _left / _right
'hardpoint_fuel_intake.*',
},
class = 'Propulsion',
type = 'Fuel intake',
},
['FuelRefinery'] = {
matches = {
-- _left / _right
'hardpoint_fuel_refinery.*',
},
class = 'Utility',
type = 'Fuel refinery',
},
['FuelTank'] = {
matches = {
-- _left / _right
'hardpoint_fuel_tank.*',
},
class = 'Propulsion',
type = 'Fuel tank',
},
['MainThruster'] = {
matches = {
'hardpoint_engine_.+',
'hardpoint_thrusters?.*_main.*',
'hardpoint_Main_.+',
'hardpoint_mainthruster_.+'
},
class = 'Thrusters',
type = 'Main thruster',
},
['ManneuverThruster'] = {
matches = {
'hardpoint_thrusters?_front_top_.+',
'hardpoint_thrusters?_front_bottom_.+',
'hardpoint_thrusters?_rear_top_.+',
'hardpoint_thrusters?_rear_bottom_.+',
'hardpoint_thrusters?_side_forward_.+',
'hardpoint_thrusters?_side_back_.+',
'hardpoint_thrusters?_top_forward_.+',
'hardpoint_thrusters?_top_back_.+',
'hardpoint_thrusters?_bottom_forward_.+',
'hardpoint_thrusters?_bottom_back_.+',
'hardpoint_thrusters?_left_upper_.+',
'hardpoint_thrusters?_right_upper_.+',
'hardpoint_thrusters?_left_lower_.+',
'hardpoint_thrusters?_right_lower_.+',
'hardpoint_thrusters?_left_retro',
'hardpoint_thrusters?_right_retro',
'hardpoint_Man_Thruster_.+',
'hardpoint_thrusters?_mav.+',
'hardpoint_thrusters?_maneuver_.+',
'hardpoint_grav_.+',
'hardpoint_gravplate_.+',
'hardpoint_gravlev_.+'
},
class = 'Thrusters',
type = 'Maneuvering thruster',
},
['MissileLauncher'] = {
matches = {
'hardpoint_missile_.+',
},
class = 'Weapons',
type = 'Missiles',
},
['Missile'] = {
matches = {
'missile_.+_attach',
'missile_attach_.+',
},
class = 'Weapons',
type = 'Missiles',
},
['PersonalInventory'] = {
matches = {
'hardpoint_personal_inventory.*',
'hardpoint_personal_storage.*',
'hardpoint_storage_%d',
'hardpoint_general_cargo_%d+'
},
class = 'Cargo grid',
type = 'Personal storage',
},
['PowerPlant'] = {
matches = {
'hardpoint_engine_attach.*',
'hardpoint_power_plant',
},
class = 'Systems',
type = 'Power plant',
},
['QuantumDrive'] = {
matches = {
'hardpoint_quantum_drive',
},
class = 'Propulsion',
type = 'Quantum drive',
},
['QuantumFuelTank'] = {
matches = {
'hardpoint_quantum_fuel.*',
},
class = 'Propulsion',
type = 'Quantum fuel tank',
},
['QuantumInterdictionGenerator'] = {
matches = {},
class = 'Utility',
type = 'Quantum jammer',
},
['Radar'] = {
matches = {
'hardpoint_radar.*',
},
class = 'Avionics',
type = 'Radar',
},
['SalvageFillerStation'] = {
matches = {
'hardpoint_refill_station'
},
class = 'Utility',
type = 'Filler station',
},
['SalvageHead'] = {
matches = {
'hardpoint_salvage_laser'
},
class = 'Utility',
type = 'Salvage head',
},
['SalvageModifier'] = {
matches = {},
class = 'Utility',
type = 'Salvage modifier',
},
['Scanner'] = {
matches = {
'hardpoint_scanner',
'hardpoint_controller_scanner'
},
class = 'Avionics',
type = 'Scanner'
},
['SeatAccess'] = {
matches = {},
class = 'Cargo',
type = 'Personal storage',
},
['SelfDestruct'] = {
matches = {
'hardpoint_self_destruct.+',
},
class = 'Systems',
type = 'Self destruct',
},
['Shield'] = {
matches = {
'hardpoint_shield_generator.*',
},
class = 'Systems',
type = 'Shield generator',
},
['ToolArm'] = {
matches = {},
class = 'Utility',
type = 'Utility arm',
},
['Turret'] = {
matches = {
'TurretBase',
'hardpoint_front_turret',
'^hardpoint_turret_top_front$',
'^hardpoint_turret_top_back$',
'^hardpoint_turret_bottom_left$',
'^hardpoint_turret_bottom_right$'
},
class = 'Weapons',
type = 'Turret',
},
['UtilityTurret'] = {
matches = {},
class = 'Utility',
type = 'Utility turret',
},
['WeaponGun'] = {
matches = {
'hardpoint_weapon_left',
'hardpoint_weapon_right'
},
class = 'Weapons',
type = 'Weapon',
},
['WeaponDefensive'] = {
matches = {},
class = 'Utility',
type = 'Countermeasure',
},
['WeaponMining'] = {
matches = {
'hardpoint_weapon_mining'
},
class = 'Utility',
type = 'Mining laser',
},
['WeaponLocker'] = {
matches = {
'hardpoint_.*weapon_?locker.*',
'hardpoint_weapon_?rack.*',
'hardpoint_weapon_rack',
'hardpoint_weapon_seat_rack.*',
'hardpoint_gun_rack',
'hardpoint_rack_FL',
'hardpoint_rack_FR',
'hardpoint_rack_RL',
'hardpoint_rack_RR',
'hardpoint_weaponlocker',
},
class = 'Cargo',
type = 'Weapon storage',
},
-- In-development components
['Battery'] = {
matches = {
'hardpoint_battery'
},
class = 'Systems',
type = 'Battery'
},
['Computer'] = {
matches = {
'hardpoint_avionics'
},
class = 'Avionics',
type = 'Computer'
},
['DriveUnit'] = {
matches = {
'hardpoint_controller_wheel'
},
class = 'Propulsion',
type = 'Drive unit'
},
['GravityGenerator'] = {
matches = {
'hardpoint_gravity_generator'
},
class = 'Systems',
type = 'Gravity generator'
},
['LifeSupport'] = {
matches = {
'hardpoint_life_support'
},
class = 'Systems',
type = 'Life support'
}
}
-- Some of these components need their type param remapped
-- (e.g.Type=Misc)
local hardPointTypeFixes = {
'PersonalInventory',
'ArmorLocker',
'WeaponLocker',
'Bed',
'Container',
'FuelRefinery',
'Battery',
'Computer',
'DriveUnit',
'GravityGenerator',
'LifeSupport'
}
-- These labels are missing icons
local labelsMissingIcon = {
'Cargo grid',
'Personal storage',
'Armor storage',
'Weapon storage',
'Drive unit',
'Grav Lev',
'Bed',
'Countermeasure',
'EMP device',
'Quantum jammer',
'Cargo pod',
'Fuel refinery',
'Filler station',
'Utility arm'
}
local data = {}
data.nameFixes = nameFixes
data.sectionLabelFixes = sectionLabelFixes
data.hardPointNames = hardPointNames
data.hardPointMappings = hardPointMappings
data.hardPointTypeFixes = hardPointTypeFixes
data.labelsMissingIcon = labelsMissingIcon
return data