Skip to content

Comments

Feat: Fire and Ice map#3283

Draft
bijx wants to merge 3 commits intomainfrom
avatar-map
Draft

Feat: Fire and Ice map#3283
bijx wants to merge 3 commits intomainfrom
avatar-map

Conversation

@bijx
Copy link
Contributor

@bijx bijx commented Feb 23, 2026

If this PR fixes an issue, link it below. If not, delete these two lines.
Resolves #(issue number)

Description:

Describe the PR.

Please complete the following:

  • I have added screenshots for all UI updates
  • I process any text displayed to the user through translateText() and I've added it to the en.json file
  • I have added relevant tests to the test directory
  • I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced

Please put your Discord username so you can be contacted if a bug or regression is found:

DISCORD_USERNAME

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 23, 2026

Walkthrough

Introduces a new "Fire and Ice" map to the game system by adding map metadata files, registering it in the game engine, including it in the map playlist, and adding localization support across multiple configuration files.

Changes

Cohort / File(s) Summary
Map Metadata
map-generator/assets/maps/fireandice/info.json, resources/maps/fireandice/manifest.json
New JSON data files defining Fire and Ice map properties, including dimensions, land tile counts, and nation coordinates with names.
Game Engine Registration
src/core/game/Game.ts
Added FireAndIce enum member to GameMapType and registered it in the fantasy map category.
Map Registry & Playlist
map-generator/main.go, src/server/MapPlaylist.ts
Registered the fireandice map in the generator registry and added playlist entry with frequency setting of 5.
Localization
resources/lang/en.json
Added translation entry mapping "fireandice" to "Fire and Ice" in the map translation object.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🔥 A new realm joins the fray,
Where fire and ice in balance play,
From genesis code to nation's name,
Another map now stakes its claim! ❄️

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is a template with placeholder text and incomplete checklist items, containing no actual meaningful information about the changes. Fill in the PR description with concrete details about the Fire and Ice map, link any related issue, add your Discord username, and document whether translations and tests were added.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding a new 'Fire and Ice' map to the project.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@map-generator/assets/maps/fireandice/info.json`:
- Around line 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).

Comment on lines +3 to +48
"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"
}
]
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).

@github-project-automation github-project-automation bot moved this from Triage to Development in OpenFront Release Management Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development

Development

Successfully merging this pull request may close these issues.

1 participant