Skip to content
Draft
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/fireandice/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions map-generator/assets/maps/fireandice/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"name": "Fire and Ice",
"nations": [
{
"coordinates": [1383, 31],
"name": "Northern Water Tribe"
},
{
"coordinates": [900, 1161],
"name": "Southern Water Tribe"
},
{
"coordinates": [530, 945],
"name": "Southern Air Nomads"
},
{
"coordinates": [408, 293],
"name": "Western Air Nomads"
},
{
"coordinates": [1097, 217],
"name": "Northern Air Nomads"
},
{
"coordinates": [1357, 353],
"name": "Ba Sing Se"
},
{
"coordinates": [1579, 783],
"name": "Eastern Air Nomads"
},
{
"coordinates": [256, 603],
"name": "Fire Nation"
},
{
"coordinates": [1243, 606],
"name": "Southern Raiders"
},
{
"coordinates": [918, 395],
"name": "Gan Jin Tribe"
},
{
"coordinates": [959, 520],
"name": "Zhang Tribe"
}
]
Comment on lines +3 to +48
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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# First, understand the repository structure
echo "=== Repository root structure ==="
ls -la | head -20

echo ""
echo "=== Finding map-generator directory ==="
fd "map-generator" -t d

echo ""
echo "=== Finding all info.json files in map-generator ==="
fd "info.json" map-generator -t f 2>/dev/null | sort

echo ""
echo "=== Checking if fireandice/info.json exists ==="
if [ -f "map-generator/assets/maps/fireandice/info.json" ]; then
  echo "✓ fireandice/info.json found"
else
  echo "✗ fireandice/info.json NOT found"
fi

echo ""
echo "=== Checking structure of one other map's info.json ==="
OTHER_MAP=$(fd "info.json" map-generator -t f 2>/dev/null | head -1)
if [ -n "$OTHER_MAP" ]; then
  echo "Sample file: $OTHER_MAP"
  wc -l "$OTHER_MAP"
fi

Repository: openfrontio/OpenFrontIO

Length of output: 4372


🏁 Script executed:

#!/bin/bash
# Check if flag fields exist in other maps' info.json files
echo "=== Searching for 'flag' key in all info.json files ==="
fd "info.json" map-generator -t f -x grep -l '"flag"' {} \; 2>/dev/null | while read f; do
  echo "$f has flag fields"
done

echo ""
echo "=== Maps WITHOUT flag fields ==="
fd "info.json" map-generator -t f 2>/dev/null | while read f; do
  if ! grep -q '"flag"' "$f"; then
    echo "$f (no flag fields)"
  fi
done

echo ""
echo "=== Sample nation entry from another map (with context) ==="
fd "info.json" map-generator -t f 2>/dev/null | head -1 | xargs head -30

Repository: openfrontio/OpenFrontIO

Length of output: 4418


🏁 Script executed:

#!/bin/bash
# Check the fireandice/info.json file to see its complete structure
echo "=== fireandice/info.json full content ==="
cat map-generator/assets/maps/fireandice/info.json

echo ""
echo "=== Checking other maps without flag fields ==="
echo "--- baikalnukewars/info.json (first 30 lines) ---"
head -30 map-generator/assets/maps/baikalnukewars/info.json

echo ""
echo "--- didier/info.json (first 30 lines) ---"
head -30 map-generator/assets/maps/didier/info.json

echo ""
echo "=== Checking git status of these files ==="
git log --oneline -1 map-generator/assets/maps/fireandice/info.json 2>/dev/null || echo "File not in git or new"
git log --oneline -1 map-generator/assets/maps/baikalnukewars/info.json 2>/dev/null || echo "File not in git or new"

Repository: openfrontio/OpenFrontIO

Length of output: 1912


🏁 Script executed:

#!/bin/bash
# Check if fireandice is a new map being added in this PR
echo "=== Git diff status for fireandice/info.json ==="
git diff HEAD map-generator/assets/maps/fireandice/info.json 2>/dev/null | head -50 || echo "No changes or file not tracked"

echo ""
echo "=== Checking if these maps are mentioned as drafts or new ==="
git log --all --oneline --grep="fireandice\|baikalnukewars\|didier\|twolakes" 2>/dev/null | head -10

echo ""
echo "=== Sample flag values from established maps ==="
rg '"flag":\s*"[^"]*"' map-generator/assets/maps/ -m 5

Repository: openfrontio/OpenFrontIO

Length of output: 16452


🏁 Script executed:

#!/bin/bash
# Check if flag assets exist for Avatar nations
echo "=== Checking for Avatar-related flag files ==="
fd "Water Tribe|Air Nomads|Ba Sing Se|Fire Nation|Raiders|Tribe" resources/flags/ 2>/dev/null

echo ""
echo "=== Listing all available flags in resources/flags ==="
ls resources/flags/ | head -30
echo "... (total: $(ls resources/flags/ | wc -l) files)"

echo ""
echo "=== Checking if didier has flag assets ==="
fd "Aywen|Kumiz|MyBios|Blazzy|Xederma|PinPin|Scorpionem" resources/flags/ 2>/dev/null | head -10

