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



class Destination(NamedTuple): class Destination(NamedTuple):
name: str name: str
system: str | None
sector: str | None
type: DestinationType type: DestinationType
system: str | None = None
sector: str | None = None
danger: tuple | None = None danger: tuple | None = None
is_moon: bool = False is_moon: bool = False
is_legends: bool = False is_legends: bool = False
] ]


DESTINATIONS = [ 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( Destination(
name="Ajan Kloss", name="Ajan Kloss",
sector="Outer Rim", sector="Outer Rim",
type=Destination.JUNGLE_WORLD,
type=DestinationType.JUNGLE_WORLD,
is_moon=True, is_moon=True,
), ),
Destination(name="Akiva", sector="Outer Rim", type=Destination.JUNGLE_WORLD),
Destination(name="Akiva", sector="Outer Rim", type=DestinationType.JUNGLE_WORLD),
Destination( 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( 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( Destination(
name="Christophsis", name="Christophsis",
system="Christoph", system="Christoph",
sector="Outer Rim", 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( Destination(
name="D'Qar", name="D'Qar",
system="Ileenium", system="Ileenium",
sector="Outer Rim", 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( Destination(
name="Forest Moon", name="Forest Moon",
system="Endor", system="Endor",
sector="Outer Rim", sector="Outer Rim",
type=Destination.FOREST_WORLD,
type=DestinationType.FOREST_WORLD,
is_moon=True, 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( Destination(
name="Esseles", name="Esseles",
system="Essesia", system="Essesia",
sector="Core Worlds", 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( Destination(
name="Hosnian Prime", name="Hosnian Prime",
system="Hosnian", system="Hosnian",
sector="Core Worlds", 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( 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( Destination(
name="Jestefad", name="Jestefad",
system="Mustafar", system="Mustafar",
sector="Outer Rim", 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( Destination(
name="Kef Bir", name="Kef Bir",
system="Endor", system="Endor",
sector="Outer Rim", sector="Outer Rim",
type=Destination.OCEAN_WORLD,
type=DestinationType.OCEAN_WORLD,
is_moon=True, 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( Destination(
name="Mimban", name="Mimban",
system="Circarpous", system="Circarpous",
sector="Expansion Region", sector="Expansion Region",
type=Destination.JUNGLE_WORLD,
type=DestinationType.JUNGLE_WORLD,
), ),
Destination( Destination(
name="Mon Cala", name="Mon Cala",
system="Mon Calamari", system="Mon Calamari",
sector="Outer Rim", 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( Destination(
name="Numidian Prime", name="Numidian Prime",
system="Numidian", system="Numidian",
sector="Mid Rim", sector="Mid Rim",
type=Destination.JUNGLE_WORLD,
type=DestinationType.JUNGLE_WORLD,
), ),
Destination( Destination(
name="Nur", name="Nur",
system="Mustafar", system="Mustafar",
sector="Outer Rim", sector="Outer Rim",
type=Destination.OCEAN_WORLD,
type=DestinationType.OCEAN_WORLD,
is_moon=True, is_moon=True,
), ),
Destination( Destination(
name="Onderon", name="Onderon",
system="Japrael", system="Japrael",
sector="Inner Rim", sector="Inner Rim",
type=Destination.JUNGLE_WORLD,
type=DestinationType.JUNGLE_WORLD,
), ),
Destination( Destination(
name="Ord Mantell", name="Ord Mantell",
system="Bright Jewel", system="Bright Jewel",
sector="Mid Rim", sector="Mid Rim",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
), ),
Destination( Destination(
name="Ossus", name="Ossus",
system="Adega", system="Adega",
sector="Outer Rim", sector="Outer Rim",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
), ),
Destination( Destination(
name="Pasaana", name="Pasaana",
system="Middian", system="Middian",
sector="Expansion Region", sector="Expansion Region",
type=Destination.DESERT_WORLD,
type=DestinationType.DESERT_WORLD,
), ),
Destination( Destination(
name="Pillio", name="Pillio",
system="Jinata", system="Jinata",
sector="Core Worlds", 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( 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( 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( Destination(
name="Shili", sector="Expansion Region", type=Destination.TEMPERATE_WORLD
name="Shili", sector="Expansion Region", type=DestinationType.TEMPERATE_WORLD
), ),
Destination( Destination(
name="Sissubo", name="Sissubo",
system="Chandrila", system="Chandrila",
sector="Core Worlds", 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( Destination(
name="Skako Minor", name="Skako Minor",
system="Skako", system="Skako",
sector="Core Worlds", 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( Destination(
name="Tatooine", name="Tatooine",
system="Tatoo", system="Tatoo",
sector="Outer Rim", 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( Destination(
name="Trandosha", name="Trandosha",
system="Kashyyyk", system="Kashyyyk",
sector="Mid Rim", sector="Mid Rim",
type=Destination.FOREST_WORLD,
type=DestinationType.FOREST_WORLD,
),
Destination(
name="Umbara", sector="Expansion Region", type=DestinationType.TEMPERATE_WORLD
), ),
Destination( 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( Destination(
name="Vandor-1", name="Vandor-1",
system="Coruscant", system="Coruscant",
sector="Core Worlds", sector="Core Worlds",
type=Destination.FROZEN_WORLD,
type=DestinationType.FROZEN_WORLD,
), ),
Destination( Destination(
name="Vardos", name="Vardos",
system="Jinata", system="Jinata",
sector="Core Worlds", 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( Destination(
name="Yavin Prime", name="Yavin Prime",
system="Yavin", system="Yavin",
sector="Outer Rim", sector="Outer Rim",
type=Destination.GAS_WORLD,
type=DestinationType.GAS_WORLD,
), ),
Destination( Destination(
name="Yavin 4", name="Yavin 4",
system="Yavin", system="Yavin",
sector="Outer Rim", sector="Outer Rim",
type=Destination.JUNGLE_WORLD,
type=DestinationType.JUNGLE_WORLD,
is_moon=True, 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( Destination(
name="Nar Shaddaa", name="Nar Shaddaa",
system="Hutta", system="Hutta",
sector="Outer Rim", sector="Outer Rim",
type=Destination.CITY_WORLD,
type=DestinationType.CITY_WORLD,
is_moon=True, is_moon=True,
), ),
Destination( Destination(
name="Wasskah", name="Wasskah",
system="Kashyyyk", system="Kashyyyk",
sector="Mid Rim", sector="Mid Rim",
type=Destination.FOREST_WORLD,
type=DestinationType.FOREST_WORLD,
is_moon=True, is_moon=True,
), ),
Destination( Destination(
name="Abregado-rae", name="Abregado-rae",
system="Abregado", system="Abregado",
sector="Core Worlds", sector="Core Worlds",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Ambria", name="Ambria",
sector="Inner Rim", sector="Inner Rim",
type=Destination.DESERT_WORLD,
type=DestinationType.DESERT_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Anoth", name="Anoth",
sector="Wild Space", sector="Wild Space",
type=Destination.BROKEN_WORLD,
type=DestinationType.BROKEN_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Arkania", name="Arkania",
system="Perave", system="Perave",
sector="Colonies", sector="Colonies",
type=Destination.FROZEN_WORLD,
type=DestinationType.FROZEN_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Bakura", name="Bakura",
sector="Wild Space", sector="Wild Space",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Bonadan", name="Bonadan",
sector="Outer Rim", sector="Outer Rim",
type=Destination.BROKEN_WORLD,
type=DestinationType.BROKEN_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Borleias", name="Borleias",
system="Pyria", system="Pyria",
sector="Colonies", sector="Colonies",
type=Destination.JUNGLE_WORLD,
type=DestinationType.JUNGLE_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Ord Carida", name="Ord Carida",
system="Carida", system="Carida",
sector="Colonies", sector="Colonies",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Da Soocha V", name="Da Soocha V",
system="Cyax", system="Cyax",
sector="Outer Rim", sector="Outer Rim",
type=Destination.MOUNTAIN_WORLD,
type=DestinationType.MOUNTAIN_WORLD,
is_moon=True, is_moon=True,
is_legends=True, is_legends=True,
), ),
name="Drall", name="Drall",
system="Corellian", system="Corellian",
sector="Core Worlds", sector="Core Worlds",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Dromund Kaas", name="Dromund Kaas",
system="Dromund", system="Dromund",
sector="Outer Rim", sector="Outer Rim",
type=Destination.JUNGLE_WORLD,
type=DestinationType.JUNGLE_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Dxun", name="Dxun",
system="Japrael", system="Japrael",
sector="Inner Rim", sector="Inner Rim",
type=Destination.JUNGLE_WORLD,
type=DestinationType.JUNGLE_WORLD,
is_moon=True, is_moon=True,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Hapes", name="Hapes",
sector="Inner Rim", sector="Inner Rim",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Ithor", name="Ithor",
system="Ottega", system="Ottega",
sector="Inner Rim", sector="Inner Rim",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="J't'p'tan", name="J't'p'tan",
system="Doornik-628", system="Doornik-628",
sector="Core Worlds", sector="Core Worlds",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( 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( 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( Destination(
name="Muunilinst", name="Muunilinst",
sector="Outer Rim", sector="Outer Rim",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( 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( Destination(
name="N'zoth", name="N'zoth",
sector="Core Worlds", sector="Core Worlds",
type=Destination.DESERT_WORLD,
type=DestinationType.DESERT_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Nkllon", name="Nkllon",
system="Athega", system="Athega",
sector="Expansion Region", sector="Expansion Region",
type=Destination.DESERT_WORLD,
type=DestinationType.DESERT_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Ralltiir", name="Ralltiir",
sector="Core Worlds", sector="Core Worlds",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Sacorria", name="Sacorria",
sector="Core Worlds", sector="Core Worlds",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Selonia", name="Selonia",
system="Corellian", system="Corellian",
sector="Core Worlds", sector="Core Worlds",
type=Destination.OCEAN_WORLD,
type=DestinationType.OCEAN_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Thyferra", name="Thyferra",
system="Polith", system="Polith",
sector="Inner Rim", sector="Inner Rim",
type=Destination.JUNGLE_WORLD,
type=DestinationType.JUNGLE_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Toprawa", name="Toprawa",
sector="Outer Rim", sector="Outer Rim",
type=Destination.FOREST_WORLD,
type=DestinationType.FOREST_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Vortex", name="Vortex",
system="Ten Tempests", system="Ten Tempests",
sector="Mid Rim", sector="Mid Rim",
type=Destination.FROZEN_WORLD,
type=DestinationType.FROZEN_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Wayland", name="Wayland",
sector="Outer Rim", sector="Outer Rim",
type=Destination.JUNGLE_WORLD,
type=DestinationType.JUNGLE_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Belsavis", name="Belsavis",
sector="Outer Rim", sector="Outer Rim",
type=Destination.FROZEN_WORLD,
type=DestinationType.FROZEN_WORLD,
is_legends=True, is_legends=True,
), ),
Destination( Destination(
name="Balmorra", name="Balmorra",
sector="Colonies", sector="Colonies",
type=Destination.TEMPERATE_WORLD,
type=DestinationType.TEMPERATE_WORLD,
is_legends=True, is_legends=True,
), ),
] ]

+ 23
- 9
swjg.py View File

output.append(template.substitute(**current_values)) output.append(template.substitute(**current_values))
out_text = " ".join(output) out_text = " ".join(output)
out_text = out_text.replace(" ,", ",") out_text = out_text.replace(" ,", ",")
out_text = out_text.replace(" ", " ") # template issue
out_text += "." out_text += "."
return out_text return out_text




class PassengerMission(Mission): 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): def __init__(self, number: int, *args, **kwargs):
super(PassengerMission, self).__init__(*args, **kwargs) super(PassengerMission, self).__init__(*args, **kwargs)


def get_current_values(self) -> dict: def get_current_values(self) -> dict:
base_dict = super(PassengerMission, self).get_current_values() 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) base_dict.update(new_dict)
return base_dict return base_dict






class CargoMission(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") output_time_timeplate = Template("in the next $time days")


def __init__(self, tons: int, item: str, time: int | None, *args, **kwargs): def __init__(self, tons: int, item: str, time: int | None, *args, **kwargs):
self.tons = tons self.tons = tons
self.item = item self.item = item
self.time = time self.time = time
if self.tons == 1:
self.plural = ""
else:
self.plural = "s"


def get_current_values(self) -> dict: def get_current_values(self) -> dict:
base_dict = super(CargoMission, self).get_current_values() 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) base_dict.update(new_dict)
return base_dict return base_dict






class GroupMission(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): def __init__(self, number: int, group: str, *args, **kwargs):
super(GroupMission, self).__init__(*args, **kwargs) super(GroupMission, self).__init__(*args, **kwargs)


def get_current_values(self) -> dict: def get_current_values(self) -> dict:
base_dict = super(GroupMission, self).get_current_values() 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) base_dict.update(new_dict)
return base_dict return base_dict


def main(): def main():
import random import random


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

Loading…
Cancel
Save