(Base model data to sort by) |
(Renamed model to name, set more defaults) |
||
| Line 1: | Line 1: | ||
ships = { | local defaults = { | ||
highStress = 0, | |||
lowStress = 0, | |||
droneHardpoints = 0, | |||
dockingBays = 0, | |||
processedCargo = 0, | |||
processedCargoCombined = 0, | |||
empShielding = 0, | |||
engines = 1, | |||
thrusters = 8, | |||
} | |||
local ships = { | |||
K37 = { | K37 = { | ||
name = 'K37 TNTRL', | |||
make = 'Rusatom-Antonoff', | |||
highStress = 1, | highStress = 1, | ||
lowStress = 2, | lowStress = 2, | ||
| Line 13: | Line 25: | ||
}, | }, | ||
KX37 = { | KX37 = { | ||
name = 'KX37 TNTRL', | |||
make = 'Rusatom-Antonoff', | make = 'Rusatom-Antonoff', | ||
baseModel = 'K37', | baseModel = 'K37', | ||
highStress = 1, | highStress = 1, | ||
| Line 26: | Line 38: | ||
}, | }, | ||
KR37 = { | KR37 = { | ||
name = 'Runasimi KR37 TNTRL', | |||
make = 'Rusatom-Antonoff / Runasimi', | make = 'Rusatom-Antonoff / Runasimi', | ||
baseModel = 'K37', | baseModel = 'K37', | ||
highStress = 1, | highStress = 1, | ||
| Line 40: | Line 52: | ||
}, | }, | ||
KTA24 = { | KTA24 = { | ||
name = 'KTA24 TNTRL', | |||
make = 'Rusatom-Antonoff', | |||
baseModel = 'K37', | baseModel = 'K37', | ||
highStress = 1, | highStress = 1, | ||
| Line 61: | Line 73: | ||
['Eagle Prospector'] = { | ['Eagle Prospector'] = { | ||
make = 'Mitsudaya-Starbus', | make = 'Mitsudaya-Starbus', | ||
lowStress = 2, | lowStress = 2, | ||
droneHardpoints = 2, | droneHardpoints = 2, | ||
| Line 73: | Line 84: | ||
['Vulture Prospector'] = { | ['Vulture Prospector'] = { | ||
make = 'Mitsudaya-Starbus', | make = 'Mitsudaya-Starbus', | ||
baseModel = 'Eagle Prospector', | baseModel = 'Eagle Prospector', | ||
highStress = 1, | highStress = 1, | ||
| Line 89: | Line 99: | ||
-- Normalize ship | -- Normalize ship | ||
ship.key = key | ship.key = key | ||
ship.baseModel = ship.baseModel or key | |||
ship | ship.name = ship.name or key | ||
-- Set defaults | |||
for field,default in pairs(defaults) do | |||
ship[field] = ship[field] or default | |||
end | end | ||
-- Useful things to sort by | -- Useful things to sort by | ||
ship.isVariant = ship.key ~= ship.baseModel | ship.isVariant = ship.key ~= ship.baseModel | ||
ship. | ship.baseModelData = ships[ship.baseModel] | ||
end | end | ||
return ships | return ships | ||
Revision as of 21:18, 7 March 2023
Documentation for this module may be created at Module:Ships/Data/doc
local defaults = {
highStress = 0,
lowStress = 0,
droneHardpoints = 0,
dockingBays = 0,
processedCargo = 0,
processedCargoCombined = 0,
empShielding = 0,
engines = 1,
thrusters = 8,
}
local ships = {
K37 = {
name = 'K37 TNTRL',
make = 'Rusatom-Antonoff',
highStress = 1,
lowStress = 2,
crew = 4,
dryMass = 33200,
cargoBay = 128,
processedCargo = 7000,
engines = 1,
priceNew = 365999,
},
KX37 = {
name = 'KX37 TNTRL',
make = 'Rusatom-Antonoff',
baseModel = 'K37',
highStress = 1,
lowStress = 2,
crew = 4,
dryMass = 37970,
cargoBay = 140,
processedCargo = 7000,
engines = 1,
variant = 'Extended cargo hold'
},
KR37 = {
name = 'Runasimi KR37 TNTRL',
make = 'Rusatom-Antonoff / Runasimi',
baseModel = 'K37',
highStress = 1,
lowStress = 2,
crew = 6,
dryMass = 47500,
cargoBay = 100,
processedCargo = 4000,
empShielding = 200,
engines = 1,
variant = 'EMP Shielded',
},
KTA24 = {
name = 'KTA24 TNTRL',
make = 'Rusatom-Antonoff',
baseModel = 'K37',
highStress = 1,
lowStress = 2,
crew = 4,
dryMass = 27970,
processedCargo = 3000,
engines = 1,
variant = 'Tug with angled reverse thrust'
},
K44 = {
highStress = 0,
lowStress = 4,
crew = 4,
dryMass = 54600,
processedCargo = 14000,
engines = 1,
},
['Eagle Prospector'] = {
make = 'Mitsudaya-Starbus',
lowStress = 2,
droneHardpoints = 2,
crew = 6,
dryMass = 27500,
cargoBay = 125,
processedCargo = 14000,
engines = 2,
priceNew = 2539999,
},
['Vulture Prospector'] = {
make = 'Mitsudaya-Starbus',
baseModel = 'Eagle Prospector',
highStress = 1,
lowStress = 2,
crew = 6,
dryMass = 37500,
processedCargo = 14000,
engines = 2,
variant = "Dronebay underpods replaced with high stress capability"
}
}
for key,ship in pairs(ships) do
-- Normalize ship
ship.key = key
ship.baseModel = ship.baseModel or key
ship.name = ship.name or key
-- Set defaults
for field,default in pairs(defaults) do
ship[field] = ship[field] or default
end
-- Useful things to sort by
ship.isVariant = ship.key ~= ship.baseModel
ship.baseModelData = ships[ship.baseModel]
end
return ships