Repository: openfrontio/OpenFrontIO

Length of output: 692


🏁 Script executed:

#!/bin/bash
# Check twolakes map to see if it also has no flags
echo "=== twolakes/info.json content ==="
cat map-generator/assets/maps/twolakes/info.json

echo ""
echo "=== Checking git history for these incomplete maps ==="
git log --oneline -5 map-generator/assets/maps/fireandice/info.json 2>/dev/null
git log --oneline -5 map-generator/assets/maps/didier/info.json 2>/dev/null
git log --oneline -5 map-generator/assets/maps/twolakes/info.json 2>/dev/null

Repository: openfrontio/OpenFrontIO

Length of output: 645


Add flag field to all nation entries.

All 11 nations lack a flag field. All other 51 maps include this field for each nation—even fictional and custom-themed maps use it (with values like country codes, custom names, or empty strings). Without this field, the game UI may fail to render flags for these nations.

Since this is the generator source file, add the field here before generating manifest.json.

Example structure (see established maps for reference)
{
  "coordinates": [1383, 31],
  "flag": "water_tribe",
  "name": "Northern Water Tribe"
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@map-generator/assets/maps/fireandice/info.json` around lines 3 - 48, Add a
"flag" field to every object inside the "nations" array in this info.json so the
UI can render flags; keep names consistent with existing map conventions
(lowercase, underscores or short identifiers). For each nation object (e.g.,
entries with "name": "Northern Water Tribe", "Southern Water Tribe", "Southern
Air Nomads", "Western Air Nomads", "Northern Air Nomads", "Ba Sing Se", "Eastern
Air Nomads", "Fire Nation", "Southern Raiders", "Gan Jin Tribe", "Zhang Tribe")
add a "flag" property with an appropriate identifier such as water_tribe,
southern_water_tribe, southern_air_nomads, western_air_nomads,
northern_air_nomads, ba_sing_se, eastern_air_nomads, fire_nation,
southern_raiders, gan_jin_tribe, zhang_tribe (or use empty string if no specific
flag asset exists).

}
1 change: 1 addition & 0 deletions map-generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ var maps = []struct {
{Name: "europeclassic"},
{Name: "falklandislands"},
{Name: "faroeislands"},
{Name: "fireandice"},
{Name: "fourislands"},
{Name: "gatewaytotheatlantic"},
{Name: "giantworldmap"},
Expand Down
1 change: 1 addition & 0 deletions resources/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@
"manicouagan": "Manicouagan",
"lemnos": "Lemnos",
"sierpinski": "Sierpinski",
"fireandice": "Fire and Ice",
"thebox": "The Box",
"twolakes": "Two Lakes",
"straitofhormuz": "Strait of Hormuz",
Expand Down
64 changes: 64 additions & 0 deletions resources/maps/fireandice/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"map": {
"height": 1228,
"num_land_tiles": 1027796,
"width": 2048
},
"map16x": {
"height": 307,
"num_land_tiles": 61167,
"width": 512
},
"map4x": {
"height": 614,
"num_land_tiles": 252632,
"width": 1024
},
"name": "Fire and Ice",
"nations": [
{
"coordinates": [1383, 31],
"name": "Northern Water Tribe"
},
{
"coordinates": [900, 1161],
"name": "Southern Water Tribe"
},
{
"coordinates": [530, 945],
"name": "Southern Air Nomads"
},
{
"coordinates": [408, 293],
"name": "Western Air Nomads"
},
{
"coordinates": [1097, 217],
"name": "Northern Air Nomads"
},
{
"coordinates": [1357, 353],
"name": "Ba Sing Se"
},
{
"coordinates": [1579, 783],
"name": "Eastern Air Nomads"
},
{
"coordinates": [256, 603],
"name": "Fire Nation"
},
{
"coordinates": [1243, 606],
"name": "Southern Raiders"
},
{
"coordinates": [918, 395],
"name": "Gan Jin Tribe"
},
{
"coordinates": [959, 520],
"name": "Zhang Tribe"
}
]
}
1 change: 1 addition & 0 deletions resources/maps/fireandice/map.bin

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

Binary file added resources/maps/fireandice/thumbnail.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/core/game/Game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export enum GameMapType {
Manicouagan = "Manicouagan",
Lemnos = "Lemnos",
Sierpinski = "Sierpinski",
FireAndIce = "Fire and Ice",
TheBox = "The Box",
TwoLakes = "Two Lakes",
StraitOfHormuz = "Strait of Hormuz",
Expand Down Expand Up @@ -184,6 +185,7 @@ export const mapCategories: Record<string, GameMapType[]> = {
GameMapType.Svalmel,
GameMapType.Surrounded,
GameMapType.TradersDream,
GameMapType.FireAndIce,
],
arcade: [
GameMapType.TheBox,
Expand Down
1 change: 1 addition & 0 deletions src/server/MapPlaylist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const frequency: Partial<Record<GameMapName, number>> = {
Svalmel: 8,
World: 8,
Lemnos: 3,
FireAndIce: 5,
TwoLakes: 6,
StraitOfHormuz: 4,
Surrounded: 4,
Expand Down
Loading