from enum import Enum from typing import NamedTuple class DestinationType(Enum): STATION = 0 TEMPERATE_WORLD = 1 DESERT_WORLD = 2 FROZEN_WORLD = 3 JUNGLE_WORLD = 4 OCEAN_WORLD = 5 ASTEROID_BASE = 6 BROKEN_WORLD = 7 CITY_WORLD = 8 MOUNTAIN_WORLD = 9 VOLCANO_WORLD = 10 GAS_WORLD = 11 FOREST_WORLD = 12 class DangerLevel(Enum): NONE = 0 LOW = 1 MODERATE = 2 HIGH = 3 EXTREME = 4 class DangerType(Enum): HOSTILE = 0 AT_WAR = 1 DESERT = 2 JUNGLE = 3 OCEAN = 4 ATMOSPHERE = 5 GRAVITY = 6 class Destination(NamedTuple): name: str type: DestinationType system: str | None = None sector: str | None = None danger: tuple | None = None is_moon: bool = False is_legends: bool = False REVERSE_DESTINATION_TYPE = [ "station", "temperate world", "desert world", "frozen world", "jungle world", "ocean world", "asteroid", "broken world", "city world", "mountain world", "volcano world", "gas world", "forest world", ] SYSTEMS = [ ("Abafar", "Outer Rim"), ("Abednedo", "Colonies"), ("Abregado", "Core Worlds"), ("Adega", "Outer Rim"), ("Agamar", "Outer Rim"), ("Ajan Kloss", "Outer Rim"), ("Akiva", "Outer Rim"), ("Alderaan", "Core Worlds"), ("Aldhani", None), ("Aleen", "Mid Rim"), ("Alzoc III", "Outer Rim"), ("Ambria", "Inner Rim"), ("Anaxes", "Outer Rim"), ("Ando", "Mid Rim"), ("Anoat", "Outer Rim"), ("Anoth", "Wild Space"), ("Athega", "Expansion Region"), ("Atollon", "Outer Rim"), ("Bakura", "Wild Space"), ("Balmorra", "Colonies"), ("Balnab", "Mid Rim"), ("Barton 4", None), ("Batuu", "Outer Rim"), ("Belsavis", "Outer Rim"), ("Bespin", "Outer Rim"), ("Bogano", "Outer Rim"), ("Bonadan", "Outer Rim"), ("Bracca", "Mid Rim"), ("Bright Jewel", "Mid Rim"), ("Cantonica", "Outer Rim"), ("Carida", "Colonies"), ("Castilon", "Mid Rim"), ("Cato Neimoidia", "Colonies"), ("Chandrila", "Core Worlds"), ("Christoph", "Outer Rim"), ("Circarpous", "Expansion Region"), ("Concord Dawn", "Outer Rim"), ("Corellia", "Core Worlds"), ("Corellian", "Core Worlds"), ("Coruscant", "Core Worlds"), ("Crait", "Outer Rim"), ("Cyax", "Outer Rim"), ("Dagobah", "Outer Rim"), ("Daiyu", None), ("Dantooine", "Outer Rim"), ("Dathomir", "Outer Rim"), ("Devaron", "Colonies"), ("Doornik-628", "Core Worlds"), ("Dromund", "Outer Rim"), ("Eadu", "Outer Rim"), ("Endor", "Outer Rim"), ("ErĀ“kit", "Outer Rim"), ("Eriadu", "Outer Rim"), ("Essesia", "Core Worlds"), ("Felucia", "Outer Rim"), ("Florrum", "Outer Rim"), ("Fondor", "Colonies"), ("Geonosis", "Outer Rim"), ("Hapes", "Inner Rim"), ("Hosnian", "Core Worlds"), ("Hoth", "Outer Rim"), ("Hutta", "Outer Rim"), ("Iego", "Outer Rim"), ("Ileenium", "Outer Rim"), ("Ilum", "Unknown Regions"), ("Iridonia", "Mid Rim"), ("Jabiim", "Outer Rim"), ("Jakku", "Inner Rim"), ("Japrael", "Inner Rim"), ("Jedha", "Mid Rim"), ("Jelucan", "Outer Rim"), ("Jinata", "Core Worlds"), ("Kamino", "Outer Rim"), ("Kashyyyk", "Mid Rim"), ("Kessel", "Outer Rim"), ("Khomm", "Deep Core"), ("Kijimi", "Mid Rim"), ("Kothlis", "Mid Rim"), ("Kuat", "Core Worlds"), ("Lah'mu", "Outer Rim"), ("Lothal", "Outer Rim"), ("Lotho Minor", "Outer Rim"), ("Malachor", "Outer Rim"), ("Malastare", "Mid Rim"), ("Mandalore", "Outer Rim"), ("Mapuzo", "Mid Rim"), ("Maridun", "Outer Rim"), ("Middian", "Expansion Region"), ("Mon Calamari", "Outer Rim"), ("Mustafar", "Outer Rim"), ("Muunilinst", "Outer Rim"), ("Mygeeto", "Outer Rim"), ("Myrkr", "Inner Rim"), ("N'zoth", "Core Worlds"), ("Naboo", "Mid Rim"), ("Nal Hutta", "Outer Rim"), ("Nevarro", "Outer Rim"), ("Niamos", None), ("Numidian", "Mid Rim"), ("Ottega", "Inner Rim"), ("Perave", "Colonies"), ("Polith", "Inner Rim"), ("Pyria", "Colonies"), ("Ralltiir", "Core Worlds"), ("Rishi", "Outer Rim"), ("Rugosa", "Outer Rim"), ("Ruusan", "Mid Rim"), ("Ryloth", "Outer Rim"), ("Sacorria", "Core Worlds"), ("Saleucami", "Outer Rim"), ("Savareen", "Outer Rim"), ("Scarif", "Outer Rim"), ("Serenno", "Outer Rim"), ("Shili", "Expansion Region"), ("Skako", "Core Worlds"), ("Sorgan", "Outer Rim"), ("Sullust", "Outer Rim"), ("Takodana", "Mid Rim"), ("Tatoo", "Outer Rim"), ("Ten Tempests", "Mid Rim"), ("Teth", "Wild Space"), ("Tholoth", "Colonies"), ("Toprawa", "Outer Rim"), ("Toydaria", "Mid Rim"), ("Tyrius", "Outer Rim"), ("Umbara", "Expansion Region"), ("Uquine", "Colonies"), ("Utapau", "Outer Rim"), ("Wayland", "Outer Rim"), ("Wobani", "Mid Rim"), ("Wrea", "Outer Rim"), ("Yavin", "Outer Rim"), ("Zeffo", "Outer Rim"), ("Zygerria", "Outer Rim"), ] DESTINATIONS = [ Destination(name="Abafar", sector="Outer Rim", type=DestinationType.DESERT_WORLD), Destination(name="Agamar", sector="Outer Rim", type=DestinationType.DESERT_WORLD), Destination( name="Ajan Kloss", sector="Outer Rim", type=DestinationType.JUNGLE_WORLD, is_moon=True, ), Destination(name="Akiva", sector="Outer Rim", type=DestinationType.JUNGLE_WORLD), Destination( name="Alderaan", sector="Core Worlds", type=DestinationType.TEMPERATE_WORLD ), Destination(name="Aldhani", sector="", type=DestinationType.TEMPERATE_WORLD), Destination(name="Aleen", sector="Mid Rim", type=DestinationType.DESERT_WORLD), Destination( name="Alzoc III", sector="Outer Rim", type=DestinationType.FROZEN_WORLD ), Destination(name="Anaxes", sector="Outer Rim", type=DestinationType.FOREST_WORLD), Destination(name="Ando", sector="Mid Rim", type=DestinationType.OCEAN_WORLD), Destination(name="Anoat", sector="Outer Rim", type=DestinationType.CITY_WORLD), Destination(name="Atollon", sector="Outer Rim", type=DestinationType.DESERT_WORLD), Destination(name="Balnab", sector="Mid Rim", type=DestinationType.TEMPERATE_WORLD), Destination(name="Barton 4", sector="", type=DestinationType.FROZEN_WORLD), Destination(name="Batuu", sector="Outer Rim", type=DestinationType.JUNGLE_WORLD), Destination(name="Bespin", sector="Outer Rim", type=DestinationType.GAS_WORLD), Destination( name="Bogano", sector="Outer Rim", type=DestinationType.TEMPERATE_WORLD ), Destination(name="Bracca", sector="Mid Rim", type=DestinationType.BROKEN_WORLD), Destination( name="Cantonica", sector="Outer Rim", type=DestinationType.DESERT_WORLD ), Destination(name="Castilon", sector="Mid Rim", type=DestinationType.OCEAN_WORLD), Destination( name="Cato Neimoidia", sector="Colonies", type=DestinationType.OCEAN_WORLD ), Destination( name="Chandrila", sector="Core Worlds", type=DestinationType.TEMPERATE_WORLD ), Destination( name="Christophsis", system="Christoph", sector="Outer Rim", type=DestinationType.FOREST_WORLD, ), Destination( name="Concord Dawn", sector="Outer Rim", type=DestinationType.BROKEN_WORLD ), Destination(name="Corellia", sector="Core Worlds", type=DestinationType.CITY_WORLD), Destination( name="Coruscant", sector="Core Worlds", type=DestinationType.CITY_WORLD ), Destination(name="Crait", sector="Outer Rim", type=DestinationType.DESERT_WORLD), Destination( name="D'Qar", system="Ileenium", sector="Outer Rim", type=DestinationType.JUNGLE_WORLD, ), Destination(name="Dagobah", sector="Outer Rim", type=DestinationType.JUNGLE_WORLD), Destination(name="Daiyu", sector="", type=DestinationType.CITY_WORLD), Destination( name="Dantooine", sector="Outer Rim", type=DestinationType.TEMPERATE_WORLD ), Destination(name="Dathomir", sector="Outer Rim", type=DestinationType.FOREST_WORLD), Destination(name="Devaron", sector="Colonies", type=DestinationType.FOREST_WORLD), Destination(name="Eadu", sector="Outer Rim", type=DestinationType.MOUNTAIN_WORLD), Destination(name="Endor", sector="Outer Rim", type=DestinationType.GAS_WORLD), Destination( name="Forest Moon", system="Endor", sector="Outer Rim", type=DestinationType.FOREST_WORLD, is_moon=True, ), Destination(name="Er'kit", sector="Outer Rim", type=DestinationType.DESERT_WORLD), Destination(name="Eriadu", sector="Outer Rim", type=DestinationType.JUNGLE_WORLD), Destination( name="Esseles", system="Essesia", sector="Core Worlds", type=DestinationType.TEMPERATE_WORLD, ), Destination(name="Felucia", sector="Outer Rim", type=DestinationType.JUNGLE_WORLD), Destination(name="Florrum", sector="Outer Rim", type=DestinationType.DESERT_WORLD), Destination(name="Fondor", sector="Colonies", type=DestinationType.CITY_WORLD), Destination(name="Geonosis", sector="Outer Rim", type=DestinationType.DESERT_WORLD), Destination( name="Hosnian Prime", system="Hosnian", sector="Core Worlds", type=DestinationType.CITY_WORLD, ), Destination(name="Hoth", sector="Outer Rim", type=DestinationType.FROZEN_WORLD), Destination(name="Iego", sector="Outer Rim", type=DestinationType.DESERT_WORLD), Destination( name="Ilum", sector="Unknown Regions", type=DestinationType.FROZEN_WORLD ), Destination(name="Iridonia", sector="Mid Rim", type=DestinationType.DESERT_WORLD), Destination(name="Jabiim", sector="Outer Rim", type=DestinationType.DESERT_WORLD), Destination(name="Jakku", sector="Inner Rim", type=DestinationType.DESERT_WORLD), Destination( name="Jedha", sector="Mid Rim", type=DestinationType.DESERT_WORLD, is_moon=True ), Destination( name="Jelucan", sector="Outer Rim", type=DestinationType.MOUNTAIN_WORLD ), Destination( name="Jestefad", system="Mustafar", sector="Outer Rim", type=DestinationType.GAS_WORLD, ), Destination(name="Kamino", sector="Outer Rim", type=DestinationType.OCEAN_WORLD), Destination(name="Kashyyyk", sector="Mid Rim", type=DestinationType.FOREST_WORLD), Destination( name="Kef Bir", system="Endor", sector="Outer Rim", type=DestinationType.OCEAN_WORLD, is_moon=True, ), Destination(name="Kessel", sector="Outer Rim", type=DestinationType.JUNGLE_WORLD), Destination(name="Kijimi", sector="Mid Rim", type=DestinationType.MOUNTAIN_WORLD), Destination(name="Kuat", sector="Core Worlds", type=DestinationType.CITY_WORLD), Destination( name="Lah'mu", sector="Outer Rim", type=DestinationType.TEMPERATE_WORLD ), Destination( name="Lothal", sector="Outer Rim", type=DestinationType.TEMPERATE_WORLD ), Destination( name="Lotho Minor", sector="Outer Rim", type=DestinationType.BROKEN_WORLD ), Destination(name="Malachor", sector="Outer Rim", type=DestinationType.DESERT_WORLD), Destination(name="Malastare", sector="Mid Rim", type=DestinationType.FOREST_WORLD), Destination( name="Mandalore", sector="Outer Rim", type=DestinationType.DESERT_WORLD ), Destination(name="Mapuzo", sector="Mid Rim", type=DestinationType.TEMPERATE_WORLD), Destination( name="Maridun", sector="Outer Rim", type=DestinationType.TEMPERATE_WORLD ), Destination( name="Mimban", system="Circarpous", sector="Expansion Region", type=DestinationType.JUNGLE_WORLD, ), Destination( name="Mon Cala", system="Mon Calamari", sector="Outer Rim", type=DestinationType.OCEAN_WORLD, ), Destination( name="Mustafar", sector="Outer Rim", type=DestinationType.VOLCANO_WORLD ), Destination(name="Mygeeto", sector="Outer Rim", type=DestinationType.FROZEN_WORLD), Destination(name="Naboo", sector="Mid Rim", type=DestinationType.TEMPERATE_WORLD), Destination( name="Nal Hutta", sector="Outer Rim", type=DestinationType.JUNGLE_WORLD ), Destination(name="Nevarro", sector="Outer Rim", type=DestinationType.VOLCANO_WORLD), Destination(name="Niamos", sector="", type=DestinationType.TEMPERATE_WORLD), Destination( name="Numidian Prime", system="Numidian", sector="Mid Rim", type=DestinationType.JUNGLE_WORLD, ), Destination( name="Nur", system="Mustafar", sector="Outer Rim", type=DestinationType.OCEAN_WORLD, is_moon=True, ), Destination( name="Onderon", system="Japrael", sector="Inner Rim", type=DestinationType.JUNGLE_WORLD, ), Destination( name="Ord Mantell", system="Bright Jewel", sector="Mid Rim", type=DestinationType.TEMPERATE_WORLD, ), Destination( name="Ossus", system="Adega", sector="Outer Rim", type=DestinationType.TEMPERATE_WORLD, ), Destination( name="Pasaana", system="Middian", sector="Expansion Region", type=DestinationType.DESERT_WORLD, ), Destination( name="Pillio", system="Jinata", sector="Core Worlds", type=DestinationType.OCEAN_WORLD, ), Destination(name="Rishi", sector="Outer Rim", type=DestinationType.JUNGLE_WORLD), Destination( name="Rodia", system="Tyrius", sector="Outer Rim", type=DestinationType.JUNGLE_WORLD, ), Destination( name="Rugosa", sector="Outer Rim", type=DestinationType.OCEAN_WORLD, is_moon=True, ), Destination(name="Ruusan", sector="Mid Rim", type=DestinationType.DESERT_WORLD), Destination(name="Ryloth", sector="Outer Rim", type=DestinationType.DESERT_WORLD), Destination( name="Saleucami", sector="Outer Rim", type=DestinationType.JUNGLE_WORLD ), Destination(name="Savareen", sector="Outer Rim", type=DestinationType.DESERT_WORLD), Destination(name="Scarif", sector="Outer Rim", type=DestinationType.OCEAN_WORLD), Destination( name="Serenno", sector="Outer Rim", type=DestinationType.TEMPERATE_WORLD ), Destination( name="Shili", sector="Expansion Region", type=DestinationType.TEMPERATE_WORLD ), Destination( name="Sissubo", system="Chandrila", sector="Core Worlds", type=DestinationType.FROZEN_WORLD, ), Destination(name="Skako", sector="Core Worlds", type=DestinationType.CITY_WORLD), Destination( name="Skako Minor", system="Skako", sector="Core Worlds", type=DestinationType.FOREST_WORLD, ), Destination(name="Sorgan", sector="Outer Rim", type=DestinationType.FOREST_WORLD), Destination(name="Sullust", sector="Outer Rim", type=DestinationType.VOLCANO_WORLD), Destination(name="Takodana", sector="Mid Rim", type=DestinationType.FOREST_WORLD), Destination( name="Tatooine", system="Tatoo", sector="Outer Rim", type=DestinationType.DESERT_WORLD, ), Destination(name="Teth", sector="Wild Space", type=DestinationType.JUNGLE_WORLD), Destination( name="Toydaria", sector="Mid Rim", type=DestinationType.TEMPERATE_WORLD ), Destination( name="Trandosha", system="Kashyyyk", sector="Mid Rim", type=DestinationType.FOREST_WORLD, ), Destination( name="Umbara", sector="Expansion Region", type=DestinationType.TEMPERATE_WORLD ), Destination( name="Utapau", sector="Outer Rim", type=DestinationType.TEMPERATE_WORLD ), Destination( name="Vandor-1", system="Coruscant", sector="Core Worlds", type=DestinationType.FROZEN_WORLD, ), Destination( name="Vardos", system="Jinata", sector="Core Worlds", type=DestinationType.MOUNTAIN_WORLD, ), Destination(name="Wobani", sector="Mid Rim", type=DestinationType.BROKEN_WORLD), Destination(name="Wrea", sector="Outer Rim", type=DestinationType.OCEAN_WORLD), Destination( name="Yavin Prime", system="Yavin", sector="Outer Rim", type=DestinationType.GAS_WORLD, ), Destination( name="Yavin 4", system="Yavin", sector="Outer Rim", type=DestinationType.JUNGLE_WORLD, is_moon=True, ), Destination(name="Zeffo", sector="Outer Rim", type=DestinationType.MOUNTAIN_WORLD), Destination( name="Zygerria", sector="Outer Rim", type=DestinationType.TEMPERATE_WORLD ), Destination( name="Abednedo", sector="Colonies", type=DestinationType.TEMPERATE_WORLD ), Destination(name="Carida", sector="Colonies", type=DestinationType.MOUNTAIN_WORLD), Destination(name="Uquine", sector="Colonies", type=DestinationType.TEMPERATE_WORLD), Destination(name="Tholoth", sector="Colonies", type=DestinationType.JUNGLE_WORLD), Destination( name="Nar Shaddaa", system="Hutta", sector="Outer Rim", type=DestinationType.CITY_WORLD, is_moon=True, ), Destination( name="Wasskah", system="Kashyyyk", sector="Mid Rim", type=DestinationType.FOREST_WORLD, is_moon=True, ), Destination( name="Abregado-rae", system="Abregado", sector="Core Worlds", type=DestinationType.TEMPERATE_WORLD, is_legends=True, ), Destination( name="Ambria", sector="Inner Rim", type=DestinationType.DESERT_WORLD, is_legends=True, ), Destination( name="Anoth", sector="Wild Space", type=DestinationType.BROKEN_WORLD, is_legends=True, ), Destination( name="Arkania", system="Perave", sector="Colonies", type=DestinationType.FROZEN_WORLD, is_legends=True, ), Destination( name="Bakura", sector="Wild Space", type=DestinationType.TEMPERATE_WORLD, is_legends=True, ), Destination( name="Bonadan", sector="Outer Rim", type=DestinationType.BROKEN_WORLD, is_legends=True, ), Destination( name="Borleias", system="Pyria", sector="Colonies", type=DestinationType.JUNGLE_WORLD, is_legends=True, ), Destination( name="Ord Carida", system="Carida", sector="Colonies", type=DestinationType.TEMPERATE_WORLD, is_legends=True, ), Destination( name="Da Soocha V", system="Cyax", sector="Outer Rim", type=DestinationType.MOUNTAIN_WORLD, is_moon=True, is_legends=True, ), Destination( name="Drall", system="Corellian", sector="Core Worlds", type=DestinationType.TEMPERATE_WORLD, is_legends=True, ), Destination( name="Dromund Kaas", system="Dromund", sector="Outer Rim", type=DestinationType.JUNGLE_WORLD, is_legends=True, ), Destination( name="Dxun", system="Japrael", sector="Inner Rim", type=DestinationType.JUNGLE_WORLD, is_moon=True, is_legends=True, ), Destination( name="Hapes", sector="Inner Rim", type=DestinationType.TEMPERATE_WORLD, is_legends=True, ), Destination( name="Ithor", system="Ottega", sector="Inner Rim", type=DestinationType.TEMPERATE_WORLD, is_legends=True, ), Destination( name="J't'p'tan", system="Doornik-628", sector="Core Worlds", type=DestinationType.TEMPERATE_WORLD, is_legends=True, ), Destination( name="Khomm", sector="Deep Core", type=DestinationType.OCEAN_WORLD, is_legends=True, ), Destination( name="Kothlis", sector="Mid Rim", type=DestinationType.OCEAN_WORLD, is_legends=True, ), Destination( name="Muunilinst", sector="Outer Rim", type=DestinationType.TEMPERATE_WORLD, is_legends=True, ), Destination( name="Myrkr", sector="Inner Rim", type=DestinationType.FOREST_WORLD, is_legends=True, ), Destination( name="N'zoth", sector="Core Worlds", type=DestinationType.DESERT_WORLD, is_legends=True, ), Destination( name="Nkllon", system="Athega", sector="Expansion Region", type=DestinationType.DESERT_WORLD, is_legends=True, ), Destination( name="Ralltiir", sector="Core Worlds", type=DestinationType.TEMPERATE_WORLD, is_legends=True, ), Destination( name="Sacorria", sector="Core Worlds", type=DestinationType.TEMPERATE_WORLD, is_legends=True, ), Destination( name="Selonia", system="Corellian", sector="Core Worlds", type=DestinationType.OCEAN_WORLD, is_legends=True, ), Destination( name="Thyferra", system="Polith", sector="Inner Rim", type=DestinationType.JUNGLE_WORLD, is_legends=True, ), Destination( name="Toprawa", sector="Outer Rim", type=DestinationType.FOREST_WORLD, is_legends=True, ), Destination( name="Vortex", system="Ten Tempests", sector="Mid Rim", type=DestinationType.FROZEN_WORLD, is_legends=True, ), Destination( name="Wayland", sector="Outer Rim", type=DestinationType.JUNGLE_WORLD, is_legends=True, ), Destination( name="Belsavis", sector="Outer Rim", type=DestinationType.FROZEN_WORLD, is_legends=True, ), Destination( name="Balmorra", sector="Colonies", type=DestinationType.TEMPERATE_WORLD, is_legends=True, ), ]