From 75a12b8e1b6eea2f16e7d010405124375f1c839a Mon Sep 17 00:00:00 2001 From: Daggertail Date: Tue, 8 Feb 2022 00:31:07 -0600 Subject: [PATCH] Including these changes Not sure if it will break without them... --- tools/mapmerge2/convert.py | 2 +- tools/mapmerge2/dmm.py | 2 +- tools/mapmerge2/fixup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/mapmerge2/convert.py b/tools/mapmerge2/convert.py index 35fa606834c3..63fe8cbb9a01 100755 --- a/tools/mapmerge2/convert.py +++ b/tools/mapmerge2/convert.py @@ -4,4 +4,4 @@ if __name__ == '__main__': settings = frontend.read_settings() for fname in frontend.process(settings, "convert"): - dmm.DMM.from_file(fname).to_file(fname, settings.tgm) + dmm.DMM.from_file(fname).to_file(fname, tgm = settings.tgm) diff --git a/tools/mapmerge2/dmm.py b/tools/mapmerge2/dmm.py index 2d87cfc17244..453cdf5c8af5 100755 --- a/tools/mapmerge2/dmm.py +++ b/tools/mapmerge2/dmm.py @@ -58,7 +58,7 @@ def set_tile(self, coord, tile): self.grid[coord] = self.get_or_generate_key(tile) def generate_new_key(self): - free_keys = self._ensure_free_keys(1) + self._ensure_free_keys(1) max_key = max_key_for(self.key_length) # choose one of the free keys at random key = random.randint(0, max_key - 1) diff --git a/tools/mapmerge2/fixup.py b/tools/mapmerge2/fixup.py index f3133d1d7306..6953e7ab7782 100644 --- a/tools/mapmerge2/fixup.py +++ b/tools/mapmerge2/fixup.py @@ -96,7 +96,7 @@ def main(repo): converted[path] = merge_map(head_files[path], dmm.DMM.from_bytes(data)) if len(working_commit.parents) != 1: print("A merge commit was encountered before good versions of these maps were found:") - print("\n".join(f" {x}" for x in head_files.keys() - base_files.keys())) + print("\n".join(f" {x}" for x in head_files.keys() - converted.keys())) return 1 working_commit = working_commit.parents[0]