Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port TG Tooling Fix in MapMerge #5527

Merged
merged 2 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/UpdatePaths/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
property = @UNSET - will apply the rule only if the property is not mapedited
"""

default_map_directory = "../maps"
default_map_directory = "../../maps"
replacement_re = re.compile(r'\s*(?P<path>[^{]*)\s*(\{(?P<props>.*)\})?')

#urgent todo: replace with actual parser, this is slow as janitor in crit
Expand Down
2 changes: 1 addition & 1 deletion tools/mapmerge2/dmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def _presave_checks(self):
# last-second handling of bogus keys to help prevent and fix broken maps
self._ensure_free_keys(0)
max_key = max_key_for(self.key_length)
bad_keys = {key: 0 for key in self.dictionary.keys() if key > max_key}
bad_keys = {key: 0 for key in self.dictionary.keys() if key >= max_key}
if bad_keys:
print(f"Warning: fixing {len(bad_keys)} overflowing keys")
for k in bad_keys:
Expand Down
Loading