Skip to content

Add Map - Dyslexdria - April Fools#3413

Open
patrickbadly-hub wants to merge 11 commits intoopenfrontio:mainfrom
patrickbadly-hub:Add-Map---Dyslexdria
Open

Add Map - Dyslexdria - April Fools#3413
patrickbadly-hub wants to merge 11 commits intoopenfrontio:mainfrom
patrickbadly-hub:Add-Map---Dyslexdria

Conversation

@patrickbadly-hub
Copy link

Re-submission, previous request was not branched properly.

Description:

Add custom map Dyslexdria. Based off of large_world_map_recolor.tif and rivers from the XL World map. Map is intended for long term use. Suggesting that map be used as an April Fools gag by replacing thumbnail and title with 'World' during first run.

Following:

Discord username:

PlaysBadly

add folder dyslexdria
add map gen source image and nation list
add folder dyslexdria
added complete dyslexdria map files including temporary WORLD thumbnail for april fools day application
added map name dyslexdria
added map dyslexdria
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 15c72911-1c63-4def-8353-e91344c6aeb5

📥 Commits

Reviewing files that changed from the base of the PR and between 3902e0b and 5ad46c0.

📒 Files selected for processing (1)
  • resources/lang/en.json

Walkthrough

A new fantasy map named "Dyslexdria" is added to the game, including map metadata with nation definitions, localization text, map manifest with dimensions and nation coordinates, and registration in the game's map type enumeration.

Changes

Cohort / File(s) Summary
Map Data Files
map-generator/assets/maps/dyslexdria/info.json, resources/maps/dyslexdria/manifest.json
New map definition files added with nation entries containing coordinates, flags, and names. Both files contain structured JSON data defining the Dyslexdria map layout and nation positions.
Localization
resources/lang/en.json
Added map name localization entry mapping "dyslexdria" key to "Dyslexdria" display name.
Game Type Registration
src/core/game/Game.ts
Registered new Dyslexdria map type in GameMapType enum and added it to the fantasy map category.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

A map named Dyslexdria comes to play, 🗺️
With nations and quirky names all the way,
Each flag marks a place on the grid,
Where adventure and humor collide as they did! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a new map named Dyslexdria with an April Fools theme.
Description check ✅ Passed The description is directly related to the changeset, explaining the map's origin, purpose, and intended use as an April Fools feature.
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.

📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can scan for known vulnerabilities in your dependencies using OSV Scanner.

OSV Scanner will automatically detect and report security vulnerabilities in your project's dependencies. No additional configuration is required.

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: 3

🧹 Nitpick comments (2)
resources/maps/dyslexdria/manifest.json (1)

1-548: Run Prettier on this manifest to clear CI style warnings.

Formatting is the only issue flagged here.

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

In `@resources/maps/dyslexdria/manifest.json` around lines 1 - 548, The
manifest.json is failing CI due to formatting; run the project's configured
Prettier (or the repository formatter) on
resources/maps/dyslexdria/manifest.json (the JSON object containing keys like
"map", "map16x", "map4x", "name", and the "nations" array) and commit the
formatted file so the CI style warnings are cleared.
map-generator/assets/maps/dyslexdria/info.json (1)

1-335: Run Prettier for this file as well to remove CI style warnings.

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

