Skip to content
This repository has been archived by the owner on Sep 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #43628 from AutomaticFrenzy/patch/minskystation
Browse files Browse the repository at this point in the history
Fix mapmerge misreading maps with two columns per block
  • Loading branch information
optimumtact authored Apr 16, 2019
2 parents 7aaa95a + 48b42a9 commit 67526b0
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions tools/mapmerge2/dmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def _parse(map_raw_text):
in_map_block = False
in_coord_block = False
in_map_string = False
iter_x = 0
base_x = 0
adjust_y = True

curr_num = ""
Expand Down Expand Up @@ -487,7 +487,7 @@ def _parse(map_raw_text):
curr_x = int(curr_num)
if curr_x > maxx:
maxx = curr_x
iter_x = 0
base_x = curr_x
curr_num = ""
reading_coord = "y"
elif reading_coord == "y":
Expand Down Expand Up @@ -521,21 +521,15 @@ def _parse(map_raw_text):
adjust_y = False
else:
curr_y += 1
if curr_x > maxx:
maxx = curr_x
if iter_x > 1:
curr_x = 1
iter_x = 0

curr_x = base_x
else:
curr_key = BASE * curr_key + base52_r[char]
curr_key_len += 1
if curr_key_len == key_length:
iter_x += 1
if iter_x > 1:
curr_x += 1

grid[curr_x, curr_y, curr_z] = duplicate_keys.get(curr_key, curr_key)
if curr_x > maxx:
maxx = curr_x
curr_x += 1
curr_key = 0
curr_key_len = 0

Expand Down

0 comments on commit 67526b0

Please sign in to comment.