Browse Source

Minor modifications

main
Noëlle 1 year ago
parent
commit
0bdf4530c0
No known key found for this signature in database
2 changed files with 232 additions and 159 deletions
  1. 209
    150
      destinations.py
  2. 23
    9
      swjg.py

+ 209
- 150
destinations.py View File

@@ -38,9 +38,9 @@ class DangerType(Enum):

class Destination(NamedTuple):
name: str
system: str | None
sector: str | None
type: DestinationType
system: str | None = None
sector: str | None = None
danger: tuple | None = None
is_moon: bool = False
is_legends: bool = False
@@ -200,336 +200,386 @@ SYSTEMS = [
]

DESTINATIONS = [
Destination(name="Abafar", sector="Outer Rim", type=Destination.DESERT_WORLD),
Destination(name="Agamar", sector="Outer Rim", type=Destination.DESERT_WORLD),
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=Destination.JUNGLE_WORLD,
type=DestinationType.JUNGLE_WORLD,
is_moon=True,
),
Destination(name="Akiva", sector="Outer Rim", type=Destination.JUNGLE_WORLD),
Destination(name="Akiva", sector="Outer Rim", type=DestinationType.JUNGLE_WORLD),
Destination(
name="Alderaan", sector="Core Worlds", type=Destination.TEMPERATE_WORLD
name="Alderaan", sector="Core Worlds", type=DestinationType.TEMPERATE_WORLD
),
Destination(name="Aldhani", sector="", type=Destination.TEMPERATE_WORLD),
Destination(name="Aleen", sector="Mid Rim", type=Destination.DESERT_WORLD),
Destination(name="Alzoc III", sector="Outer Rim", type=Destination.FROZEN_WORLD),
Destination(name="Anaxes", sector="Outer Rim", type=Destination.FOREST_WORLD),
Destination(name="Ando", sector="Mid Rim", type=Destination.OCEAN_WORLD),
Destination(name="Anoat", sector="Outer Rim", type=Destination.CITY_WORLD),
Destination(name="Atollon", sector="Outer Rim", type=Destination.DESERT_WORLD),
Destination(name="Balnab", sector="Mid Rim", type=Destination.TEMPERATE_WORLD),
Destination(name="Barton 4", sector="", type=Destination.FROZEN_WORLD),
Destination(name="Batuu", sector="Outer Rim", type=Destination.JUNGLE_WORLD),
Destination(name="Bespin", sector="Outer Rim", type=Destination.GAS_WORLD),
Destination(name="Bogano", sector="Outer Rim", type=Destination.TEMPERATE_WORLD),
Destination(name="Bracca", sector="Mid Rim", type=Destination.BROKEN_WORLD),
Destination(name="Cantonica", sector="Outer Rim", type=Destination.DESERT_WORLD),
Destination(name="Castilon", sector="Mid Rim", type=Destination.OCEAN_WORLD),
Destination(name="Cato Neimoidia", sector="Colonies", type=Destination.OCEAN_WORLD),
Destination(name="Aldhani", sector="", type=DestinationType.TEMPERATE_WORLD),
Destination(name="Aleen", sector="Mid Rim", type=DestinationType.DESERT_WORLD),
Destination(
name="Chandrila", sector="Core Worlds", type=Destination.TEMPERATE_WORLD
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=Destination.FOREST_WORLD,
type=DestinationType.FOREST_WORLD,
),
Destination(
name="Concord Dawn", sector="Outer Rim", type=DestinationType.BROKEN_WORLD
),
Destination(name="Concord Dawn", sector="Outer Rim", type=Destination.BROKEN_WORLD),
Destination(name="Corellia", sector="Core Worlds", type=Destination.CITY_WORLD),
Destination(name="Coruscant", sector="Core Worlds", type=Destination.CITY_WORLD),
Destination(name="Crait", sector="Outer Rim", type=Destination.DESERT_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=Destination.JUNGLE_WORLD,
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="Dagobah", sector="Outer Rim", type=Destination.JUNGLE_WORLD),
Destination(name="Daiyu", sector="", type=Destination.CITY_WORLD),
Destination(name="Dantooine", sector="Outer Rim", type=Destination.TEMPERATE_WORLD),
Destination(name="Dathomir", sector="Outer Rim", type=Destination.FOREST_WORLD),
Destination(name="Devaron", sector="Colonies", type=Destination.FOREST_WORLD),
Destination(name="Eadu", sector="Outer Rim", type=Destination.MOUNTAIN_WORLD),
Destination(name="Endor", sector="Outer Rim", type=Destination.GAS_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=Destination.FOREST_WORLD,
type=DestinationType.FOREST_WORLD,
is_moon=True,
),
Destination(name="Er'kit", sector="Outer Rim", type=Destination.DESERT_WORLD),
Destination(name="Eriadu", sector="Outer Rim", type=Destination.JUNGLE_WORLD),
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=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
),
Destination(name="Felucia", sector="Outer Rim", type=Destination.JUNGLE_WORLD),
Destination(name="Florrum", sector="Outer Rim", type=Destination.DESERT_WORLD),
Destination(name="Fondor", sector="Colonies", type=Destination.CITY_WORLD),
Destination(name="Geonosis", sector="Outer Rim", type=Destination.DESERT_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=Destination.CITY_WORLD,
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="Hoth", sector="Outer Rim", type=Destination.FROZEN_WORLD),
Destination(name="Iego", sector="Outer Rim", type=Destination.DESERT_WORLD),
Destination(name="Ilum", sector="Unknown Regions", type=Destination.FROZEN_WORLD),
Destination(name="Iridonia", sector="Mid Rim", type=Destination.DESERT_WORLD),
Destination(name="Jabiim", sector="Outer Rim", type=Destination.DESERT_WORLD),
Destination(name="Jakku", sector="Inner Rim", type=Destination.DESERT_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=Destination.DESERT_WORLD, is_moon=True
name="Jedha", sector="Mid Rim", type=DestinationType.DESERT_WORLD, is_moon=True
),
Destination(
name="Jelucan", sector="Outer Rim", type=DestinationType.MOUNTAIN_WORLD
),
Destination(name="Jelucan", sector="Outer Rim", type=Destination.MOUNTAIN_WORLD),
Destination(
name="Jestefad",
system="Mustafar",
sector="Outer Rim",
type=Destination.GAS_WORLD,
type=DestinationType.GAS_WORLD,
),
Destination(name="Kamino", sector="Outer Rim", type=Destination.OCEAN_WORLD),
Destination(name="Kashyyyk", sector="Mid Rim", type=Destination.FOREST_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=Destination.OCEAN_WORLD,
type=DestinationType.OCEAN_WORLD,
is_moon=True,
),
Destination(name="Kessel", sector="Outer Rim", type=Destination.JUNGLE_WORLD),
Destination(name="Kijimi", sector="Mid Rim", type=Destination.MOUNTAIN_WORLD),
Destination(name="Kuat", sector="Core Worlds", type=Destination.CITY_WORLD),
Destination(name="Lah'mu", sector="Outer Rim", type=Destination.TEMPERATE_WORLD),
Destination(name="Lothal", sector="Outer Rim", type=Destination.TEMPERATE_WORLD),
Destination(name="Lotho Minor", sector="Outer Rim", type=Destination.BROKEN_WORLD),
Destination(name="Malachor", sector="Outer Rim", type=Destination.DESERT_WORLD),
Destination(name="Malastare", sector="Mid Rim", type=Destination.FOREST_WORLD),
Destination(name="Mandalore", sector="Outer Rim", type=Destination.DESERT_WORLD),
Destination(name="Mapuzo", sector="Mid Rim", type=Destination.TEMPERATE_WORLD),
Destination(name="Maridun", sector="Outer Rim", type=Destination.TEMPERATE_WORLD),
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=Destination.JUNGLE_WORLD,
type=DestinationType.JUNGLE_WORLD,
),
Destination(
name="Mon Cala",
system="Mon Calamari",
sector="Outer Rim",
type=Destination.OCEAN_WORLD,
type=DestinationType.OCEAN_WORLD,
),
Destination(
name="Mustafar", sector="Outer Rim", type=DestinationType.VOLCANO_WORLD
),
Destination(name="Mustafar", sector="Outer Rim", type=Destination.VOLCANO_WORLD),
Destination(name="Mygeeto", sector="Outer Rim", type=Destination.FROZEN_WORLD),
Destination(name="Naboo", sector="Mid Rim", type=Destination.TEMPERATE_WORLD),
Destination(name="Nal Hutta", sector="Outer Rim", type=Destination.JUNGLE_WORLD),
Destination(name="Nevarro", sector="Outer Rim", type=Destination.VOLCANO_WORLD),
Destination(name="Niamos", sector="", type=Destination.TEMPERATE_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=Destination.JUNGLE_WORLD,
type=DestinationType.JUNGLE_WORLD,
),
Destination(
name="Nur",
system="Mustafar",
sector="Outer Rim",
type=Destination.OCEAN_WORLD,
type=DestinationType.OCEAN_WORLD,
is_moon=True,
),
Destination(
name="Onderon",
system="Japrael",
sector="Inner Rim",
type=Destination.JUNGLE_WORLD,
type=DestinationType.JUNGLE_WORLD,
),
Destination(
name="Ord Mantell",
system="Bright Jewel",
sector="Mid Rim",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
),
Destination(
name="Ossus",
system="Adega",
sector="Outer Rim",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
),
Destination(
name="Pasaana",
system="Middian",
sector="Expansion Region",
type=Destination.DESERT_WORLD,
type=DestinationType.DESERT_WORLD,
),
Destination(
name="Pillio",
system="Jinata",
sector="Core Worlds",
type=Destination.OCEAN_WORLD,
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="Rishi", sector="Outer Rim", type=Destination.JUNGLE_WORLD),
Destination(name="Ruusan", sector="Mid Rim", type=DestinationType.DESERT_WORLD),
Destination(name="Ryloth", sector="Outer Rim", type=DestinationType.DESERT_WORLD),
Destination(
name="Rodia", system="Tyrius", sector="Outer Rim", type=Destination.JUNGLE_WORLD
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="Rugosa", sector="Outer Rim", type=Destination.OCEAN_WORLD, is_moon=True
name="Serenno", sector="Outer Rim", type=DestinationType.TEMPERATE_WORLD
),
Destination(name="Ruusan", sector="Mid Rim", type=Destination.DESERT_WORLD),
Destination(name="Ryloth", sector="Outer Rim", type=Destination.DESERT_WORLD),
Destination(name="Saleucami", sector="Outer Rim", type=Destination.JUNGLE_WORLD),
Destination(name="Savareen", sector="Outer Rim", type=Destination.DESERT_WORLD),
Destination(name="Scarif", sector="Outer Rim", type=Destination.OCEAN_WORLD),
Destination(name="Serenno", sector="Outer Rim", type=Destination.TEMPERATE_WORLD),
Destination(
name="Shili", sector="Expansion Region", type=Destination.TEMPERATE_WORLD
name="Shili", sector="Expansion Region", type=DestinationType.TEMPERATE_WORLD
),
Destination(
name="Sissubo",
system="Chandrila",
sector="Core Worlds",
type=Destination.FROZEN_WORLD,
type=DestinationType.FROZEN_WORLD,
),
Destination(name="Skako", sector="Core Worlds", type=Destination.CITY_WORLD),
Destination(name="Skako", sector="Core Worlds", type=DestinationType.CITY_WORLD),
Destination(
name="Skako Minor",
system="Skako",
sector="Core Worlds",
type=Destination.FOREST_WORLD,
type=DestinationType.FOREST_WORLD,
),
Destination(name="Sorgan", sector="Outer Rim", type=Destination.FOREST_WORLD),
Destination(name="Sullust", sector="Outer Rim", type=Destination.VOLCANO_WORLD),
Destination(name="Takodana", sector="Mid Rim", type=Destination.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=Destination.DESERT_WORLD,
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="Teth", sector="Wild Space", type=Destination.JUNGLE_WORLD),
Destination(name="Toydaria", sector="Mid Rim", type=Destination.TEMPERATE_WORLD),
Destination(
name="Trandosha",
system="Kashyyyk",
sector="Mid Rim",
type=Destination.FOREST_WORLD,
type=DestinationType.FOREST_WORLD,
),
Destination(
name="Umbara", sector="Expansion Region", type=DestinationType.TEMPERATE_WORLD
),
Destination(
name="Umbara", sector="Expansion Region", type=Destination.TEMPERATE_WORLD
name="Utapau", sector="Outer Rim", type=DestinationType.TEMPERATE_WORLD
),
Destination(name="Utapau", sector="Outer Rim", type=Destination.TEMPERATE_WORLD),
Destination(
name="Vandor-1",
system="Coruscant",
sector="Core Worlds",
type=Destination.FROZEN_WORLD,
type=DestinationType.FROZEN_WORLD,
),
Destination(
name="Vardos",
system="Jinata",
sector="Core Worlds",
type=Destination.MOUNTAIN_WORLD,
type=DestinationType.MOUNTAIN_WORLD,
),
Destination(name="Wobani", sector="Mid Rim", type=Destination.BROKEN_WORLD),
Destination(name="Wrea", sector="Outer Rim", type=Destination.OCEAN_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=Destination.GAS_WORLD,
type=DestinationType.GAS_WORLD,
),
Destination(
name="Yavin 4",
system="Yavin",
sector="Outer Rim",
type=Destination.JUNGLE_WORLD,
type=DestinationType.JUNGLE_WORLD,
is_moon=True,
),
Destination(name="Zeffo", sector="Outer Rim", type=Destination.MOUNTAIN_WORLD),
Destination(name="Zygerria", sector="Outer Rim", type=Destination.TEMPERATE_WORLD),
Destination(name="Abednedo", sector="Colonies", type=Destination.TEMPERATE_WORLD),
Destination(name="Carida", sector="Colonies", type=Destination.MOUNTAIN_WORLD),
Destination(name="Uquine", sector="Colonies", type=Destination.TEMPERATE_WORLD),
Destination(name="Tholoth", sector="Colonies", type=Destination.JUNGLE_WORLD),
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=Destination.CITY_WORLD,
type=DestinationType.CITY_WORLD,
is_moon=True,
),
Destination(
name="Wasskah",
system="Kashyyyk",
sector="Mid Rim",
type=Destination.FOREST_WORLD,
type=DestinationType.FOREST_WORLD,
is_moon=True,
),
Destination(
name="Abregado-rae",
system="Abregado",
sector="Core Worlds",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True,
),
Destination(
name="Ambria",
sector="Inner Rim",
type=Destination.DESERT_WORLD,
type=DestinationType.DESERT_WORLD,
is_legends=True,
),
Destination(
name="Anoth",
sector="Wild Space",
type=Destination.BROKEN_WORLD,
type=DestinationType.BROKEN_WORLD,
is_legends=True,
),
Destination(
name="Arkania",
system="Perave",
sector="Colonies",
type=Destination.FROZEN_WORLD,
type=DestinationType.FROZEN_WORLD,
is_legends=True,
),
Destination(
name="Bakura",
sector="Wild Space",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True,
),
Destination(
name="Bonadan",
sector="Outer Rim",
type=Destination.BROKEN_WORLD,
type=DestinationType.BROKEN_WORLD,
is_legends=True,
),
Destination(
name="Borleias",
system="Pyria",
sector="Colonies",
type=Destination.JUNGLE_WORLD,
type=DestinationType.JUNGLE_WORLD,
is_legends=True,
),
Destination(
name="Ord Carida",
system="Carida",
sector="Colonies",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True,
),
Destination(
name="Da Soocha V",
system="Cyax",
sector="Outer Rim",
type=Destination.MOUNTAIN_WORLD,
type=DestinationType.MOUNTAIN_WORLD,
is_moon=True,
is_legends=True,
),
@@ -537,127 +587,136 @@ DESTINATIONS = [
name="Drall",
system="Corellian",
sector="Core Worlds",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True,
),
Destination(
name="Dromund Kaas",
system="Dromund",
sector="Outer Rim",
type=Destination.JUNGLE_WORLD,
type=DestinationType.JUNGLE_WORLD,
is_legends=True,
),
Destination(
name="Dxun",
system="Japrael",
sector="Inner Rim",
type=Destination.JUNGLE_WORLD,
type=DestinationType.JUNGLE_WORLD,
is_moon=True,
is_legends=True,
),
Destination(
name="Hapes",
sector="Inner Rim",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True,
),
Destination(
name="Ithor",
system="Ottega",
sector="Inner Rim",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True,
),
Destination(
name="J't'p'tan",
system="Doornik-628",
sector="Core Worlds",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True,
),
Destination(
name="Khomm", sector="Deep Core", type=Destination.OCEAN_WORLD, is_legends=True
name="Khomm",
sector="Deep Core",
type=DestinationType.OCEAN_WORLD,
is_legends=True,
),
Destination(
name="Kothlis", sector="Mid Rim", type=Destination.OCEAN_WORLD, is_legends=True
name="Kothlis",
sector="Mid Rim",
type=DestinationType.OCEAN_WORLD,
is_legends=True,
),
Destination(
name="Muunilinst",
sector="Outer Rim",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True,
),
Destination(
name="Myrkr", sector="Inner Rim", type=Destination.FOREST_WORLD, is_legends=True
name="Myrkr",
sector="Inner Rim",
type=DestinationType.FOREST_WORLD,
is_legends=True,
),
Destination(
name="N'zoth",
sector="Core Worlds",
type=Destination.DESERT_WORLD,
type=DestinationType.DESERT_WORLD,
is_legends=True,
),
Destination(
name="Nkllon",
system="Athega",
sector="Expansion Region",
type=Destination.DESERT_WORLD,
type=DestinationType.DESERT_WORLD,
is_legends=True,
),
Destination(
name="Ralltiir",
sector="Core Worlds",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True,
),
Destination(
name="Sacorria",
sector="Core Worlds",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True,
),
Destination(
name="Selonia",
system="Corellian",
sector="Core Worlds",
type=Destination.OCEAN_WORLD,
type=DestinationType.OCEAN_WORLD,
is_legends=True,
),
Destination(
name="Thyferra",
system="Polith",
sector="Inner Rim",
type=Destination.JUNGLE_WORLD,
type=DestinationType.JUNGLE_WORLD,
is_legends=True,
),
Destination(
name="Toprawa",
sector="Outer Rim",
type=Destination.FOREST_WORLD,
type=DestinationType.FOREST_WORLD,
is_legends=True,
),
Destination(
name="Vortex",
system="Ten Tempests",
sector="Mid Rim",
type=Destination.FROZEN_WORLD,
type=DestinationType.FROZEN_WORLD,
is_legends=True,
),
Destination(
name="Wayland",
sector="Outer Rim",
type=Destination.JUNGLE_WORLD,
type=DestinationType.JUNGLE_WORLD,
is_legends=True,
),
Destination(
name="Belsavis",
sector="Outer Rim",
type=Destination.FROZEN_WORLD,
type=DestinationType.FROZEN_WORLD,
is_legends=True,
),
Destination(
name="Balmorra",
sector="Colonies",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True,
),
]

