Skip to content
Open
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
Binary file added map-generator/assets/maps/quadrants/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions map-generator/assets/maps/quadrants/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "Achiran",
"nations": [
{
"coordinates": [250, 250],
"flag": "de",
"name": "first quadrant"
},
{
"coordinates": [750, 250],
"flag": "de",
"name": "second quadrant"
},
{
"coordinates": [250, 750],
"flag": "de",
"name": "third quadrant"
},
{
"coordinates": [750, 750],
"flag": "de",
"name": "fourth quadrant"
}
]
}
Comment on lines +1 to +25
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if files exist and display their contents
echo "=== Checking info.json ===" 
if [ -f "map-generator/assets/maps/quadrants/info.json" ]; then
  cat -n "map-generator/assets/maps/quadrants/info.json"
else
  echo "File not found: map-generator/assets/maps/quadrants/info.json"
fi

echo ""
echo "=== Checking manifest.json ===" 
if [ -f "resources/maps/quadrants/manifest.json" ]; then
  cat -n "resources/maps/quadrants/manifest.json"
else
  echo "File not found: resources/maps/quadrants/manifest.json"
fi

echo ""
echo "=== Listing quadrants directory contents ===" 
if [ -d "resources/maps/quadrants" ]; then
  ls -la "resources/maps/quadrants/"
else
  echo "Directory not found: resources/maps/quadrants"
fi

echo ""
echo "=== Checking available flag files ===" 
if [ -d "resources/flags" ]; then
  echo "Looking for de and ie flags:"
  ls resources/flags/ | grep -E "^(de|ie)(\.|$)" || echo "No exact matches found"
else
  echo "Directory not found: resources/flags"
fi

Repository: openfrontio/OpenFrontIO

Length of output: 2271


Fix flag inconsistency for the third quadrant between source and manifest.

The third quadrant has flag "de" in info.json but flag "ie" in manifest.json. They must match. Either update info.json line 16 to use "ie" to match the manifest, or update the manifest.json line 31 to use "de".

Additionally, all four quadrants currently use the same flag in info.json, which appears to be placeholder data. Consider using different flags to visually distinguish each quadrant.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@map-generator/assets/maps/quadrants/info.json` around lines 1 - 25, The third
nation's flag in the nations array is inconsistent with manifest.json: update
the third element (nations[2]."flag") in info.json from "de" to "ie" to match
the manifest (or alternatively change the manifest's corresponding flag to "de"
if that is intended), and while here replace the placeholder "de" for each
quadrant with distinct flag codes to visually distinguish all four quadrants.

1 change: 1 addition & 0 deletions map-generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ var maps = []struct {
IsTest bool
}{
{Name: "africa"},
{Name: "quadrants"},
{Name: "asia"},
{Name: "australia"},
{Name: "achiran"},
Expand Down
3 changes: 2 additions & 1 deletion resources/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@
"amazonriver": "Amazon River",
"tradersdream": "Traders Dream",
"hawaii": "Hawaii",
"alps": "Alps"
"alps": "Alps",
"quadrants": "Quadrants"
},
"map_categories": {
"featured": "Featured",
Expand Down
40 changes: 40 additions & 0 deletions resources/maps/quadrants/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"map": {
"height": 1000,
"num_land_tiles": 810000,
"width": 1000
},
"map16x": {
"height": 250,
"num_land_tiles": 50176,
"width": 250
},
"map4x": {
"height": 500,
"num_land_tiles": 202500,
"width": 500
},
"name": "Achiran",
"nations": [
{
"coordinates": [250, 250],
"flag": "de",
"name": "first quadrant"
},
{
"coordinates": [750, 250],
"flag": "de",
"name": "second quadrant"
},
{
"coordinates": [250, 750],
"flag": "ie",
"name": "third quadrant"
Comment on lines +29 to +32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Flag inconsistency with source file.

The third quadrant here uses "ie" (Ireland), but info.json has "de" for all quadrants. Since manifest.json is generated from info.json, running the map generator will overwrite this with "de". Update info.json if you want "ie" for the third quadrant.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@resources/maps/quadrants/manifest.json` around lines 29 - 32, The manifest's
third quadrant entry (name "third quadrant", coordinates [250, 750], flag "ie")
conflicts with the source info.json which has "de" for all quadrants; since
manifest.json is generated from info.json the generator will overwrite it, so
either update the corresponding quadrant entry in info.json to set flag to "ie"
if you intend Ireland for the third quadrant, or revert manifest.json's flag to
"de" to match info.json; locate the quadrant record by the name "third quadrant"
or coordinates [250, 750] and make the change there.

},
{
"coordinates": [750, 750],
"flag": "de",
"name": "fourth quadrant"
}
]
}
1 change: 1 addition & 0 deletions resources/maps/quadrants/map.bin

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions resources/maps/quadrants/map16x.bin

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions resources/maps/quadrants/map4x.bin

Large diffs are not rendered by default.

Binary file added resources/maps/quadrants/thumbnail.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/core/game/Game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export const ColoredTeams: Record<string, Team> = {

export enum GameMapType {
World = "World",
Quadrants = "Quadrants",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Quadrants is missing from mapCategories.

The new Quadrants enum member is added but not placed in any category (continental, regional, fantasy, arcade). Other maps are categorized for UI filtering. Based on the PR description ("four plain quadrants separated by water"), this likely belongs in fantasy or arcade.

Suggested fix

Add GameMapType.Quadrants to the appropriate category, for example:

   arcade: [
     GameMapType.TheBox,
     GameMapType.Didier,
     GameMapType.DidierFrance,
     GameMapType.Sierpinski,
+    GameMapType.Quadrants,
   ],
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/core/game/Game.ts` at line 84, mapCategories is missing the new
GameMapType.Quadrants enum member; edit the mapCategories object to include
GameMapType.Quadrants under the correct category (likely "fantasy" or "arcade"
per PR description). Find the mapCategories declaration and add
GameMapType.Quadrants to the chosen array alongside other types so the UI
filtering recognizes it.

GiantWorldMap = "Giant World Map",
Europe = "Europe",
EuropeClassic = "Europe Classic",
Expand Down
1 change: 1 addition & 0 deletions src/server/MapPlaylist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const log = logger.child({});
// How many times each map should appear in the playlist.
// Note: The Partial should eventually be removed for better type safety.
const frequency: Partial<Record<GameMapName, number>> = {
Quadrants: 100,
Africa: 7,
Asia: 6,
Australia: 4,
Expand Down