Browse Source

Add destinations

main
Noëlle 1 year ago
parent
commit
a207942051
No known key found for this signature in database
2 changed files with 665 additions and 35 deletions
  1. 641
    13
      destinations.py
  2. 24
    22
      swjg.py

+ 641
- 13
destinations.py View File

@@ -3,13 +3,37 @@ from typing import NamedTuple


class DestinationType(Enum):
STATION = 1
TEMPERATE_WORLD = 2
DESERT_WORLD = 3
FROZEN_WORLD = 4
JUNGLE_WORLD = 5
OCEAN_WORLD = 6
ASTEROID = 7
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):
@@ -17,19 +41,623 @@ class Destination(NamedTuple):
system: str | None
sector: str | None
type: DestinationType
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=Destination.DESERT_WORLD),
Destination(name="Agamar", sector="Outer Rim", type=Destination.DESERT_WORLD),
Destination(
name="Ajan Kloss",
sector="Outer Rim",
type=Destination.JUNGLE_WORLD,
is_moon=True,
),
Destination(name="Akiva", sector="Outer Rim", type=Destination.JUNGLE_WORLD),
Destination(
name="Alderaan", sector="Core Worlds", type=Destination.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="Chandrila", sector="Core Worlds", type=Destination.TEMPERATE_WORLD
),
Destination(
name="Christophsis",
system="Christoph",
sector="Outer Rim",
type=Destination.FOREST_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="D'Qar",
system="Ileenium",
sector="Outer Rim",
type=Destination.JUNGLE_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="Forest Moon",
system="Endor",
sector="Outer Rim",
type=Destination.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="Esseles",
system="Essesia",
sector="Core Worlds",
type=Destination.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="Hosnian Prime",
system="Hosnian",
sector="Core Worlds",
type=Destination.CITY_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="Jedha", sector="Mid Rim", type=Destination.DESERT_WORLD, is_moon=True
),
Destination(name="Jelucan", sector="Outer Rim", type=Destination.MOUNTAIN_WORLD),
Destination(
name="Jestefad",
system="Mustafar",
sector="Outer Rim",
type=Destination.GAS_WORLD,
),
Destination(name="Kamino", sector="Outer Rim", type=Destination.OCEAN_WORLD),
Destination(name="Kashyyyk", sector="Mid Rim", type=Destination.FOREST_WORLD),
Destination(
name="Kef Bir",
system="Endor",
sector="Outer Rim",
type=Destination.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="Mimban",
system="Circarpous",
sector="Expansion Region",
type=Destination.JUNGLE_WORLD,
),
Destination(
name="Mon Cala",
system="Mon Calamari",
sector="Outer Rim",
type=Destination.OCEAN_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="Numidian Prime",
system="Numidian",
sector="Mid Rim",
type=Destination.JUNGLE_WORLD,
),
Destination(
name="Nur",
system="Mustafar",
sector="Outer Rim",
type=Destination.OCEAN_WORLD,
is_moon=True,
),
Destination(
name="Onderon",
system="Japrael",
sector="Inner Rim",
type=Destination.JUNGLE_WORLD,
),
Destination(
name="Ord Mantell",
system="Bright Jewel",
sector="Mid Rim",
type=Destination.TEMPERATE_WORLD,
),
Destination(
name="Ossus",
system="Adega",
sector="Outer Rim",
type=Destination.TEMPERATE_WORLD,
),
Destination(
name="Pasaana",
system="Middian",
sector="Expansion Region",
type=Destination.DESERT_WORLD,
),
Destination(
name="Pillio",
system="Jinata",
sector="Core Worlds",
type=Destination.OCEAN_WORLD,
),
Destination(name="Rishi", sector="Outer Rim", type=Destination.JUNGLE_WORLD),
Destination(
name="Rodia", system="Tyrius", sector="Outer Rim", type=Destination.JUNGLE_WORLD
),
Destination(
name="Rugosa", sector="Outer Rim", type=Destination.OCEAN_WORLD, is_moon=True
),
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
),
Destination(
name="Sissubo",
system="Chandrila",
sector="Core Worlds",
type=Destination.FROZEN_WORLD,
),
Destination(name="Skako", sector="Core Worlds", type=Destination.CITY_WORLD),
Destination(
name="Skako Minor",
system="Skako",
sector="Core Worlds",
type=Destination.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="Tatooine",
system="Tatoo",
sector="Outer Rim",
type=Destination.DESERT_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,
),
Destination(
name="Umbara", sector="Expansion Region", type=Destination.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,
),
Destination(
name="Alderaan",
system=None,
name="Vardos",
system="Jinata",
sector="Core Worlds",
type=DestinationType.TEMPERATE_WORLD,
type=Destination.MOUNTAIN_WORLD,
),
Destination(name="Wobani", sector="Mid Rim", type=Destination.BROKEN_WORLD),
Destination(name="Wrea", sector="Outer Rim", type=Destination.OCEAN_WORLD),
Destination(
name="Tattooine",
system=None,
name="Yavin Prime",
system="Yavin",
sector="Outer Rim",
type=DestinationType.DESERT_WORLD,
type=Destination.GAS_WORLD,
),
Destination(
name="Yavin 4",
system="Yavin",
sector="Outer Rim",
type=Destination.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="Nar Shaddaa",
system="Hutta",
sector="Outer Rim",
type=Destination.CITY_WORLD,
is_moon=True,
),
Destination(
name="Wasskah",
system="Kashyyyk",
sector="Mid Rim",
type=Destination.FOREST_WORLD,
is_moon=True,
),
Destination(
name="Abregado-rae",
system="Abregado",
sector="Core Worlds",
type=Destination.TEMPERATE_WORLD,
is_legends=True,
),
Destination(
name="Ambria",
sector="Inner Rim",
type=Destination.DESERT_WORLD,
is_legends=True,
),
Destination(
name="Anoth",
sector="Wild Space",
type=Destination.BROKEN_WORLD,
is_legends=True,
),
Destination(
name="Arkania",
system="Perave",
sector="Colonies",
type=Destination.FROZEN_WORLD,
is_legends=True,
),
Destination(
name="Bakura",
sector="Wild Space",
type=Destination.TEMPERATE_WORLD,
is_legends=True,
),
Destination(
name="Bonadan",
sector="Outer Rim",
type=Destination.BROKEN_WORLD,
is_legends=True,
),
Destination(
name="Borleias",
system="Pyria",
sector="Colonies",
type=Destination.JUNGLE_WORLD,
is_legends=True,
),
Destination(
name="Ord Carida",
system="Carida",
sector="Colonies",
type=Destination.TEMPERATE_WORLD,
is_legends=True,
),
Destination(
name="Da Soocha V",
system="Cyax",
sector="Outer Rim",
type=Destination.MOUNTAIN_WORLD,
is_moon=True,
is_legends=True,
),
Destination(
name="Drall",
system="Corellian",
sector="Core Worlds",
type=Destination.TEMPERATE_WORLD,
is_legends=True,
),
Destination(
name="Dromund Kaas",
system="Dromund",
sector="Outer Rim",
type=Destination.JUNGLE_WORLD,
is_legends=True,
),
Destination(
name="Dxun",
system="Japrael",
sector="Inner Rim",
type=Destination.JUNGLE_WORLD,
is_moon=True,
is_legends=True,
),
Destination(
name="Hapes",
sector="Inner Rim",
type=Destination.TEMPERATE_WORLD,
is_legends=True,
),
Destination(
name="Ithor",
system="Ottega",
sector="Inner Rim",
type=Destination.TEMPERATE_WORLD,
is_legends=True,
),
Destination(
name="J't'p'tan",
system="Doornik-628",
sector="Core Worlds",
type=Destination.TEMPERATE_WORLD,
is_legends=True,
),
Destination(
name="Khomm", sector="Deep Core", type=Destination.OCEAN_WORLD, is_legends=True
),
Destination(
name="Kothlis", sector="Mid Rim", type=Destination.OCEAN_WORLD, is_legends=True
),
Destination(
name="Muunilinst",
sector="Outer Rim",
type=Destination.TEMPERATE_WORLD,
is_legends=True,
),
Destination(
name="Myrkr", sector="Inner Rim", type=Destination.FOREST_WORLD, is_legends=True
),
Destination(
name="N'zoth",
sector="Core Worlds",
type=Destination.DESERT_WORLD,
is_legends=True,
),
Destination(
name="Nkllon",
system="Athega",
sector="Expansion Region",
type=Destination.DESERT_WORLD,
is_legends=True,
),
Destination(
name="Ralltiir",
sector="Core Worlds",
type=Destination.TEMPERATE_WORLD,
is_legends=True,
),
Destination(
name="Sacorria",
sector="Core Worlds",
type=Destination.TEMPERATE_WORLD,
is_legends=True,
),
Destination(
name="Selonia",
system="Corellian",
sector="Core Worlds",
type=Destination.OCEAN_WORLD,
is_legends=True,
),
Destination(
name="Thyferra",
system="Polith",
sector="Inner Rim",
type=Destination.JUNGLE_WORLD,
is_legends=True,
),
Destination(
name="Toprawa",
sector="Outer Rim",
type=Destination.FOREST_WORLD,
is_legends=True,
),
Destination(
name="Vortex",
system="Ten Tempests",
sector="Mid Rim",
type=Destination.FROZEN_WORLD,
is_legends=True,
),
Destination(
name="Wayland",
sector="Outer Rim",
type=Destination.JUNGLE_WORLD,
is_legends=True,
),
Destination(
name="Belsavis",
sector="Outer Rim",
type=Destination.FROZEN_WORLD,
is_legends=True,
),
Destination(
name="Balmorra",
sector="Colonies",
type=Destination.TEMPERATE_WORLD,
is_legends=True,
),
]