+ 23
- 9
swjg.py View File

@@ -108,12 +108,13 @@ class Mission:
output.append(template.substitute(**current_values))
out_text = " ".join(output)
out_text = out_text.replace(" ,", ",")
out_text = out_text.replace(" ", " ") # template issue
out_text += "."
return out_text


class PassengerMission(Mission):
output_initial_template = Template("Bring $number passengers")
output_initial_template = Template("Bring $number passenger$plural")

def __init__(self, number: int, *args, **kwargs):
super(PassengerMission, self).__init__(*args, **kwargs)
@@ -121,7 +122,7 @@ class PassengerMission(Mission):

def get_current_values(self) -> dict:
base_dict = super(PassengerMission, self).get_current_values()
new_dict = {"number": self.number}
new_dict = {"number": self.number, "plural": "" if self.number == 1 else "s"}
base_dict.update(new_dict)
return base_dict

@@ -135,7 +136,7 @@ class PassengerMission(Mission):


class CargoMission(Mission):
output_initial_template = Template("Deliver $tons tons of $item")
output_initial_template = Template("Deliver $tons ton$plural of $item")
output_time_timeplate = Template("in the next $time days")

def __init__(self, tons: int, item: str, time: int | None, *args, **kwargs):
@@ -147,10 +148,19 @@ class CargoMission(Mission):
self.tons = tons
self.item = item
self.time = time
if self.tons == 1:
self.plural = ""
else:
self.plural = "s"

