Skip to content

Make april fool maps have the same name as normal maps#3555

Merged
evanpelle merged 4 commits intoopenfrontio:mainfrom
RickD004:fix-april-fools-maps
Apr 1, 2026
Merged

Make april fool maps have the same name as normal maps#3555
evanpelle merged 4 commits intoopenfrontio:mainfrom
RickD004:fix-april-fools-maps

Conversation

@RickD004
Copy link
Copy Markdown
Contributor

Description:

Make the april fool maps have the same name as the normal maps, in order to make the prank better.

NOTE: In order for this to work, it re-adds the normal maps into rotation. These normal maps have been given a lower rotation however.

In custom matches the maps will appear with the april fools names.

This change will be reverted after April Fools.

Check this for proof of it working:
https://canary.discord.com/channels/1359946986937258015/1450487807242932336/1488682300924231882

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
Copy Markdown
Contributor

coderabbitai Bot commented Mar 31, 2026

Walkthrough

The changes update display names for five game map types in the GameMapType enum and adjust map playlist frequency weights by adding new entries and modifying existing ones.

Changes

Cohort / File(s) Summary
Game Map Display Strings
src/core/game/Game.ts
Updated display values for five GameMapType enum members: MilkyWay (with space), AmazonRiverWide, ReglaciatedAntarctica, TheBoxPlus, and WorldRotated (various text corrections and truncations).
Map Playlist Weights
src/server/MapPlaylist.ts
Added three new map frequency entries (DeglaciatedAntarctica, AmazonRiver, TheBox) and one new entry (World with weight 5). Increased ReglaciatedAntarctica weight from 12 to 15.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🗺️ Maps get prettier names today,
From truncated words to proper display,
The playlists rebalance, new worlds join the fold,
Weights shift and frequencies find their footing bold! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: April Fools maps are renamed to match normal map names to improve the prank.
Description check ✅ Passed The description clearly explains the purpose (stronger April Fools prank), implementation (lower rotation frequency for normal maps), and provides proof via Discord link.
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.

🧹 Nitpick comments (1)
src/core/game/Game.ts (1)

146-150: Use explicit display names instead of trailing spaces for clarity.

Lines 147–150 use trailing spaces as a pattern to customize display labels (e.g., "Amazon River " vs. the key "AmazonRiverWide"). While the spaces are normalized away by normaliseMapKey() and don't affect behavior, this pattern is confusing to read and maintain.

Prefer an explicit map-name alias table (keyed by GameMapName) that maps each key to its display label, keeping enum values stable and intent clear.

🤖 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 146 - 150, The enum entries (MilkyWay,
AmazonRiverWide, ReglaciatedAntarctica, TheBoxPlus, WorldRotated) currently
carry trailing spaces to signal display labels; remove those trailing spaces
from the enum values and instead add an explicit alias/label lookup (e.g., a
constant map keyed by the GameMapName enum) that maps each enum key to its
desired display string, update any usage that relied on trailing-space behavior
(including normaliseMapKey()) to use the new label map, and keep the enum values
stable for logic while using the new label map for UI/display.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/core/game/Game.ts`:
- Around line 146-150: The enum entries (MilkyWay, AmazonRiverWide,
ReglaciatedAntarctica, TheBoxPlus, WorldRotated) currently carry trailing spaces
to signal display labels; remove those trailing spaces from the enum values and
instead add an explicit alias/label lookup (e.g., a constant map keyed by the
GameMapName enum) that maps each enum key to its desired display string, update
any usage that relied on trailing-space behavior (including normaliseMapKey())
to use the new label map, and keep the enum values stable for logic while using
the new label map for UI/display.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d63bd909-fdeb-4d76-940a-4119318d31a5

📥 Commits

Reviewing files that changed from the base of the PR and between 9b4812f and a5c3e6b.

📒 Files selected for processing (6)
  • resources/lang/en.json
  • resources/maps/amazonriverwide/thumbnail.webp
  • resources/maps/reglaciatedantarctica/thumbnail.webp
  • resources/maps/worldrotated/thumbnail.webp
  • src/core/game/Game.ts
  • src/server/MapPlaylist.ts

coderabbitai[bot]
coderabbitai Bot previously approved these changes Mar 31, 2026
@github-project-automation github-project-automation Bot moved this from Triage to Final Review in OpenFront Release Management Mar 31, 2026
update the map rotation numbers of normal maps to be lower
coderabbitai[bot]
coderabbitai Bot previously approved these changes Mar 31, 2026
@RickD004 RickD004 dismissed coderabbitai[bot]’s stale review April 1, 2026 00:33

The merge-base changed after approval.

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.

🧹 Nitpick comments (1)
src/core/game/Game.ts (1)

148-151: Avoid hidden trailing spaces in enum values.

Lines 148-151 rely on invisible whitespace to create “same-looking” names. This is fragile for filtering, comparisons, analytics, and any trim/normalize step. Prefer keeping canonical enum values and applying April Fools aliases in the display layer only.

Proposed direction
 export enum GameMapType {
-  AmazonRiverWide = "Amazon River ",
-  ReglaciatedAntarctica = "Deglaciated Antarctica ",
-  TheBoxPlus = "The Box ",
-  WorldRotated = "World ",
+  AmazonRiverWide = "Amazon River Wide",
+  ReglaciatedAntarctica = "Reglaciated Antarctica",
+  TheBoxPlus = "The Box Plus",
+  WorldRotated = "World Rotated",
 }
+
+// Use this only where the prank should apply (e.g., public playlist UI).
+export const APRIL_FOOLS_PUBLIC_NAME_OVERRIDES: Partial<Record<GameMapType, string>> = {
+  [GameMapType.AmazonRiverWide]: "Amazon River",
+  [GameMapType.ReglaciatedAntarctica]: "Deglaciated Antarctica",
+  [GameMapType.TheBoxPlus]: "The Box",
+  [GameMapType.WorldRotated]: "World",
+};
🤖 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 148 - 151, The enum entries
AmazonRiverWide, ReglaciatedAntarctica, TheBoxPlus, and WorldRotated contain
hidden trailing spaces in their string values; remove those trailing spaces so
the canonical enum values are exact (e.g., "Amazon River" not "Amazon River "),
and move any April Fools or display-only aliases into the presentation layer
(create or use a displayName map or a getDisplayName/getAlias function for
UI/analytics) rather than embedding invisible whitespace in the enum constants.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/core/game/Game.ts`:
- Around line 148-151: The enum entries AmazonRiverWide, ReglaciatedAntarctica,
TheBoxPlus, and WorldRotated contain hidden trailing spaces in their string
values; remove those trailing spaces so the canonical enum values are exact
(e.g., "Amazon River" not "Amazon River "), and move any April Fools or
display-only aliases into the presentation layer (create or use a displayName
map or a getDisplayName/getAlias function for UI/analytics) rather than
embedding invisible whitespace in the enum constants.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b4c3238a-f509-46f0-ad9c-d7856a928990

📥 Commits

Reviewing files that changed from the base of the PR and between 87da81b and 93f07df.

📒 Files selected for processing (2)
  • src/core/game/Game.ts
  • src/server/MapPlaylist.ts

@evanpelle evanpelle merged commit 38be51a into openfrontio:main Apr 1, 2026
6 of 7 checks passed
@github-project-automation github-project-automation Bot moved this from Final Review to Complete in OpenFront Release Management Apr 1, 2026
@RickD004 RickD004 deleted the fix-april-fools-maps branch April 1, 2026 01:43
evanpelle added a commit that referenced this pull request Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

2 participants