diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-01-25 21:14:23 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-01-25 21:18:15 +0100 |
| commit | 07e8fab6d286a120c1eddbd055c108afcd6e42db (patch) | |
| tree | b3f6b8d160fb36424534469450bfdf33a1766563 | |
| parent | 53deef5232481cbdad8fed060949b4c08196301f (diff) | |
| download | muhqs-game-07e8fab6d286a120c1eddbd055c108afcd6e42db.tar.gz muhqs-game-07e8fab6d286a120c1eddbd055c108afcd6e42db.zip | |
maps: use strip block chomp operator
The YAML strip block chomp operator causes all trailing newlines to
be stripped from the map definition.
| -rw-r--r-- | maps/2P-ring-street.yml | 2 | ||||
| -rw-r--r-- | maps/2P-river-king.yml | 2 | ||||
| -rw-r--r-- | maps/3P-ring-street.yml | 2 | ||||
| -rw-r--r-- | maps/4P-islands.yml | 2 | ||||
| -rw-r--r-- | maps/the-tyrant.yml | 2 | ||||
| -rwxr-xr-x | scripts/generate_map_img.py | 3 |
6 files changed, 6 insertions, 7 deletions
diff --git a/maps/2P-ring-street.yml b/maps/2P-ring-street.yml index ca70147e..18dd5328 100644 --- a/maps/2P-ring-street.yml +++ b/maps/2P-ring-street.yml @@ -1,4 +1,4 @@ -map: |1+ +map: |1- T H HT FSSSSS2H SHSH HS diff --git a/maps/2P-river-king.yml b/maps/2P-river-king.yml index d0dd7ebd..5ef0cca8 100644 --- a/maps/2P-river-king.yml +++ b/maps/2P-river-king.yml @@ -1,4 +1,4 @@ -map: |1+ +map: |1- H HH F T WDFSSSSSH1 WWT STWWH diff --git a/maps/3P-ring-street.yml b/maps/3P-ring-street.yml index 47b9d88f..f8b129c5 100644 --- a/maps/3P-ring-street.yml +++ b/maps/3P-ring-street.yml @@ -1,4 +1,4 @@ -map: |1+ +map: |1- XXXXX F XXXXX XXX 2 XXX XX T XX diff --git a/maps/4P-islands.yml b/maps/4P-islands.yml index c75cbbd8..c2573fbc 100644 --- a/maps/4P-islands.yml +++ b/maps/4P-islands.yml @@ -1,4 +1,4 @@ -map: |1+ +map: |1- WWWWWWWWWWW 4 TWWWWWWWWWWWT 3 HDWWW WWWWWWDH diff --git a/maps/the-tyrant.yml b/maps/the-tyrant.yml index 49c1a0a3..8b83c6ab 100644 --- a/maps/the-tyrant.yml +++ b/maps/the-tyrant.yml @@ -1,4 +1,4 @@ -map: |1+ +map: |1- HF HH H H SSH HTWT HHH SH$SSSG1GSSS$H diff --git a/scripts/generate_map_img.py b/scripts/generate_map_img.py index 0605cbd8..254581f2 100755 --- a/scripts/generate_map_img.py +++ b/scripts/generate_map_img.py @@ -232,8 +232,7 @@ def generate_img(map_path: pathlib.Path): with open(map_path, 'r', encoding="utf8") as map_file: map_definition = yaml.full_load(map_file) - # remove the trailing new line - map_string = map_definition['map'][:-1] + map_string = map_definition['map'] # ensure that all keys are actually strings symbols = {str(k): v for k, v in map_definition['symbols'].items()} |
