mirror of
https://github.com/enzet/map-machine.git
synced 2025-04-29 18:27:19 +02:00
Issue #13: add --country argument.
This commit is contained in:
parent
34d7ae0dbc
commit
8aadb79f62
3 changed files with 7 additions and 1 deletions
|
@ -69,6 +69,7 @@ class MapConfiguration:
|
|||
options.level,
|
||||
options.seed,
|
||||
options.show_tooltips,
|
||||
options.country,
|
||||
)
|
||||
|
||||
def is_wireframe(self) -> bool:
|
||||
|
|
|
@ -97,7 +97,6 @@ def match_location(restrictions: dict[str, str], country: str) -> bool:
|
|||
if (
|
||||
"include" in restrictions
|
||||
and restrictions["include"] != "world"
|
||||
and country != "world"
|
||||
and country not in restrictions["include"]
|
||||
):
|
||||
return False
|
||||
|
|
|
@ -120,6 +120,12 @@ def add_map_arguments(parser: argparse.ArgumentParser) -> None:
|
|||
action=argparse.BooleanOptionalAction,
|
||||
default=False,
|
||||
)
|
||||
parser.add_argument(
|
||||
"--country",
|
||||
help="two-letter code (ISO 3166-1 alpha-2) of country, that should be "
|
||||
"used for location restrictions",
|
||||
default="world",
|
||||
)
|
||||
|
||||
|
||||
def add_tile_arguments(parser: argparse.ArgumentParser) -> None:
|
||||
|
|
Loading…
Add table
Reference in a new issue