+ 24
- 22
swjg.py View File

@@ -7,7 +7,7 @@ from typing import NamedTuple
from jinja2 import Environment, PackageLoader, select_autoescape

import items
from destinations import DESTINATIONS, Destination
from destinations import DESTINATIONS, SYSTEMS, Destination, DestinationType

# global variables

@@ -33,24 +33,12 @@ def get_destination_type_from_enum(destination):
dtype_name = dtype._name_
dtype_name_lower = dtype_name.lower()
dtype_name_nou = dtype_name_lower.replace("_", " ")
return dtype_name_nou


class DangerLevel(Enum):
NONE = 1
LOW = 2
MODERATE = 3
HIGH = 4
EXTREME = 5


class DangerType(Enum):
HOSTILE = 1
AT_WAR = 2
DESERT = 3
JUNGLE = 4
OCEAN = 5
ATMOSPHERE = 6
if dtype_name_nou[0] in ["a", "e", "i", "o", "u"]:
# it's only "asteroid" and "ocean" now but it might expand
dtype_name_final = "an " + dtype_name_nou
else:
dtype_name_final = "a " + dtype_name_nou
return dtype_name_final


# Class definitions
@@ -58,7 +46,7 @@ class DangerType(Enum):

class Mission:
output_destination_template = Template(
"to $world, a $destination_type in the $system system"
"to $world $destination_type in the $system system"
)
output_sector_template = Template(", part of the $sector,")
value_template = Template("for $value credits")
@@ -88,7 +76,7 @@ class Mission:

def get_current_values(self) -> dict:
return {
"world": self.world,
"world": self.world + "," if self.world != "" else "",
"system": self.system,
"sector": self.sector,
"destination_type": self.destination_type,
@@ -208,7 +196,21 @@ def main():
missions = []
for _ in range(5):
current_mission = random.choice(mission_types)
destination = random.choice(DESTINATIONS)
dest_type = random.randint(1, 5)
if dest_type < 3: # world, 40% chance
destination = random.choice(DESTINATIONS)
else:
system = random.choice(SYSTEMS)
destination = Destination(
name="",
system=system[0],
sector=system[1],
type=(
DestinationType.STATION
if random.randint(0, 1) == 0
else DestinationType.ASTEROID_BASE
),
)
item, time, tons, number, value, group = [None] * 6
if current_mission == CargoMission:
current_item = random.choice(items.ITEMS)

Loading…
Cancel
Save