File: expansion_plans_interface.py

package info (click to toggle)
freeorion 0.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 194,940 kB
  • sloc: cpp: 186,508; python: 40,969; ansic: 1,164; xml: 719; makefile: 32; sh: 7
file content (33 lines) | stat: -rw-r--r-- 1,077 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from collections import OrderedDict
from collections.abc import Iterable

from common.fo_typing import PlanetId, SpeciesName
from freeorion_tools.caching import cache_for_current_turn

_the_planner = None


@cache_for_current_turn
def colonies_targeted() -> frozenset[PlanetId]:
    return _the_planner.colonies_targeted()


@cache_for_current_turn
def outposts_targeted() -> frozenset[PlanetId]:
    return _the_planner.outposts_targeted()


def get_colonisable_planet_ids(include_targeted: bool = False) -> OrderedDict[PlanetId, tuple[float, SpeciesName]]:
    return _the_planner.get_colonisable_planet_ids(include_targeted)


def get_colonisable_outpost_ids(include_targeted: bool = False) -> OrderedDict[PlanetId, tuple[float, SpeciesName]]:
    return _the_planner.get_colonisable_outpost_ids(include_targeted)


def update_colonisable_planet_ids(new_list: Iterable) -> None:
    return _the_planner.update_colonisable_planet_ids(new_list)


def update_colonisable_outpost_ids(new_list: Iterable) -> None:
    return _the_planner.update_colonisable_outpost_ids(new_list)