Skip to content

Commit

Permalink
Including these changes
Browse files Browse the repository at this point in the history
Not sure if it will break without them...
  • Loading branch information
Daggertail committed Feb 8, 2022
1 parent 6151920 commit 75a12b8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/mapmerge2/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion tools/mapmerge2/dmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tools/mapmerge2/fixup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit 75a12b8

Please sign in to comment.