Merge pull request #1442 from placeAtlas/cleanup

Cleanup sync
This commit is contained in:
ash 2023-06-20 16:53:37 +02:00 committed by GitHub
commit 4282edfe54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 404 additions and 278 deletions

View file

@ -12698,3 +12698,31 @@ zznclm
146h2wk
146gz5k
146gkrw
146yzdn
146yvru
146yser
1471tb5
1471rph
1471qfo
1471o1p
1471ip4
1471dvf
1471cbr
1470u17
146z81p
14723rb
1472i30
1472h3h
14735c9
14734h5
1472yax
1472x1x
1472tb5
1473dp8
14738hk
14737ah
1473gnn
147sxfe
147stk6
147spg0
147ktca

View file

@ -31,6 +31,27 @@
for i, entry in enumerate(atlas_json):
atlas_ids[entry['id']] = i
last_existing_id = list(atlas_json[-1]['id'])
for entry in out_json:
if entry['id'] == 0 or entry['id'] == '0':
# "Increment" the last ID to derive a new ID.
current_index = -1
while current_index > -(len(last_existing_id)):
current_char = last_existing_id[current_index]
if current_char == 'z':
last_existing_id[current_index] = '0'
current_index -= 1
else:
if current_char == '9':
current_char = 'a'
else:
current_char = chr(ord(current_char) + 1)
last_existing_id[current_index] = current_char
break
entry['id'] = ''.join(last_existing_id)
for entry in out_json:
if entry['id'] in out_ids:
print(f"Entry {entry['id']} has duplicates! Please resolve this conflict. This will be excluded from the merge.")

View file

@ -109,7 +109,7 @@ function initDraw() {
let lShiftPressed = false
let shiftPressed = false
let highlightUncharted = true
let highlightUncharted = false
renderBackground(atlas)
applyView()

File diff suppressed because one or more lines are too long

View file

@ -274,7 +274,7 @@ <h5>Draw</h5>
<button type="button" class="btn btn-secondary" id="resetButton">Reset</button>
<div class="form-check" id="highlightUnchartedLabel">
<input class="form-check-input" type="checkbox" id="highlightUncharted" checked>
<input class="form-check-input" type="checkbox" id="highlightUncharted">
<label class="form-check-label mb-0" for="highlightUncharted" title="Highlight uncharted areas of the map">
Highlight Empty
</label>