Skip to content

Add Map - Dyslexdria - April Fools#3413

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

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

Conversation

@patrickbadly-hub
Copy link
Copy Markdown

@patrickbadly-hub patrickbadly-hub commented Mar 12, 2026

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.

dyslexdria screenshot
  • 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

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
Copy Markdown
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: 10601980-d125-4038-a17d-ec2253d117c0

📥 Commits

Reviewing files that changed from the base of the PR and between 06133d1 and 88a32d2.

📒 Files selected for processing (2)
  • resources/lang/en.json
  • src/core/game/Game.ts
✅ Files skipped from review due to trivial changes (2)
  • resources/lang/en.json
  • src/core/game/Game.ts

Walkthrough

Adds a new fantasy map "Dyslexdria": static map assets and manifest with many nation entries, an English localization key, and registration of the map type in the game's enum.

Changes

Cohort / File(s) Summary
Map Generator Asset
map-generator/assets/maps/dyslexdria/info.json
New JSON metadata file for the Dyslexdria map containing many nation entries (coordinates, flag, name). Static data only.
Runtime Map Manifest
resources/maps/dyslexdria/manifest.json
New map manifest declaring dimensions (height, width, num_land_tiles, map16x, map4x), name: "Dyslexdria", and a large nations array.
Localization
resources/lang/en.json
Added "dyslexdria": "Dyslexdria" under the map localization keys.
Game Type Registration
src/core/game/Game.ts
Added Dyslexdria = "Dyslexdria" to GameMapType and included it in mapCategories.fantasy.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

A quirky map called Dyslexdria wakes,
Many flags and playful name mistakes,
Quiet JSON fields in tidy rows,
New lands to find where curiosity goes,
Open the map — a small adventure waits.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding a new map called Dyslexdria with an April Fools theme aspect.
Description check ✅ Passed The description clearly explains the purpose, origin, and implementation details of adding the Dyslexdria map, along with testing and localization work done.
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
Copy Markdown
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
Copy Markdown
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
Duwibi
Duwibi previously approved these changes Mar 29, 2026
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 29, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ patrickbadly-hub
✅ VariableVince
❌ Duwibi
You have signed the CLA already but the status is still pending? Let us recheck it.

Duwibi
Duwibi previously approved these changes Mar 29, 2026
@Duwibi Duwibi added this to the v30 milestone Mar 29, 2026
@Duwibi Duwibi added the Maps A new map, or adjustments to an existing map itself, its json, etc, label Mar 29, 2026
patrickbadly-hub and others added 4 commits March 29, 2026 09:08
added info.json after running 'npm run format'
added manifest.json after running 'npm run format'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maps A new map, or adjustments to an existing map itself, its json, etc,

Projects

Status: Development

Development

Successfully merging this pull request may close these issues.

4 participants