use std::fmt::{Display, Formatter};
use std::str::FromStr;
use lazy_static::lazy_static;
use regex::Regex;
use serde::Serialize;
use thiserror::Error;
use crate::from_str_deserialize_impl;
#[derive(Debug, Serialize, Clone, PartialEq)]
#[cfg_attr(not(feature = "allow-unknown"), non_exhaustive)]
pub enum Commodity {
AgronomicTreatment,
Explosives,
HydrogenFuel,
HydrogenPeroxide,
LiquidOxygen,
MineralOil,
NerveAgents,
Pesticides,
RockforthFertiliser,
SurfaceStabilisers,
SyntheticReagents,
Tritium,
Water,
Clothing,
ConsumerTechnology,
DomesticAppliances,
EvacuationShelter,
SurvivalEquipment,
Beer,
BootlegLiquor,
Liquor,
Narcotics,
OnionheadGammaStrain,
Tobacco,
Wine,
Algae,
AnimalMeat,
Coffee,
Fish,
FoodCartridges,
FruitAndVegetables,
Grain,
SyntheticMeat,
Tea,
CeramicComposites,
CMMComposite,
InsulatingMembrane,
MetaAlloys,
MicroWeaveCoolingHoses,
NeofabricInsulation,
Polymers,
Semiconductors,
Superconductors,
ArticulationMotors,
AtmosphericProcessors,
BuildingFabricators,
CropHarvesters,
EmergencyPowerCells,
EnergyGridAssembly,
ExhaustManifold,
GeologicalEquipment,
HeatsinkInterlink,
HNShockMount,
IonDistributor,
MagneticEmitterCoil,
MarineEquipment,
MicrobialFurnaces,
MineralExtractors,
ModularTerminals,
PowerConverter,
PowerGenerators,
PowerTransferBus,
RadiationBaffle,
ReinforcedMountingPlate,
SkimerComponents,
ThermalCoolingUnits,
WaterPurifiers,
AdvancedMedicines,
AgriMedicines,
BasicMedicines,
CombatStabilisers,
PerformanceEnhancers,
ProgenitorCells,
Aluminium,
Beryllium,
Bismuth,
Cobalt,
Copper,
Gallium,
Gold,
Hafnium178,
Indium,
Lanthanum,
Lithium,
Osmium,
Palladium,
Platinum,
Praseodymium,
Samarium,
Silver,
Tantalum,
Thallium,
Thorium,
Titanium,
Uranium,
Alexandrite,
Bauxite,
Benitoite,
Bertrandite,
Bromellite,
Coltan,
Cryolite,
Gallite,
Goslarite,
Grandidierite,
Indite,
Jadeite,
Lepidolite,
LithiumHydroxide,
LowTemperatureDiamonds,
MethaneClathrate,
MethanolMonohydrateCrystals,
Moissanite,
Monazite,
Musgravite,
Painite,
Pyrophyllite,
Rhodplumsite,
Rutile,
Serendibite,
Taaffeite,
Uraninite,
VoidOpal,
AIRelics,
AncientArtefact,
AncientKey,
AnomalyParticles,
AntimatterContainmentUnit,
AntiqueJewellery,
Antiquities,
AssaultPlans,
BlackBox,
BoneFragments,
CausticTissueSample,
CommercialSamples,
CoralSap,
CystSpecimen,
DamagedEscapePod,
DataCore,
DiplomaticBag,
EarthRelics,
EncryptedCorrespondence,
EncryptedDataStorage,
ExperimentalChemicals,
FossilRemnants,
GeneBank,
GeologicalSamples,
GuardianCasket,
GuardianOrb,
GuardianRelic,
GuardianTablet,
GuardianTotem,
GuardianUrn,
Hostages,
ImpureSpireMineral,
LargeSurveyDataCache,
MilitaryIntelligence,
MilitaryPlans,
MolluscBrainTissue,
MolluscFluid,
MolluscMembrane,
MolluscMycelium,
MolluscSoftTissue,
MolluscSpores,
MysteriousIdol,
OccupiedEscapePod,
OrganSample,
PersonalEffects,
PodCoreTissue,
PodDeadTissue,
PodMesoglea,
PodOuterTissue,
PodShellTissue,
PodSurfaceTissue,
PodTissue,
PoliticalPrisoners,
PreciousGems,
ProhibitedResearchMaterials,
ProtectiveMembraneScrap,
PrototypeTech,
RareArtwork,
RebelTransmissions,
SAP8CoreContainer,
ScientificResearch,
ScientificSamples,
SemiRefinesSpireMineral,
SmallSurveyDataCache,
SpacePioneerRelics,
TacticalData,
TechnicalBlueprints,
ThargoidBasiliskTissueSample,
ThargoidBioStorageCapsule,
ThargoidBiologicalMatter,
ThargoidCyclopsTissueSample,
ThargoidGlaiveTissueSample,
ThargoidHeart,
ThargoidHydraTissueSample,
ThargoidLink,
ThargoidMedusaTissueSample,
ThargoidOrthrusTissueSample,
ThargoidProbe,
ThargoidResin,
ThargoidScoutTissueSample,
ThargoidScytheTissueSample,
ThargoidGeneratorTissueSample,
ThargoidSensor,
ThargoidTechnologySamples,
TimeCapsule,
TitanDeepTissueSample,
TitanDriveComponent,
TitanMawDeepTissueSample,
TitanMawPartialTissueSample,
TitanMawTissueSample,
TitanPartialTissueSample,
TitanTissueSample,
TradeData,
TrinketsOfHiddenFortune,
UnclassifiedRelic,
UnoccupiedEscapePod,
UnstableDataCore,
WreckageComponents,
ImperialSlaves,
Slaves,
AdvancedCatalysers,
AnimalMonitors,
AquaponicSystems,
AutoFabricators,
BioreducingLichen,
ComputerComponents,
HESuits,
HardwareDiagnosticSensor,
LandEnrichmentSystems,
MedicalDiagnosticEquipment,
MicroControllers,
MuonImager,
Nanobreakers,
ResonatingSeparators,
Robotics,
StructuralRegulators,
TelemetrySuite,
ConductiveFabrics,
Leather,
MilitaryGradeFabrics,
NaturalFabrics,
SyntheticFabrics,
Biowaste,
ChemicalWaste,
Scrap,
ToxicWaste,
BattleWeapons,
Landmines,
NonLethalWeapons,
PersonalWeapons,
ReactiveArmour,
JaquesQuinentianStill,
KinagoViolins,
ApaVietii,
GeawenDanceDust,
VanayequiCeratomorphaFur,
KaretiiCouture,
MukusubiiChitinos,
UltraCompactProcessorPrototypes,
EleuThermals,
KamorinHistoricWeapons,
CeremonialHeikeTea,
VidavantianLace,
KachiriginFilterLeeches,
LyraeWeed,
GalacticTravelGuide,
HarmaSilverSeaRum,
NgadandariFireOpals,
AlyaBodySoap,
HelvetitjPearls,
OchoengChillies,
OnionheadBetaStrain,
KamitraCigars,
NjangariSaddles,
HipOrganophosphates,
GilyaSignatureWeapons,
HR7221Wheat,
WheemeteWheatCakes,
RajukruMultiStoves,
Nanomedicines,
NonEuclidianExotanks,
NgunaModernAntiques,
XiheBiomorphicCompanions,
EsusekuCaviar,
OrrerianViciousBrew,
VHerculisBodyRub,
VoidExtractCoffee,
UszaianTreeGrub,
HaidenBlackBrew,
MotronaExperienceJelly,
JaradharrePuzzleBox,
PersonalGifts,
MulachiGiantFungus,
LTTHyperSweet,
MedbStarlube,
GiantVerrix,
HIP118311Swarm,
DisoMaCorn,
LavianBrandy,
AzureMilk,
LeestianEvilJuice,
CoquimSpongiformVictuals,
LeatheryEggs,
ShansCharisOrchid,
KonggaAle,
VegaSlimweed,
TiolceWaste2PasteUnits,
OphiuchExinoArtefacts,
AltairianSkin,
AganippeRush,
CD75KittenBrandCoffee,
HavasupaiDreamCatcher,
EraninPearlWhisky,
PavonisEarGrubs,
OnionheadAlphaStrain,
IndiBourbon,
BakedGreebles,
KarsukiLocusts,
MasterChefs,
YasoKondiLeaf,
BurnhamBileDistillate,
TheHuttonMug,
CentauriMegaGin,
UtgaroarMillennialEggs,
SoontillRelics,
ZeesszeAntGrubGlue,
TheWatersOfShintara,
BaltahsineVacuumKrill,
SanumaDecorativeMeat,
GiantIrukamaSnails,
AnduligaFireWorks,
CrystallineSpheres,
PantaaPrayerSticks,
ChiEridaniMarinePaste,
EthgrezeTeaBuds,
DeltaPhoenicisPalms,
TarachSpice,
WulpaHyperboreSystems,
LiveHecateSeaWorms,
KoroKungPellets,
BastSnakeGin,
TerraMaterBloodBores,
WuthieloKuFroth,
HonestyPills,
CromSilverFesh,
BorasetaniPathogenetics,
CetiRabbits,
AepyornisEgg,
UzumokuLowGWings,
CherbonesBloodCrystals,
ToxandjiVirocide,
Onionhead,
LucanOnionhead,
TanmarkTranquilTea,
ThrutisCream,
AlacarakmoSkinArt,
PlatinumAlloy,
MokojingBeastFeast,
EdenApplesOfAerial,
ChameleonCloth,
TauriChimes,
RusaniOldSmokey,
AZCancriFormula42,
GomanYauponCoffee,
GerasianGueuzeBeer,
JarouaRice,
AnyNaCoffee,
FujinTea,
HIP10175BushMeat,
MomusBogSpaniel,
WitchhaulKobeBeef,
SaxonWine,
AroucaConventualSweets,
AlbinoQuechuaMammothMeat,
Duradrives,
HolvaDuellingBlades,
RapaBaoSnakeSkins,
WolfFesh,
EshuUmbrellas,
NeritusBerries,
JotunMookah,
ChateauDeAegaeon,
BelalansRayLeather,
DamnaCarapaces,
HIPProtoSquid,
MechucosHighTea,
DeuringasTruffles,
BankiAmphibiousLeather,
SothisCrystallineGold,
TiegfriesSynthSilk,
VolkhabBeeDrones,
BuckyballBeerMats,
ClassifiedExperimentalEquipment,
LavignyGarrisonSupplies,
LavignyFieldSupplies,
LavignyCorruptionDossiers,
SiriusIndustrialEquipment,
SiriusCommercialContracts,
SiriusFranchisePackage,
AislingMediaMaterials,
AislingPromotionalMaterials,
AislingMediaResources,
TorvalCommercialContracts,
TorvalDeeds,
PatreusFieldSupplies,
RepublicanFieldSupplies,
RepublicanGarisonSupplies,
LiberalCampaignMaterials,
AllianceLegaslativeContracts,
AllianceLegaslativeRecords,
FederalTradeContracts,
PatreusGarrisonSupplies,
Limpet,
#[cfg(feature = "allow-unknown")]
#[cfg_attr(docsrs, doc(cfg(feature = "allow-unknown")))]
Unknown(String),
}
#[derive(Debug, Error)]
pub enum CommodityError {
#[error("Unknown commodity: '{0}'")]
UnknownCommodity(String),
}
impl Commodity {
fn name_to_commodity(name: &str) -> Result<Commodity, CommodityError> {
let lower_case: &str = &name.to_ascii_lowercase();
Ok(match lower_case {
"agronomictreatment" => Commodity::AgronomicTreatment,
"explosives" => Commodity::Explosives,
"hydrogenfuel" => Commodity::HydrogenFuel,
"hydrogenperoxide" => Commodity::HydrogenPeroxide,
"liquidoxygen" => Commodity::LiquidOxygen,
"mineraloil" => Commodity::MineralOil,
"nerveagents" => Commodity::NerveAgents,
"pesticides" => Commodity::Pesticides,
"rockforthfertiliser" => Commodity::RockforthFertiliser,
"surfacestabilisers" => Commodity::SurfaceStabilisers,
"syntheticreagents" => Commodity::SyntheticReagents,
"tritium" => Commodity::Tritium,
"water" => Commodity::Water,
"clothing" => Commodity::Clothing,
"consumertechnology" => Commodity::ConsumerTechnology,
"domesticappliances" => Commodity::DomesticAppliances,
"evacuationshelter" => Commodity::EvacuationShelter,
"survivalequipment" => Commodity::SurvivalEquipment,
"beer" => Commodity::Beer,
"bootlegliquor" => Commodity::BootlegLiquor,
"liquor" => Commodity::Liquor,
"basicnarcotics" => Commodity::Narcotics,
"onionheadc" => Commodity::OnionheadGammaStrain,
"tobacco" => Commodity::Tobacco,
"wine" => Commodity::Wine,
"algae" => Commodity::Algae,
"animalmeat" => Commodity::AnimalMeat,
"coffee" => Commodity::Coffee,
"fish" => Commodity::Fish,
"foodcartridges" => Commodity::FoodCartridges,
"fruitandvegetables" => Commodity::FruitAndVegetables,
"grain" => Commodity::Grain,
"syntheticmeat" => Commodity::SyntheticMeat,
"tea" => Commodity::Tea,
"ceramiccomposites" => Commodity::CeramicComposites,
"cmmcomposite" => Commodity::CMMComposite,
"insulatingmembrane" => Commodity::InsulatingMembrane,
"metaalloys" => Commodity::MetaAlloys,
"coolinghoses" => Commodity::MicroWeaveCoolingHoses,
"neofabricinsulation" => Commodity::NeofabricInsulation,
"polymers" => Commodity::Polymers,
"semiconductors" => Commodity::Semiconductors,
"superconductors" => Commodity::Superconductors,
"articulationmotors" => Commodity::ArticulationMotors,
"atmosphericextractors" => Commodity::AtmosphericProcessors,
"buildingfabricators" => Commodity::BuildingFabricators,
"cropharvesters" => Commodity::CropHarvesters,
"emergencypowercells" => Commodity::EmergencyPowerCells,
"powergridassembly" => Commodity::EnergyGridAssembly,
"exhaustmanifold" => Commodity::ExhaustManifold,
"geologicalequipment" => Commodity::GeologicalEquipment,
"heatsinkinterlink" => Commodity::HeatsinkInterlink,
"hnshockmount" => Commodity::HNShockMount,
"iondistributor" => Commodity::IonDistributor,
"magneticemittercoil" => Commodity::MagneticEmitterCoil,
"marinesupplies" => Commodity::MarineEquipment,
"heliostaticfurnaces" => Commodity::MicrobialFurnaces,
"mineralextractors" => Commodity::MineralExtractors,
"modularterminals" => Commodity::ModularTerminals,
"powerconverter" => Commodity::PowerConverter,
"powergenerators" => Commodity::PowerGenerators,
"powertransferconduits" => Commodity::PowerTransferBus,
"radiationbaffle" => Commodity::RadiationBaffle,
"reinforcedmountingplate" => Commodity::ReinforcedMountingPlate,
"skimercomponents" => Commodity::SkimerComponents,
"thermalcoolingunits" => Commodity::ThermalCoolingUnits,
"waterpurifiers" => Commodity::WaterPurifiers,
"advancedmedicines" => Commodity::AdvancedMedicines,
"agriculturalmedicines" => Commodity::AgriMedicines,
"basicmedicines" => Commodity::BasicMedicines,
"combatstabilisers" => Commodity::CombatStabilisers,
"performanceenhancers" => Commodity::PerformanceEnhancers,
"progenitorcells" => Commodity::ProgenitorCells,
"aluminium" => Commodity::Aluminium,
"beryllium" => Commodity::Beryllium,
"bismuth" => Commodity::Bismuth,
"cobalt" => Commodity::Cobalt,
"copper" => Commodity::Copper,
"gallium" => Commodity::Gallium,
"gold" => Commodity::Gold,
"hafnium178" => Commodity::Hafnium178,
"indium" => Commodity::Indium,
"lanthanum" => Commodity::Lanthanum,
"lithium" => Commodity::Lithium,
"osmium" => Commodity::Osmium,
"palladium" => Commodity::Palladium,
"platinum" => Commodity::Platinum,
"praseodymium" => Commodity::Praseodymium,
"samarium" => Commodity::Samarium,
"silver" => Commodity::Silver,
"tantalum" => Commodity::Tantalum,
"thallium" => Commodity::Thallium,
"thorium" => Commodity::Thorium,
"titanium" => Commodity::Titanium,
"uranium" => Commodity::Uranium,
"alexandrite" => Commodity::Alexandrite,
"bauxite" => Commodity::Bauxite,
"benitoite" => Commodity::Benitoite,
"bertrandite" => Commodity::Bertrandite,
"bromellite" => Commodity::Bromellite,
"coltan" => Commodity::Coltan,
"cryolite" => Commodity::Cryolite,
"gallite" => Commodity::Gallite,
"goslarite" => Commodity::Goslarite,
"grandidierite" => Commodity::Grandidierite,
"indite" => Commodity::Indite,
"jadeite" => Commodity::Jadeite,
"lepidolite" => Commodity::Lepidolite,
"lithiumhydroxide" => Commodity::LithiumHydroxide,
"lowtemperaturediamond" => Commodity::LowTemperatureDiamonds,
"methaneclathrate" => Commodity::MethaneClathrate,
"methanolmonohydratecrystals" => Commodity::MethanolMonohydrateCrystals,
"moissanite" => Commodity::Moissanite,
"monazite" => Commodity::Monazite,
"musgravite" => Commodity::Musgravite,
"painite" => Commodity::Painite,
"pyrophyllite" => Commodity::Pyrophyllite,
"rhodplumsite" => Commodity::Rhodplumsite,
"rutile" => Commodity::Rutile,
"serendibite" => Commodity::Serendibite,
"taaffeite" => Commodity::Taaffeite,
"uraninite" => Commodity::Uraninite,
"opal" => Commodity::VoidOpal,
"airelics" => Commodity::AIRelics,
"ancientartefact" => Commodity::AncientArtefact,
"ancientkey" => Commodity::AncientKey,
"p_particulatesample" => Commodity::AnomalyParticles,
"antimattercontainmentunit" => Commodity::AntimatterContainmentUnit,
"antiquejewellery" => Commodity::AntiqueJewellery,
"antiquities" => Commodity::Antiquities,
"assaultplans" => Commodity::AssaultPlans,
"blackbox" => Commodity::BlackBox,
"thargoidbonefragments" => Commodity::BoneFragments,
"caustictissuesample" => Commodity::CausticTissueSample,
"comercialsamples" => Commodity::CommercialSamples,
"coralsap" => Commodity::CoralSap,
"thargoidcystspecimen" => Commodity::CystSpecimen,
"damagedescapepod" => Commodity::DamagedEscapePod,
"datacore" => Commodity::DataCore,
"diplomaticbag" => Commodity::DiplomaticBag,
"earthrelics" => Commodity::EarthRelics,
"encryptedcorrespondence" => Commodity::EncryptedCorrespondence,
"encripteddatastorage" => Commodity::EncryptedDataStorage,
"experimentalchemicals" => Commodity::ExperimentalChemicals,
"fossilremnants" => Commodity::FossilRemnants,
"genebank" => Commodity::GeneBank,
"geologicalsamples" => Commodity::GeologicalSamples,
"ancientcasket" => Commodity::GuardianCasket,
"ancientorb" => Commodity::GuardianOrb,
"ancientrelic" => Commodity::GuardianRelic,
"ancienttablet" => Commodity::GuardianTablet,
"ancienttotem" => Commodity::GuardianTotem,
"ancienturn" => Commodity::GuardianUrn,
"hostage" => Commodity::Hostages,
"unknownmineral" => Commodity::ImpureSpireMineral,
"largeexplorationdatacash" => Commodity::LargeSurveyDataCache,
"militaryintelligence" => Commodity::MilitaryIntelligence,
"militaryplans" => Commodity::MilitaryPlans,
"m_tissuesample_nerves" => Commodity::MolluscBrainTissue,
"m_tissuesample_fluid" => Commodity::MolluscFluid,
"m3_tissuesample_membrane" => Commodity::MolluscMembrane,
"m3_tissuesample_mycelium" => Commodity::MolluscMycelium,
"m_tissuesample_soft" => Commodity::MolluscSoftTissue,
"m3_tissuesample_spores" => Commodity::MolluscSpores,
"mysteriousidol" => Commodity::MysteriousIdol,
"occupiedcryopod" => Commodity::OccupiedEscapePod,
"thargoidorgansample" => Commodity::OrganSample,
"personaleffects" => Commodity::PersonalEffects,
"s_tissuesample_cells" => Commodity::PodCoreTissue,
"s_tissuesample_surface" => Commodity::PodDeadTissue,
"s6_tissuesample_mesoglea" => Commodity::PodMesoglea,
"s6_tissuesample_cells" => Commodity::PodOuterTissue,
"s6_tissuesample_coenosarc" => Commodity::PodShellTissue,
"s_tissuesample_core" => Commodity::PodSurfaceTissue,
"s9_tissuesample_shell" => Commodity::PodTissue,
"politicalprisoner" => Commodity::PoliticalPrisoners,
"preciousgems" => Commodity::PreciousGems,
"prohibitedresearchmaterials" => Commodity::ProhibitedResearchMaterials,
"unknownsack" => Commodity::ProtectiveMembraneScrap,
"prototypetech" => Commodity::PrototypeTech,
"rareartwork" => Commodity::RareArtwork,
"rebeltransmissions" => Commodity::RebelTransmissions,
"sap8corecontainer" => Commodity::SAP8CoreContainer,
"scientificresearch" => Commodity::ScientificResearch,
"scientificsamples" => Commodity::ScientificSamples,
"unknownrefinedmineral" => Commodity::SemiRefinesSpireMineral,
"smallexplorationdatacash" => Commodity::SmallSurveyDataCache,
"spacepioneerrelics" => Commodity::SpacePioneerRelics,
"tacticaldata" => Commodity::TacticalData,
"technicalblueprints" => Commodity::TechnicalBlueprints,
"thargoidtissuesampletype2" => Commodity::ThargoidBasiliskTissueSample,
"thargoidpod" => Commodity::ThargoidBioStorageCapsule,
"unknownbiologicalmatter" => Commodity::ThargoidBiologicalMatter,
"thargoidtissuesampletype1" => Commodity::ThargoidCyclopsTissueSample,
"thargoidtissuesampletype6" => Commodity::ThargoidGlaiveTissueSample,
"thargoidheart" => Commodity::ThargoidHeart,
"thargoidtissuesampletype4" => Commodity::ThargoidHydraTissueSample,
"unknownartifact3" => Commodity::ThargoidLink,
"thargoidtissuesampletype3" => Commodity::ThargoidMedusaTissueSample,
"thargoidtissuesampletype5" => Commodity::ThargoidOrthrusTissueSample,
"unknownartifact2" => Commodity::ThargoidProbe,
"unknownresin" => Commodity::ThargoidResin,
"thargoidscouttissuesample" => Commodity::ThargoidScoutTissueSample,
"thargoidtissuesampletype7" => Commodity::ThargoidScytheTissueSample,
"thargoidgeneratortissuesample" => Commodity::ThargoidGeneratorTissueSample,
"unknownartifact" => Commodity::ThargoidSensor,
"unknowntechnologysamples" => Commodity::ThargoidTechnologySamples,
"timecapsule" => Commodity::TimeCapsule,
"thargoidtitandrivecomponent" => Commodity::TitanDriveComponent,
"thargoidtissuesampletype9a" => Commodity::TitanDeepTissueSample,
"thargoidtissuesampletype9b" => Commodity::TitanTissueSample,
"thargoidtissuesampletype9c" => Commodity::TitanPartialTissueSample,
"thargoidtissuesampletype10a" => Commodity::TitanMawDeepTissueSample,
"thargoidtissuesampletype10b" => Commodity::TitanMawTissueSample,
"thargoidtissuesampletype10c" => Commodity::TitanMawPartialTissueSample,
"tradedata" => Commodity::TradeData,
"trinketsoffortune" => Commodity::TrinketsOfHiddenFortune,
"ancientrelictg" => Commodity::UnclassifiedRelic,
"unocuppiedescapepod" => Commodity::UnoccupiedEscapePod,
"unstabledatacore" => Commodity::UnstableDataCore,
"wreckagecomponents" => Commodity::WreckageComponents,
"imperialslaves" => Commodity::ImperialSlaves,
"slaves" => Commodity::Slaves,
"advancedcatalysers" => Commodity::AdvancedCatalysers,
"animalmonitors" => Commodity::AnimalMonitors,
"aquaponicsystems" => Commodity::AquaponicSystems,
"autofabricators" => Commodity::AutoFabricators,
"bioreducinglichen" => Commodity::BioreducingLichen,
"computercomponents" => Commodity::ComputerComponents,
"hazardousenvironmentsuits" => Commodity::HESuits,
"diagnosticsensor" => Commodity::HardwareDiagnosticSensor,
"terrainenrichmentsystems" => Commodity::LandEnrichmentSystems,
"medicaldiagnosticequipment" => Commodity::MedicalDiagnosticEquipment,
"microcontrollers" => Commodity::MicroControllers,
"mutomimager" => Commodity::MuonImager,
"nanobreakers" => Commodity::Nanobreakers,
"resonatingseparators" => Commodity::ResonatingSeparators,
"robotics" => Commodity::Robotics,
"structuralregulators" => Commodity::StructuralRegulators,
"telemetrysuite" => Commodity::TelemetrySuite,
"conductivefabrics" => Commodity::ConductiveFabrics,
"leather" => Commodity::Leather,
"militarygradefabrics" => Commodity::MilitaryGradeFabrics,
"naturalfabrics" => Commodity::NaturalFabrics,
"syntheticfabrics" => Commodity::SyntheticFabrics,
"biowaste" => Commodity::Biowaste,
"chemicalwaste" => Commodity::ChemicalWaste,
"scrap" => Commodity::Scrap,
"toxicwaste" => Commodity::ToxicWaste,
"battleweapons" => Commodity::BattleWeapons,
"landmines" => Commodity::Landmines,
"nonlethalweapons" => Commodity::NonLethalWeapons,
"personalweapons" => Commodity::PersonalWeapons,
"reactivearmour" => Commodity::ReactiveArmour,
"jaquesquinentianstill" => Commodity::JaquesQuinentianStill,
"kinagoinstruments" => Commodity::KinagoViolins,
"apavietii" => Commodity::ApaVietii,
"geawendancedust" => Commodity::GeawenDanceDust,
"vanayequirhinofur" => Commodity::VanayequiCeratomorphaFur,
"karetiicouture" => Commodity::KaretiiCouture,
"mukusubiichitinos" => Commodity::MukusubiiChitinos,
"advert1" => Commodity::UltraCompactProcessorPrototypes,
"eleuthermals" => Commodity::EleuThermals,
"kamorinhistoricweapons" => Commodity::KamorinHistoricWeapons,
"ceremonialheiketea" => Commodity::CeremonialHeikeTea,
"vidavantianlace" => Commodity::VidavantianLace,
"kachiriginleaches" => Commodity::KachiriginFilterLeeches,
"lyraeweed" => Commodity::LyraeWeed,
"galactictravelguide" => Commodity::GalacticTravelGuide,
"harmasilversearum" => Commodity::HarmaSilverSeaRum,
"ngadandarifireopals" => Commodity::NgadandariFireOpals,
"alyabodilysoap" => Commodity::AlyaBodySoap,
"helvetitjpearls" => Commodity::HelvetitjPearls,
"ochoengchillies" => Commodity::OchoengChillies,
"onionheadb" => Commodity::OnionheadBetaStrain,
"kamitracigars" => Commodity::KamitraCigars,
"njangarisaddles" => Commodity::NjangariSaddles,
"hiporganophosphates" => Commodity::HipOrganophosphates,
"gilyasignatureweapons" => Commodity::GilyaSignatureWeapons,
"hr7221wheat" => Commodity::HR7221Wheat,
"wheemetewheatcakes" => Commodity::WheemeteWheatCakes,
"rajukrustoves" => Commodity::RajukruMultiStoves,
"nanomedicines" => Commodity::Nanomedicines,
"noneuclidianexotanks" => Commodity::NonEuclidianExotanks,
"ngunamodernantiques" => Commodity::NgunaModernAntiques,
"xihecompanions" => Commodity::XiheBiomorphicCompanions,
"esusekucaviar" => Commodity::EsusekuCaviar,
"orrerianviciousbrew" => Commodity::OrrerianViciousBrew,
"vherculisbodyrub" => Commodity::VHerculisBodyRub,
"lftvoidextractcoffee" => Commodity::VoidExtractCoffee,
"uszaiantreegrub" => Commodity::UszaianTreeGrub,
"haidneblackbrew" => Commodity::HaidenBlackBrew,
"motronaexperiencejelly" => Commodity::MotronaExperienceJelly,
"jaradharrepuzzlebox" => Commodity::JaradharrePuzzleBox,
"personalgifts" => Commodity::PersonalGifts,
"mulachigiantfungus" => Commodity::MulachiGiantFungus,
"ltthypersweet" => Commodity::LTTHyperSweet,
"medbstarlube" => Commodity::MedbStarlube,
"giantverrix" => Commodity::GiantVerrix,
"hip118311swarm" => Commodity::HIP118311Swarm,
"disomacorn" => Commodity::DisoMaCorn,
"lavianbrandy" => Commodity::LavianBrandy,
"bluemilk" => Commodity::AzureMilk,
"leestianeviljuice" => Commodity::LeestianEvilJuice,
"coquimspongiformvictuals" => Commodity::CoquimSpongiformVictuals,
"alieneggs" => Commodity::LeatheryEggs,
"shanscharisorchid" => Commodity::ShansCharisOrchid,
"konggaale" => Commodity::KonggaAle,
"vegaslimweed" => Commodity::VegaSlimweed,
"tiolcewaste2pasteunits" => Commodity::TiolceWaste2PasteUnits,
"ophiuchiexinoartefacts" => Commodity::OphiuchExinoArtefacts,
"altairianskin" => Commodity::AltairianSkin,
"aganipperush" => Commodity::AganippeRush,
"cd75catcoffee" => Commodity::CD75KittenBrandCoffee,
"havasupaidreamcatcher" => Commodity::HavasupaiDreamCatcher,
"eraninpearlwhisky" => Commodity::EraninPearlWhisky,
"pavoniseargrubs" => Commodity::PavonisEarGrubs,
"onionheada" => Commodity::OnionheadAlphaStrain,
"indibourbon" => Commodity::IndiBourbon,
"bakedgreebles" => Commodity::BakedGreebles,
"karsukilocusts" => Commodity::KarsukiLocusts,
"masterchefs" => Commodity::MasterChefs,
"yasokondileaf" => Commodity::YasoKondiLeaf,
"burnhambiledistillate" => Commodity::BurnhamBileDistillate,
"thehuttonmug" => Commodity::TheHuttonMug,
"centaurimegagin" => Commodity::CentauriMegaGin,
"utgaroarmillenialeggs" => Commodity::UtgaroarMillennialEggs,
"soontillrelics" => Commodity::SoontillRelics,
"zeesszeantglue" => Commodity::ZeesszeAntGrubGlue,
"watersofshintara" => Commodity::TheWatersOfShintara,
"baltahsinevacuumkrill" => Commodity::BaltahsineVacuumKrill,
"sanumameat" => Commodity::SanumaDecorativeMeat,
"giantirukamasnails" => Commodity::GiantIrukamaSnails,
"anduligafireworks" => Commodity::AnduligaFireWorks,
"crystallinespheres" => Commodity::CrystallineSpheres,
"pantaaprayersticks" => Commodity::PantaaPrayerSticks,
"chieridanimarinepaste" => Commodity::ChiEridaniMarinePaste,
"ethgrezeteabuds" => Commodity::EthgrezeTeaBuds,
"deltaphoenicispalms" => Commodity::DeltaPhoenicisPalms,
"tarachtorspice" => Commodity::TarachSpice,
"wulpahyperboresystems" => Commodity::WulpaHyperboreSystems,
"livehecateseaworms" => Commodity::LiveHecateSeaWorms,
"korrokungpellets" => Commodity::KoroKungPellets,
"bastsnakegin" => Commodity::BastSnakeGin,
"terramaterbloodbores" => Commodity::TerraMaterBloodBores,
"wuthielokufroth" => Commodity::WuthieloKuFroth,
"honestypills" => Commodity::HonestyPills,
"animaleffigies" => Commodity::CromSilverFesh,
"borasetanipathogenetics" => Commodity::BorasetaniPathogenetics,
"cetirabbits" => Commodity::CetiRabbits,
"cetiaepyornisegg" => Commodity::AepyornisEgg,
"uzumokulowgwings" => Commodity::UzumokuLowGWings,
"cherbonesbloodcrystals" => Commodity::CherbonesBloodCrystals,
"toxandjivirocide" => Commodity::ToxandjiVirocide,
"onionhead" => Commodity::Onionhead,
"transgeniconionhead" => Commodity::LucanOnionhead,
"tanmarktranquiltea" => Commodity::TanmarkTranquilTea,
"thrutiscream" => Commodity::ThrutisCream,
"alacarakmoskinart" => Commodity::AlacarakmoSkinArt,
"platinumaloy" => Commodity::PlatinumAlloy,
"mokojingbeastfeast" => Commodity::MokojingBeastFeast,
"aerialedenapple" => Commodity::EdenApplesOfAerial,
"chameleoncloth" => Commodity::ChameleonCloth,
"taurichimes" => Commodity::TauriChimes,
"rusanioldsmokey" => Commodity::RusaniOldSmokey,
"azcancriformula42" => Commodity::AZCancriFormula42,
"gomanyauponcoffee" => Commodity::GomanYauponCoffee,
"gerasiangueuzebeer" => Commodity::GerasianGueuzeBeer,
"jarouarice" => Commodity::JarouaRice,
"anynacoffee" => Commodity::AnyNaCoffee,
"fujintea" => Commodity::FujinTea,
"hip10175bushmeat" => Commodity::HIP10175BushMeat,
"momusbogspaniel" => Commodity::MomusBogSpaniel,
"witchhaulkobebeef" => Commodity::WitchhaulKobeBeef,
"saxonwine" => Commodity::SaxonWine,
"aroucaconventualsweets" => Commodity::AroucaConventualSweets,
"albinoquechuamammoth" => Commodity::AlbinoQuechuaMammothMeat,
"duradrives" => Commodity::Duradrives,
"holvaduellingblades" => Commodity::HolvaDuellingBlades,
"rapabaosnakeskins" => Commodity::RapaBaoSnakeSkins,
"wolf1301fesh" => Commodity::WolfFesh,
"eshuumbrellas" => Commodity::EshuUmbrellas,
"neritusberries" => Commodity::NeritusBerries,
"jotunmookah" => Commodity::JotunMookah,
"chateaudeaegaeon" => Commodity::ChateauDeAegaeon,
"belalansrayleather" => Commodity::BelalansRayLeather,
"damnacarapaces" => Commodity::DamnaCarapaces,
"hip41181squid" => Commodity::HIPProtoSquid,
"mechucoshightea" => Commodity::MechucosHighTea,
"deuringastruffles" => Commodity::DeuringasTruffles,
"bankiamphibiousleather" => Commodity::BankiAmphibiousLeather,
"sothiscrystallinegold" => Commodity::SothisCrystallineGold,
"tiegfriessynthsilk" => Commodity::TiegfriesSynthSilk,
"volkhabbeedrones" => Commodity::VolkhabBeeDrones,
"buckyballbeermats" => Commodity::BuckyballBeerMats,
"classifiedexperimentalequipment" => Commodity::ClassifiedExperimentalEquipment,
"drones" => Commodity::Limpet,
"lavignygarisonsupplies" => Commodity::LavignyGarrisonSupplies,
"lavignyfieldsupplies" => Commodity::LavignyFieldSupplies,
"lavignycorruptiondossiers" => Commodity::LavignyCorruptionDossiers,
"siriusindustrialequipment" => Commodity::SiriusIndustrialEquipment,
"siriuscommercialcontracts" => Commodity::SiriusIndustrialEquipment,
"siriusfranchisepackage" => Commodity::SiriusFranchisePackage,
"aislingmediamaterials" => Commodity::AislingMediaMaterials,
"aislingpromotionalmaterials" => Commodity::AislingPromotionalMaterials,
"aislingmediaresources" => Commodity::AislingMediaResources,
"torvalcommercialcontracts" => Commodity::TorvalCommercialContracts,
"torvaldeeds" => Commodity::TorvalDeeds,
"patreusfieldsupplies" => Commodity::PatreusFieldSupplies,
"republicanfieldsupplies" => Commodity::RepublicanFieldSupplies,
"republicangarisonsupplies" => Commodity::RepublicanGarisonSupplies,
"liberalcampaignmaterials" => Commodity::LiberalCampaignMaterials,
"alliancelegaslativecontracts" => Commodity::AllianceLegaslativeContracts,
"alliancelegaslativerecords" => Commodity::AllianceLegaslativeRecords,
"federaltradecontracts" => Commodity::FederalTradeContracts,
"patreusgarisonsupplies" => Commodity::PatreusGarrisonSupplies,
#[cfg(feature = "allow-unknown")]
_ => Commodity::Unknown(name.to_string()),
#[cfg(not(feature = "allow-unknown"))]
_ => return Err(CommodityError::UnknownCommodity(name.to_string())),
})
}
}
lazy_static! {
static ref COMMODITY_NAME_REGEX: Regex =
Regex::new(r#"^\$?(USSCargo|usscargo)?([a-zA-Z_0-9]+?)(_[nN]ame;)?$"#).unwrap();
}
impl FromStr for Commodity {
type Err = CommodityError;
fn from_str(s: &str) -> Result<Self, Self::Err> {
let Some(captures) = COMMODITY_NAME_REGEX.captures(s) else {
return Err(CommodityError::UnknownCommodity(s.to_string()));
};
Commodity::name_to_commodity(
captures
.get(2)
.expect("Should have been captured already")
.as_str(),
)
}
}
from_str_deserialize_impl!(Commodity);
impl Display for Commodity {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(
f,
"{}",
match self {
Commodity::AgronomicTreatment => "Argonomic Treatment",
Commodity::Explosives => "Explosives",
Commodity::HydrogenFuel => "Hydrogen Fuel",
Commodity::HydrogenPeroxide => "Hydrogen Peroxide",
Commodity::LiquidOxygen => "Liquid Oxygen",
Commodity::MineralOil => "Mineral Oil",
Commodity::NerveAgents => "Nerve Agents",
Commodity::Pesticides => "Pesticides",
Commodity::RockforthFertiliser => "Rockforth Fertiliser",
Commodity::SurfaceStabilisers => "Surface Stabilisers",
Commodity::SyntheticReagents => "Synthetic Reagents",
Commodity::Tritium => "Tritium",
Commodity::Water => "Water",
Commodity::Clothing => "Clothing",
Commodity::ConsumerTechnology => "Consumer Technology",
Commodity::DomesticAppliances => "Domestic Appliances",
Commodity::EvacuationShelter => "Evacuation Shelter",
Commodity::SurvivalEquipment => "Survival Equipment",
Commodity::Beer => "Beer",
Commodity::BootlegLiquor => "Bootleg Liquor",
Commodity::Liquor => "Liquor",
Commodity::Narcotics => "Narcotics",
Commodity::OnionheadGammaStrain => "Onionhead Gamma Strain",
Commodity::Tobacco => "Tobacco",
Commodity::Wine => "Wine",
Commodity::Algae => "Algae",
Commodity::AnimalMeat => "Animal Meat",
Commodity::Coffee => "Coffee",
Commodity::Fish => "Fish",
Commodity::FoodCartridges => "Food Cartridges",
Commodity::FruitAndVegetables => "Fruit and Vegetables",
Commodity::Grain => "Grain",
Commodity::SyntheticMeat => "Synthetic Meat",
Commodity::Tea => "Tea",
Commodity::CeramicComposites => "Ceramic Composites",
Commodity::CMMComposite => "CMM Composite",
Commodity::InsulatingMembrane => "Insulating Membrane",
Commodity::MetaAlloys => "Meta-Alloys",
Commodity::MicroWeaveCoolingHoses => "Micro-Weave Cooling Hoses",
Commodity::NeofabricInsulation => "Neofabric Insulation",
Commodity::Polymers => "Polymers",
Commodity::Semiconductors => "Semiconductors",
Commodity::Superconductors => "Superconductors",
Commodity::ArticulationMotors => "Articulation Motors",
Commodity::AtmosphericProcessors => "Atmospheric Processors",
Commodity::BuildingFabricators => "Building Fabricators",
Commodity::CropHarvesters => "Crop Harvesters",
Commodity::EmergencyPowerCells => "Emergency Power Cells",
Commodity::EnergyGridAssembly => "Energy Grid Assembly",
Commodity::ExhaustManifold => "Exhaust Manifold",
Commodity::GeologicalEquipment => "Geological Equipment",
Commodity::HeatsinkInterlink => "Heatsink Interlink",
Commodity::HNShockMount => "HN Shock Mount",
Commodity::IonDistributor => "Ion Distributor",
Commodity::MagneticEmitterCoil => "Magnetic Emitter Coil",
Commodity::MarineEquipment => "Marine Equipment",
Commodity::MicrobialFurnaces => "Microbial Furnaces",
Commodity::MineralExtractors => "Mineral Extractors",
Commodity::ModularTerminals => "Modular Terminals",
Commodity::PowerConverter => "Power Converter",
Commodity::PowerGenerators => "Power Generators",
Commodity::PowerTransferBus => "Power Transfer Bus",
Commodity::RadiationBaffle => "Radiation Baffle",
Commodity::ReinforcedMountingPlate => "Reinforced Mounting Plate",
Commodity::SkimerComponents => "Skimer Components",
Commodity::ThermalCoolingUnits => "Thermal Cooling Units",
Commodity::WaterPurifiers => "Water Purifiers",
Commodity::AdvancedMedicines => "Advanced Medicines",
Commodity::AgriMedicines => "Agri-Medicines",
Commodity::BasicMedicines => "Basic Medicines",
Commodity::CombatStabilisers => "Combat Stabilisers",
Commodity::PerformanceEnhancers => "Performance Enhancers",
Commodity::ProgenitorCells => "Progenitor Cells",
Commodity::Aluminium => "Aluminium",
Commodity::Beryllium => "Beryllium",
Commodity::Bismuth => "Bismuth",
Commodity::Cobalt => "Cobalt",
Commodity::Copper => "Copper",
Commodity::Gallium => "Gallium",
Commodity::Gold => "Gold",
Commodity::Hafnium178 => "Hafnium 178",
Commodity::Indium => "Indium",
Commodity::Lanthanum => "Lanthanum",
Commodity::Lithium => "Lithium",
Commodity::Osmium => "Osmium",
Commodity::Palladium => "Palladium",
Commodity::Platinum => "Platinum",
Commodity::Praseodymium => "Praseodymium",
Commodity::Samarium => "Samarium",
Commodity::Silver => "Silver",
Commodity::Tantalum => "Tantalum",
Commodity::Thallium => "Thallium",
Commodity::Thorium => "Thorium",
Commodity::Titanium => "Titanium",
Commodity::Uranium => "Uranium",
Commodity::Alexandrite => "Alexandrite",
Commodity::Bauxite => "Bauxite",
Commodity::Benitoite => "Benitoite",
Commodity::Bertrandite => "Bertrandite",
Commodity::Bromellite => "Bromellite",
Commodity::Coltan => "Coltan",
Commodity::Cryolite => "Cryolite",
Commodity::Gallite => "Gallite",
Commodity::Goslarite => "Goslarite",
Commodity::Grandidierite => "Grandidierite",
Commodity::Indite => "Indite",
Commodity::Jadeite => "Jadeite",
Commodity::Lepidolite => "Lepidolite",
Commodity::LithiumHydroxide => "Lithium Hydroxide",
Commodity::LowTemperatureDiamonds => "Low Temperature Diamonds",
Commodity::MethaneClathrate => "Methane Clathrate",
Commodity::MethanolMonohydrateCrystals => "Methanol Monohydrate Crystals",
Commodity::Moissanite => "Moissanite",
Commodity::Monazite => "Monazite",
Commodity::Musgravite => "Musgravite",
Commodity::Painite => "Painite",
Commodity::Pyrophyllite => "Pyrophyllite",
Commodity::Rhodplumsite => "Rhodplumsite",
Commodity::Rutile => "Rutile",
Commodity::Serendibite => "Serendibite",
Commodity::Taaffeite => "Taaffeite",
Commodity::Uraninite => "Uraninite",
Commodity::VoidOpal => "VoidOpal",
Commodity::AIRelics => "AI Relics",
Commodity::AncientArtefact => "Ancient Artefact",
Commodity::AncientKey => "Ancient Key",
Commodity::AnomalyParticles => "Anomaly Particles",
Commodity::AntimatterContainmentUnit => "Antimatter Containment Unit",
Commodity::AntiqueJewellery => "Antique Jewellery",
Commodity::Antiquities => "Antiquities",
Commodity::AssaultPlans => "Assault Plans",
Commodity::BlackBox => "Black Box",
Commodity::BoneFragments => "Bone Fragments",
Commodity::CausticTissueSample => "Caustic Tissue Sample",
Commodity::CommercialSamples => "Commercial Samples",
Commodity::CoralSap => "Coral Sap",
Commodity::CystSpecimen => "Cyst Specimen",
Commodity::DamagedEscapePod => "Damaged Escape Pod",
Commodity::DataCore => "Data Core",
Commodity::DiplomaticBag => "Diplomatic Bag",
Commodity::EarthRelics => "Earth Relics",
Commodity::EncryptedCorrespondence => "Encrypted Correspondence",
Commodity::EncryptedDataStorage => "Encrypted Data Storage",
Commodity::ExperimentalChemicals => "Experimental Chemicals",
Commodity::FossilRemnants => "Fossil Remnants",
Commodity::GeneBank => "Gene Bank",
Commodity::GeologicalSamples => "Geological Samples",
Commodity::GuardianCasket => "Guardian Casket",
Commodity::GuardianOrb => "Guardian Orb",
Commodity::GuardianRelic => "Guardian Relic",
Commodity::GuardianTablet => "Guardian Tablet",
Commodity::GuardianTotem => "Guardian Totem",
Commodity::GuardianUrn => "Guardian Urn",
Commodity::Hostages => "Hostages",
Commodity::ImpureSpireMineral => "Impure Spire Mineral",
Commodity::LargeSurveyDataCache => "Large Survey Data Cache",
Commodity::MilitaryIntelligence => "Military Intelligence",
Commodity::MilitaryPlans => "Military Plans",
Commodity::MolluscBrainTissue => "Mollusc Brain Tissue",
Commodity::MolluscFluid => "Mollusc Fluid",
Commodity::MolluscMembrane => "Mollusc Membrane",
Commodity::MolluscMycelium => "Mollusc Mycelium",
Commodity::MolluscSoftTissue => "Mollusc Soft Tissue",
Commodity::MolluscSpores => "Mollusc Spores",
Commodity::MysteriousIdol => "Mysterious Idol",
Commodity::OccupiedEscapePod => "Occupied Escape Pod",
Commodity::OrganSample => "Organ Sample",
Commodity::PersonalEffects => "Personal Effects",
Commodity::PodCoreTissue => "Pod Core Tissue",
Commodity::PodDeadTissue => "Pod Dead Tissue",
Commodity::PodMesoglea => "Pod Mesoglea",
Commodity::PodOuterTissue => "Pod Outer Tissue",
Commodity::PodShellTissue => "Pod Shell Tissue",
Commodity::PodSurfaceTissue => "Pod Surface Tissue",
Commodity::PodTissue => "Pod Tissue",
Commodity::PoliticalPrisoners => "Political Prisoners",
Commodity::PreciousGems => "Precious Gems",
Commodity::ProhibitedResearchMaterials => "Prohibited Research Materials",
Commodity::ProtectiveMembraneScrap => "Protective MembraneScrap",
Commodity::PrototypeTech => "Prototype Tech",
Commodity::RareArtwork => "Rare Artwork",
Commodity::RebelTransmissions => "Rebel Transmissions",
Commodity::SAP8CoreContainer => "SAP 8 Core Container",
Commodity::ScientificResearch => "Scientific Research",
Commodity::ScientificSamples => "Scientific Samples",
Commodity::SemiRefinesSpireMineral => "Semi Refines Spire Mineral",
Commodity::SmallSurveyDataCache => "Small Survey Data Cache",
Commodity::SpacePioneerRelics => "Space Pioneer Relics",
Commodity::TacticalData => "Tactical Data",
Commodity::TechnicalBlueprints => "Technical Blueprints",
Commodity::ThargoidBasiliskTissueSample => "Thargoid Basilisk Tissue Sample",
Commodity::ThargoidBioStorageCapsule => "Thargoid Bio Storage Capsule",
Commodity::ThargoidBiologicalMatter => "Thargoid Biological Matter",
Commodity::ThargoidCyclopsTissueSample => "Thargoid Cyclops Tissue Sample",
Commodity::ThargoidGlaiveTissueSample => "Thargoid Glaive Tissue Sample",
Commodity::ThargoidHeart => "Thargoid Heart",
Commodity::ThargoidHydraTissueSample => "Thargoid Hydra Tissue Sample",
Commodity::ThargoidLink => "Thargoid Link",
Commodity::ThargoidMedusaTissueSample => "Thargoid Medusa Tissue Sample",
Commodity::ThargoidOrthrusTissueSample => "Thargoid Orthrus Tissue Sample",
Commodity::ThargoidProbe => "Thargoid Probe",
Commodity::ThargoidResin => "Thargoid Resin",
Commodity::ThargoidScoutTissueSample => "Thargoid Scout Tissue Sample",
Commodity::ThargoidScytheTissueSample => "Thargoid Scythe Tissue Sample",
Commodity::ThargoidGeneratorTissueSample => "Thargoid Generator Tissue Sample",
Commodity::ThargoidSensor => "Thargoid Sensor",
Commodity::ThargoidTechnologySamples => "Thargoid Technology Samples",
Commodity::TimeCapsule => "Time Capsule",
Commodity::TitanDeepTissueSample => "Titan Deep Tissue Sample",
Commodity::TitanDriveComponent => "Titan Drive Component",
Commodity::TitanMawDeepTissueSample => "Titan Maw Deep Tissue Sample",
Commodity::TitanMawPartialTissueSample => "Titan Maw Partial Tissue Sample",
Commodity::TitanMawTissueSample => "Titan Maw Tissue Sample",
Commodity::TitanPartialTissueSample => "Titan Partial Tissue Sample",
Commodity::TitanTissueSample => "Titan Tissue Sample",
Commodity::TradeData => "Trade Data",
Commodity::TrinketsOfHiddenFortune => "Trinkets Of Hidden Fortune",
Commodity::UnclassifiedRelic => "Unclassified Relic",
Commodity::UnoccupiedEscapePod => "Unoccupied EscapePod",
Commodity::UnstableDataCore => "Unstable Data Core",
Commodity::WreckageComponents => "Wreckage Components",
Commodity::ImperialSlaves => "Imperial Slaves",
Commodity::Slaves => "Slaves",
Commodity::AdvancedCatalysers => "Advanced Catalysers",
Commodity::AnimalMonitors => "Animal Monitors",
Commodity::AquaponicSystems => "Aquaponic Systems",
Commodity::AutoFabricators => "Auto Fabricators",
Commodity::BioreducingLichen => "Bioreducing Lichen",
Commodity::ComputerComponents => "Computer Components",
Commodity::HESuits => "H.E. Suits",
Commodity::HardwareDiagnosticSensor => "Hardware Diagnostic Sensor",
Commodity::LandEnrichmentSystems => "Land Enrichment Systems",
Commodity::MedicalDiagnosticEquipment => "Medical Diagnostic Equipment",
Commodity::MicroControllers => "Micro Controllers",
Commodity::MuonImager => "Muon Imager",
Commodity::Nanobreakers => "Nanobreakers",
Commodity::ResonatingSeparators => "Resonating Separators",
Commodity::Robotics => "Robotics",
Commodity::StructuralRegulators => "Structural Regulators",
Commodity::TelemetrySuite => "Telemetry Suite",
Commodity::ConductiveFabrics => "Conductive Fabrics",
Commodity::Leather => "Leather",
Commodity::MilitaryGradeFabrics => "Military Grade Fabrics",
Commodity::NaturalFabrics => "Natural Fabrics",
Commodity::SyntheticFabrics => "Synthetic Fabrics",
Commodity::Biowaste => "Biowaste",
Commodity::ChemicalWaste => "Chemical Waste",
Commodity::Scrap => "Scrap",
Commodity::ToxicWaste => "Toxic Waste",
Commodity::BattleWeapons => "Battle Weapons",
Commodity::Landmines => "Landmines",
Commodity::NonLethalWeapons => "Non-Lethal Weapons",
Commodity::PersonalWeapons => "Personal Weapons",
Commodity::ReactiveArmour => "Reactive Armour",
Commodity::JaquesQuinentianStill => "Jaques Quinentian Still",
Commodity::KinagoViolins => "Kinago Violins",
Commodity::ApaVietii => "Apa Vietii",
Commodity::GeawenDanceDust => "Geawen Dance Dust",
Commodity::VanayequiCeratomorphaFur => "Vanayequi Ceratomorpha Fur",
Commodity::KaretiiCouture => "Karetii Couture",
Commodity::MukusubiiChitinos => "Mukusubii Chitin-os",
Commodity::UltraCompactProcessorPrototypes => "Ultra-Compact Processor Prototypes",
Commodity::EleuThermals => "Eleu Thermals",
Commodity::KamorinHistoricWeapons => "Kamorin Historic Weapons",
Commodity::CeremonialHeikeTea => "Ceremonial Heike Tea",
Commodity::VidavantianLace => "Kachirigin Filter Leeches",
Commodity::KachiriginFilterLeeches => "Vidavantian Lace",
Commodity::LyraeWeed => "Lyrae Weed",
Commodity::GalacticTravelGuide => "Harma Silver Sea Rum",
Commodity::HarmaSilverSeaRum => "Galactic Travel Guide",
Commodity::NgadandariFireOpals => "Ngadandari Fire Opals",
Commodity::AlyaBodySoap => "Alya Body Soap",
Commodity::HelvetitjPearls => "Onionhead Beta Strain",
Commodity::OchoengChillies => "Ochoeng Chillies",
Commodity::OnionheadBetaStrain => "Njangari Saddles",
Commodity::KamitraCigars => "Kamitra Cigars",
Commodity::NjangariSaddles => "Helvetitj Pearls",
Commodity::HipOrganophosphates => "Hip Organophosphates",
Commodity::GilyaSignatureWeapons => "Gilya Signature Weapons",
Commodity::HR7221Wheat => "HR 7221 Wheat",
Commodity::WheemeteWheatCakes => "Wheemete Wheat Cakes",
Commodity::RajukruMultiStoves => "Nanomedicines",
Commodity::Nanomedicines => "Rajukru Multi-Stoves",
Commodity::NonEuclidianExotanks => "Non Euclidian Exotanks",
Commodity::NgunaModernAntiques => "Nguna Modern Antiques",
Commodity::XiheBiomorphicCompanions => "Xihe Biomorphic Companions",
Commodity::EsusekuCaviar => "Esuseku Caviar",
Commodity::OrrerianViciousBrew => "Haiden Black Brew",
Commodity::VHerculisBodyRub => "Void Extract Coffee",
Commodity::VoidExtractCoffee => "Personal Gifts",
Commodity::UszaianTreeGrub => "V Herculis Body Rub",
Commodity::HaidenBlackBrew => "Orrerian Vicious Brew",
Commodity::MotronaExperienceJelly => "Uszaian Tree Grub",
Commodity::JaradharrePuzzleBox => "Jaradharre Puzzle Box",
Commodity::PersonalGifts => "Motrona Experience Jelly",
Commodity::MulachiGiantFungus => "LTT Hyper Sweet",
Commodity::LTTHyperSweet => "HIP 118311 Swarm",
Commodity::MedbStarlube => "Mulachi Giant Fungus",
Commodity::GiantVerrix => "Giant Verrix",
Commodity::HIP118311Swarm => "Medb Starlube",
Commodity::DisoMaCorn => "Diso Ma Corn",
Commodity::LavianBrandy => "Lavian Brandy",
Commodity::AzureMilk => "Coquim Spongiform Victuals",
Commodity::LeestianEvilJuice => "Azure Milk",
Commodity::CoquimSpongiformVictuals => "Leestian Evil Juice",
Commodity::LeatheryEggs => "Kongga Ale",
Commodity::ShansCharisOrchid => "Shan's Charis Orchid",
Commodity::KonggaAle => "Leathery Eggs",
Commodity::VegaSlimweed => "Tiolce Waste2Paste Units",
Commodity::TiolceWaste2PasteUnits => "Vega Slimweed",
Commodity::OphiuchExinoArtefacts => "Ophiuch Exino Artefacts",
Commodity::AltairianSkin => "Altairian Skin",
Commodity::AganippeRush => "Aganippe Rush",
Commodity::CD75KittenBrandCoffee => "CD-75 Kitten Brand Coffee",
Commodity::HavasupaiDreamCatcher => "Havasupai Dream Catcher",
Commodity::EraninPearlWhisky => "Pavonis Ear Grubs",
Commodity::PavonisEarGrubs => "Eranin Pearl Whisky",
Commodity::OnionheadAlphaStrain => "Karsuki Locusts",
Commodity::IndiBourbon => "Yaso Kondi Leaf",
Commodity::BakedGreebles => "Indi Bourbon",
Commodity::KarsukiLocusts => "Onionhead Alpha Strain",
Commodity::MasterChefs => "Master Chefs",
Commodity::YasoKondiLeaf => "Baked Greebles",
Commodity::BurnhamBileDistillate => "Burnham Bile Distillate",
Commodity::TheHuttonMug => "Centauri Mega Gin",
Commodity::CentauriMegaGin => "The Hutton Mug",
Commodity::UtgaroarMillennialEggs => "Utgaroar Millennial Eggs",
Commodity::SoontillRelics => "Soontill Relics",
Commodity::ZeesszeAntGrubGlue => "Zeessze Ant Grub Glue",
Commodity::TheWatersOfShintara => "Baltah'sine Vacuum Krill",
Commodity::BaltahsineVacuumKrill => "Giant Irukama Snails",
Commodity::SanumaDecorativeMeat => "The Waters Of Shintara",
Commodity::GiantIrukamaSnails => "Crystalline Spheres",
Commodity::AnduligaFireWorks => "Pantaa Prayer Sticks",
Commodity::CrystallineSpheres => "Anduliga Fire Works",
Commodity::PantaaPrayerSticks => "Sanuma Decorative Meat",
Commodity::ChiEridaniMarinePaste => "Chi Eridani Marine Paste",
Commodity::EthgrezeTeaBuds => "Delta Phoenicis Palms",
Commodity::DeltaPhoenicisPalms => "Tarach Spice",
Commodity::TarachSpice => "Wulpa Hyperbore Systems",
Commodity::WulpaHyperboreSystems => "Ethgreze Tea Buds",
Commodity::LiveHecateSeaWorms => "Live Hecate Sea Worms",
Commodity::KoroKungPellets => "Wuthielo Ku Froth",
Commodity::BastSnakeGin => "Bast Snake Gin",
Commodity::TerraMaterBloodBores => "Koro Kung Pellets",
Commodity::WuthieloKuFroth => "Terra Mater Blood Bores",
Commodity::HonestyPills => "Ceti Rabbits",
Commodity::CromSilverFesh => "Aepyornis Egg",
Commodity::BorasetaniPathogenetics => "Crom Silver Fesh",
Commodity::CetiRabbits => "Uzumoku Low-G Wings",
Commodity::AepyornisEgg => "Honesty Pills",
Commodity::UzumokuLowGWings => "Borasetani Pathogenetics",
Commodity::CherbonesBloodCrystals => "Toxandji Virocide",
Commodity::ToxandjiVirocide => "Cherbones Blood Crystals",
Commodity::Onionhead => "Onionhead",
Commodity::LucanOnionhead => "Tanmark Tranquil Tea",
Commodity::TanmarkTranquilTea => "Lucan Onionhead",
Commodity::ThrutisCream => "Thrutis Cream",
Commodity::AlacarakmoSkinArt => "Alacarakmo Skin Art",
Commodity::PlatinumAlloy => "Platinum Alloy",
Commodity::MokojingBeastFeast => "Eden Apples Of Aerial",
Commodity::EdenApplesOfAerial => "Mokojing Beast Feast",
Commodity::ChameleonCloth => "Chameleon Cloth",
Commodity::TauriChimes => "Tauri Chimes",
Commodity::RusaniOldSmokey => "Goman Yaupon Coffee",
Commodity::AZCancriFormula42 => "Rusani Old Smokey",
Commodity::GomanYauponCoffee => "AZ Cancri Formula 42",
Commodity::GerasianGueuzeBeer => "Gerasian Gueuze Beer",
Commodity::JarouaRice => "Jaroua Rice",
Commodity::AnyNaCoffee => "HIP 10175 Bush Meat",
Commodity::FujinTea => "Fujin Tea",
Commodity::HIP10175BushMeat => "Any Na Coffee",
Commodity::MomusBogSpaniel => "Momus Bog Spaniel",
Commodity::WitchhaulKobeBeef => "Witchhaul Kobe Beef",
Commodity::SaxonWine => "Saxon Wine",
Commodity::AroucaConventualSweets => "Arouca Conventual Sweets",
Commodity::AlbinoQuechuaMammothMeat => "Albino Quechua Mammoth Meat",
Commodity::Duradrives => "Holva Duelling Blades",
Commodity::HolvaDuellingBlades => "Duradrives",
Commodity::RapaBaoSnakeSkins => "Rapa Bao Snake Skins",
Commodity::WolfFesh => "Eshu Umbrellas",
Commodity::EshuUmbrellas => "Wolf Fesh",
Commodity::NeritusBerries => "Neritus Berries",
Commodity::JotunMookah => "Jotun Mookah",
Commodity::ChateauDeAegaeon => "Chateau De Aegaeon",
Commodity::BelalansRayLeather => "Belalans Ray Leather",
Commodity::DamnaCarapaces => "Damna Carapaces",
Commodity::HIPProtoSquid => "HIP Proto-Squid",
Commodity::MechucosHighTea => "Mechucos High Tea",
Commodity::DeuringasTruffles => "Deuringas Truffles",
Commodity::BankiAmphibiousLeather => "Banki Amphibious Leather",
Commodity::SothisCrystallineGold => "Sothis Crystalline Gold",
Commodity::TiegfriesSynthSilk => "Tiegfries Synth Silk",
Commodity::VolkhabBeeDrones => "Volkhab Bee Drones",
Commodity::BuckyballBeerMats => "Buckyball Beer Mats",
Commodity::ClassifiedExperimentalEquipment => "Classified Experimental Equipment",
Commodity::Limpet => "Limpet",
Commodity::LavignyGarrisonSupplies => "Lavigny Garrison Supplies",
Commodity::LavignyFieldSupplies => "Lavigny Field Supplies",
Commodity::LavignyCorruptionDossiers => "Lavigny Corruption Dossiers",
Commodity::SiriusIndustrialEquipment => "Sirius Industrial Equipment",
Commodity::SiriusCommercialContracts => "Sirius Commercial Contracts",
Commodity::SiriusFranchisePackage => "Sirius Franchise Package",
Commodity::AislingMediaMaterials => "Aisling Media Materials",
Commodity::AislingPromotionalMaterials => "Aisling Promotional Materials",
Commodity::AislingMediaResources => "Aisling Media Resources",
Commodity::TorvalCommercialContracts => "Torval Commercial Contracts",
Commodity::TorvalDeeds => "Torval Deeds",
Commodity::PatreusFieldSupplies => "Patreus Field Supplies",
Commodity::RepublicanFieldSupplies => "Republican Field Supplies",
Commodity::RepublicanGarisonSupplies => "Republican Garison Supplies",
Commodity::LiberalCampaignMaterials => "Liberal Campaign Materials",
Commodity::AllianceLegaslativeContracts => "Alliance Legaslative Contracts",
Commodity::AllianceLegaslativeRecords => "Alliance Legaslative Records",
Commodity::FederalTradeContracts => "Federal Trade Contracts",
Commodity::PatreusGarrisonSupplies => "Patreus Garrison Supplies",
#[cfg(feature = "allow-unknown")]
Commodity::Unknown(unknown) => unknown,
}
)
}
}
#[cfg(test)]
mod tests {
use std::str::FromStr;
use crate::trading::Commodity;
#[test]
fn all_commodity_lines_are_parsed_correctly() {
let content = include_str!("zz_commodity_items.txt");
let lines = content.lines();
for line in lines {
if line.starts_with('#') {
continue;
}
let result = Commodity::from_str(line);
assert!(dbg!(result).is_ok());
}
}
#[test]
fn all_commodity_lines_are_parsed_correctly_eddn() {
let content = include_str!("zz_commodity_items_eddn.txt");
let lines = content.lines();
for line in lines {
if line.starts_with('#') {
continue;
}
let result = Commodity::from_str(line);
assert!(dbg!(result).is_ok());
}
}
#[test]
fn all_rare_commodity_lines_are_parsed_correctly_eddn() {
let content = include_str!("zz_commodity_rare_items_eddn.txt");
let lines = content.lines();
for line in lines {
if line.starts_with('#') {
continue;
}
let result = Commodity::from_str(line);
assert!(dbg!(result).is_ok());
}
}
}