def get_current_values(self) -> dict:
base_dict = super(CargoMission, self).get_current_values()
new_dict = {"tons": self.tons, "item": self.item, "time": self.time}
new_dict = {
"tons": self.tons,
"item": self.item,
"time": self.time,
"plural": "" if self.tons == 1 else "s",
}
base_dict.update(new_dict)
return base_dict

@@ -166,7 +176,7 @@ class CargoMission(Mission):


class GroupMission(Mission):
output_initial_template = Template("Bring $number members of a $group")
output_initial_template = Template("Bring $number member$plural of a $group")

def __init__(self, number: int, group: str, *args, **kwargs):
super(GroupMission, self).__init__(*args, **kwargs)
@@ -175,7 +185,11 @@ class GroupMission(Mission):

def get_current_values(self) -> dict:
base_dict = super(GroupMission, self).get_current_values()
new_dict = {"number": self.number, "group": self.group}
new_dict = {
"number": self.number,
"group": self.group,
"plural": "" if self.number == 1 else "s",
}
base_dict.update(new_dict)
return base_dict

@@ -192,12 +206,12 @@ class GroupMission(Mission):
def main():
import random

mission_types = [PassengerMission, CargoMission, GroupMission]
mission_types = [PassengerMission, CargoMission, CargoMission, GroupMission]
missions = []
for _ in range(5):
for _ in range(10):
current_mission = random.choice(mission_types)
dest_type = random.randint(1, 5)
if dest_type < 3: # world, 40% chance
if dest_type < 4: # world, 80% chance
destination = random.choice(DESTINATIONS)
else:
system = random.choice(SYSTEMS)

Loading…
Cancel
Save