In `@map-generator/assets/maps/dyslexdria/info.json` around lines 1 - 335, The
file map-generator/assets/maps/dyslexdria/info.json is not formatted per project
Prettier rules (CI style warnings); run your project's Prettier configuration
(e.g., via npx prettier --write) on this file to reformat the JSON, ensuring
consistent spacing, trailing commas removal, and proper indentation for the
top-level "name" and "nations" entries so the CI no longer reports style errors.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@resources/lang/en.json`:
- Around line 345-346: The JSON object is invalid because the entries for
"aegean" and "dyslexdria" are missing a separating comma; update the resource
JSON so there's a comma after the "aegean" entry (i.e., add a comma between the
"aegean" and "dyslexdria" keys) to restore valid JSON syntax and allow
parsing/pretty-printing to succeed.

In `@resources/maps/dyslexdria/`.~lock.map.bin#:
- Line 1: The commit accidentally includes a LibreOffice lock file
resources/maps/dyslexdria/.~lock.map.bin#; remove this file from the PR (delete
it from the index/working tree) and add a rule to .gitignore to prevent future
commits (e.g., ignore .*~lock* or specifically .~lock.map.bin#), then amend the
commit or create a new one that removes the file; ensure you reference the
filename ".~lock.map.bin#" and the directory "resources/maps/dyslexdria" when
editing the index and .gitignore.

In `@src/core/game/Game.ts`:
- Around line 142-143: GameMapType.Dyslexdria is defined but missing from the
playlist frequency map used by MapPlaylist (so it defaults to 0 and never
appears); update the frequency map in MapPlaylist (the object that maps
GameMapType keys to numeric frequencies) to include GameMapType.Dyslexdria with
an appropriate non-zero frequency value (match similar entries like other
fantasy maps) and also add the same entry where the secondary frequency table is
defined (the other occurrence noted), ensuring both places reference
GameMapType.Dyslexdria so it can be rotated into the public playlist.

---

Nitpick comments:
In `@map-generator/assets/maps/dyslexdria/info.json`:
- Around line 1-335: The file map-generator/assets/maps/dyslexdria/info.json is
not formatted per project Prettier rules (CI style warnings); run your project's
Prettier configuration (e.g., via npx prettier --write) on this file to reformat
the JSON, ensuring consistent spacing, trailing commas removal, and proper
indentation for the top-level "name" and "nations" entries so the CI no longer
reports style errors.

In `@resources/maps/dyslexdria/manifest.json`:
- Around line 1-548: The manifest.json is failing CI due to formatting; run the
project's configured Prettier (or the repository formatter) on
resources/maps/dyslexdria/manifest.json (the JSON object containing keys like
"map", "map16x", "map4x", "name", and the "nations" array) and commit the
formatted file so the CI style warnings are cleared.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e0501198-6632-4b51-a8e8-153be590f3d2

📥 Commits

Reviewing files that changed from the base of the PR and between 3013133 and 3902e0b.

⛔ Files ignored due to path filters (4)
  • map-generator/assets/maps/dyslexdria/image.png is excluded by !**/*.png
  • resources/maps/dyslexdria/map.bin is excluded by !**/*.bin
  • resources/maps/dyslexdria/map16x.bin is excluded by !**/*.bin
  • resources/maps/dyslexdria/map4x.bin is excluded by !**/*.bin
📒 Files selected for processing (7)
  • map-generator/assets/maps/dyslexdria/info.json
  • resources/lang/en.json
  • resources/maps/dyslexdria/.~lock.map.bin#
  • resources/maps/dyslexdria/TEMP april fools day thumbnail.webp
  • resources/maps/dyslexdria/manifest.json
  • resources/maps/dyslexdria/thumbnail.webp
  • src/core/game/Game.ts

Comment on lines +142 to 143
Dyslexdria = "Dyslexdria",
}
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
set -euo pipefail

python - <<'PY'
import pathlib, re

p = pathlib.Path("src/server/MapPlaylist.ts")
text = p.read_text(encoding="utf-8")

has_freq = re.search(r'\bDyslexdria\s*:\s*\d+\b', text) is not None
has_default_zero = "let freq = frequency[key] ?? 0;" in text

print(f"Dyslexdria frequency entry present: {has_freq}")
print(f"Missing keys default to zero present: {has_default_zero}")

if not has_freq and has_default_zero:
    print("Result: Dyslexdria will be excluded from public playlist rotation unless intentionally omitted.")
PY

Repository: openfrontio/OpenFrontIO

Length of output: 247


Dyslexdria missing from playlist frequency table - will never appear in public rotation.

GameMapType.Dyslexdria is registered in the enum and added to fantasy category, but src/server/MapPlaylist.ts uses a frequency map that defaults missing keys to 0, silently excluding this map from public playlist rotation.

Add frequency entry
// src/server/MapPlaylist.ts (frequency table)
+  Dyslexdria: 4,

Also applies to: 207-207

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

In `@src/core/game/Game.ts` around lines 142 - 143, GameMapType.Dyslexdria is
defined but missing from the playlist frequency map used by MapPlaylist (so it
defaults to 0 and never appears); update the frequency map in MapPlaylist (the
object that maps GameMapType keys to numeric frequencies) to include
GameMapType.Dyslexdria with an appropriate non-zero frequency value (match
similar entries like other fantasy maps) and also add the same entry where the
secondary frequency table is defined (the other occurrence noted), ensuring both
places reference GameMapType.Dyslexdria so it can be rotated into the public
playlist.

@github-project-automation github-project-automation bot moved this from Triage to Development in OpenFront Release Management Mar 12, 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