Add Map - Dyslexdria - April Fools#3413
Add Map - Dyslexdria - April Fools#3413patrickbadly-hub wants to merge 11 commits intoopenfrontio:mainfrom
Conversation
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
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughA 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📝 Coding Plan
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. Comment 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. |
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (4)
map-generator/assets/maps/dyslexdria/image.pngis excluded by!**/*.pngresources/maps/dyslexdria/map.binis excluded by!**/*.binresources/maps/dyslexdria/map16x.binis excluded by!**/*.binresources/maps/dyslexdria/map4x.binis excluded by!**/*.bin
📒 Files selected for processing (7)
map-generator/assets/maps/dyslexdria/info.jsonresources/lang/en.jsonresources/maps/dyslexdria/.~lock.map.bin#resources/maps/dyslexdria/TEMP april fools day thumbnail.webpresources/maps/dyslexdria/manifest.jsonresources/maps/dyslexdria/thumbnail.webpsrc/core/game/Game.ts
| Dyslexdria = "Dyslexdria", | ||
| } |
There was a problem hiding this comment.
🧩 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.")
PYRepository: 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.
deleted accidental bin file
corrected , error
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