aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-01-25 21:14:23 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2023-01-25 21:18:15 +0100
commit07e8fab6d286a120c1eddbd055c108afcd6e42db (patch)
treeb3f6b8d160fb36424534469450bfdf33a1766563 /scripts
parent53deef5232481cbdad8fed060949b4c08196301f (diff)
downloadmuhqs-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.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/generate_map_img.py3
1 files changed, 1 insertions, 2 deletions
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()}