-
Notifications
You must be signed in to change notification settings - Fork 707
fix literally 2 pixels in the river #2497
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
Open
wjdunlop
wants to merge
2
commits into
openfrontio:main
Choose a base branch
from
wjdunlop:fix-the-river-wasn't-rendering
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,158 +1,227 @@ | ||
| { | ||
| "map": { | ||
| "height": 1396, | ||
| "num_land_tiles": 933706, | ||
| "num_land_tiles": 933664, | ||
| "width": 2000 | ||
| }, | ||
| "map16x": { | ||
| "height": 349, | ||
| "num_land_tiles": 55009, | ||
| "num_land_tiles": 54999, | ||
| "width": 500 | ||
| }, | ||
| "map4x": { | ||
| "height": 698, | ||
| "num_land_tiles": 228914, | ||
| "num_land_tiles": 228894, | ||
| "width": 1000 | ||
| }, | ||
| "name": "Britannia", | ||
| "nations": [ | ||
| { | ||
| "coordinates": [960, 1258], | ||
| "coordinates": [ | ||
| 960, | ||
| 1258 | ||
| ], | ||
| "flag": "1_Dumnonia", | ||
| "name": "Dumnonia", | ||
| "strength": 1 | ||
| }, | ||
| { | ||
| "coordinates": [918, 1088], | ||
| "coordinates": [ | ||
| 918, | ||
| 1088 | ||
| ], | ||
| "flag": "1_Dyfed", | ||
| "name": "Dyfed", | ||
| "strength": 1 | ||
| }, | ||
| { | ||
| "coordinates": [1114, 1108], | ||
| "coordinates": [ | ||
| 1114, | ||
| 1108 | ||
| ], | ||
| "flag": "1_Gwent", | ||
| "name": "Gwent", | ||
| "strength": 1 | ||
| }, | ||
| { | ||
| "coordinates": [1048, 936], | ||
| "coordinates": [ | ||
| 1048, | ||
| 936 | ||
| ], | ||
| "flag": "1_Gwynedd", | ||
| "name": "Gwynedd", | ||
| "strength": 2 | ||
| }, | ||
| { | ||
| "coordinates": [1108, 986], | ||
| "coordinates": [ | ||
| 1108, | ||
| 986 | ||
| ], | ||
| "flag": "1_Powys", | ||
| "name": "Powys", | ||
| "strength": 2 | ||
| }, | ||
| { | ||
| "coordinates": [952, 536], | ||
| "coordinates": [ | ||
| 952, | ||
| 536 | ||
| ], | ||
| "flag": "1_Strathclyde", | ||
| "name": "Strathclyde", | ||
| "strength": 2 | ||
| }, | ||
| { | ||
| "coordinates": [748, 556], | ||
| "coordinates": [ | ||
| 748, | ||
| 556 | ||
| ], | ||
| "flag": "1_Dalriata", | ||
| "name": "Dalriata", | ||
| "strength": 1 | ||
| }, | ||
| { | ||
| "coordinates": [1228, 1176], | ||
| "coordinates": [ | ||
| 1228, | ||
| 1176 | ||
| ], | ||
| "flag": "1_Wessex", | ||
| "name": "Wessex", | ||
| "strength": 3 | ||
| }, | ||
| { | ||
| "coordinates": [1442, 1226], | ||
| "coordinates": [ | ||
| 1442, | ||
| 1226 | ||
| ], | ||
| "flag": "1_Sussex", | ||
| "name": "Sussex", | ||
| "strength": 1 | ||
| }, | ||
| { | ||
| "coordinates": [1600, 1188], | ||
| "coordinates": [ | ||
| 1600, | ||
| 1188 | ||
| ], | ||
| "flag": "1_Kent", | ||
| "name": "Kent", | ||
| "strength": 2 | ||
| }, | ||
| { | ||
| "coordinates": [1621, 1085], | ||
| "coordinates": [ | ||
| 1621, | ||
| 1085 | ||
| ], | ||
| "flag": "1_Essex", | ||
| "name": "Essex", | ||
| "strength": 1 | ||
| }, | ||
| { | ||
| "coordinates": [1707, 1018], | ||
| "coordinates": [ | ||
| 1707, | ||
| 1018 | ||
| ], | ||
| "flag": "1_East Anglia", | ||
| "name": "East Anglia", | ||
| "strength": 2 | ||
| }, | ||
| { | ||
| "coordinates": [1370, 1002], | ||
| "coordinates": [ | ||
| 1370, | ||
| 1002 | ||
| ], | ||
| "flag": "1_Mercia", | ||
| "name": "Mercia", | ||
| "strength": 3 | ||
| }, | ||
| { | ||
| "coordinates": [1298, 724], | ||
| "coordinates": [ | ||
| 1298, | ||
| 724 | ||
| ], | ||
| "flag": "1_Northumbria", | ||
| "name": "Northumbria", | ||
| "strength": 2 | ||
| }, | ||
| { | ||
| "coordinates": [962, 366], | ||
| "coordinates": [ | ||
| 962, | ||
| 366 | ||
| ], | ||
| "flag": "1_Fortriu", | ||
| "name": "Fortriu", | ||
| "strength": 2 | ||
| }, | ||
| { | ||
| "coordinates": [272, 1041], | ||
| "coordinates": [ | ||
| 272, | ||
| 1041 | ||
| ], | ||
| "flag": "1_Munster", | ||
| "name": "Munster", | ||
| "strength": 2 | ||
| }, | ||
| { | ||
| "coordinates": [264, 830], | ||
| "coordinates": [ | ||
| 264, | ||
| 830 | ||
| ], | ||
| "flag": "1_Connacht", | ||
| "name": "Connacht", | ||
| "strength": 2 | ||
| }, | ||
| { | ||
| "coordinates": [608, 975], | ||
| "coordinates": [ | ||
| 608, | ||
| 975 | ||
| ], | ||
| "flag": "1_Laigin", | ||
| "name": "Laigin", | ||
| "strength": 2 | ||
| }, | ||
| { | ||
| "coordinates": [564, 845], | ||
| "coordinates": [ | ||
| 564, | ||
| 845 | ||
| ], | ||
| "flag": "1_Southern Ui Neill", | ||
| "name": "Southern Uí Néill", | ||
| "strength": 3 | ||
| }, | ||
| { | ||
| "coordinates": [639, 680], | ||
| "coordinates": [ | ||
| 639, | ||
| 680 | ||
| ], | ||
| "flag": "1_Ulaid", | ||
| "name": "Ulaid", | ||
| "strength": 2 | ||
| }, | ||
| { | ||
| "coordinates": [509, 759], | ||
| "coordinates": [ | ||
| 509, | ||
| 759 | ||
| ], | ||
| "flag": "1_Airgialla", | ||
| "name": "Airgialla", | ||
| "strength": 2 | ||
| }, | ||
| { | ||
| "coordinates": [416, 678], | ||
| "coordinates": [ | ||
| 416, | ||
| 678 | ||
| ], | ||
| "flag": "1_Northern Ui Neill", | ||
| "name": "Northern Uí Néill", | ||
| "strength": 3 | ||
| }, | ||
| { | ||
| "coordinates": [1869, 1308], | ||
| "coordinates": [ | ||
| 1869, | ||
| 1308 | ||
| ], | ||
| "flag": "1_Franks", | ||
| "name": "Franks", | ||
| "strength": 3 | ||
| } | ||
| ] | ||
| } | ||
| } | ||
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Fix Prettier formatting error before merge.
The CI pipeline reports Prettier formatting issues. Although the multi-line coordinate format improves readability, it does not match your project's Prettier configuration. Run
npx prettier --write resources/maps/britannia/manifest.jsonlocally and commit the corrected formatting.Also applies to: 29-32, 38-41, 47-50, 56-59, 65-68, 74-77, 83-86, 92-95, 101-104, 110-113, 119-122, 128-131, 137-140, 146-149, 155-158, 164-167, 173-176, 182-185, 191-194, 200-203, 209-212, 218-221
I need to verify the claims in the review comment by inspecting the actual file and Prettier configuration.
🏁 Script executed:
Length of output: 169
🏁 Script executed:
Length of output: 0
🏁 Script executed:
Length of output: 2195
🏁 Script executed:
Length of output: 3623
I found the file and can see it uses multi-line coordinate formatting. Let me verify Prettier's default behavior for JSON arrays.
💡 Result:
Short answer: Prettier prints JSON arrays on a single line when the entire array (including brackets, items, commas and surrounding context) fits within its printWidth and the array is simple; otherwise it breaks the array across lines. Single-line arrays never get trailing commas. See Prettier’s options/behavior (printWidth + trailingComma). [1][2]
Sources:
Format coordinates to match Prettier defaults.
The multi-line coordinate arrays do not match Prettier's default formatting. Prettier prints JSON arrays on a single line when the entire array fits within its printWidth. The short arrays like
[960, 1258]should be formatted on one line. Runnpx prettier --write resources/maps/britannia/manifest.jsonto apply the correct formatting.Also applies to: lines 29–32, 38–41, 47–50, 56–59, 65–68, 74–77, 83–86, 92–95, 101–104, 110–113, 119–122, 128–131, 137–140, 146–149, 155–158, 164–167, 173–176, 182–185, 191–194, 200–203, 209–212, 218–221
🤖 Prompt for AI Agents