Skip to content

Add Map - The Box PLUS#3465

Open
patrickbadly-hub wants to merge 11 commits intoopenfrontio:mainfrom
patrickbadly-hub:Add-Map---The-Box-PLUS
Open

Add Map - The Box PLUS#3465
patrickbadly-hub wants to merge 11 commits intoopenfrontio:mainfrom
patrickbadly-hub:Add-Map---The-Box-PLUS

Conversation

@patrickbadly-hub
Copy link

Description:

Add map The Box PLUS. Huge improvements to The Box for April 1st! Now players can experience varied terrain while playing the brand new The Box PLUS!

##Discord username

PlaysBadly

removed original thebox source image
changed map on thebox for april fools day
changed thebox to theboxplus for april fools
changed thebox to theboxplus for april fools
removed old thebox files
removed old thebox files
uploaded files for theboxplus
added files for theboxplus
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 18, 2026

Walkthrough

Three coordinated changes rename a game map from "The Box" to "The Box PLUS" across translation and code files, while reformatting coordinate data in the map manifest for readability.

Changes

Cohort / File(s) Summary
Map Name Update
resources/lang/en.json, src/core/game/Game.ts
Updated map display name from "The Box" to "The Box PLUS" in translation strings and GameMapType enum value.
Map Manifest Formatting
resources/maps/thebox/manifest.json
Reformatted coordinate arrays from single-line to multi-line format; numeric values and structure remain unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🎁 The Box once simple, now shines bright,
With PLUS appended, what a sight!
Arrays now stand, each element tall,
Refinement flows through one and all! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add Map - The Box PLUS' accurately summarizes the main objective of the changeset: introducing a new map variant.
Description check ✅ Passed The description is directly related to the changeset, explaining the new map addition, its purpose as an April Fools' Day feature, and providing context about testing.
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.

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
resources/maps/thebox/manifest.json (1)

1-124: ⚠️ Potential issue | 🟡 Minor

Fix formatting to pass CI.

The pipeline reports code style issues. Run npx prettier --write resources/maps/thebox/manifest.json to fix.

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

In `@resources/maps/thebox/manifest.json` around lines 1 - 124, The JSON manifest
has formatting/style issues causing CI failures; run the code formatter to fix
it by executing the project-preferred formatter (e.g., run "npx prettier --write
resources/maps/thebox/manifest.json") or reformat the file so keys like "map",
"map16x", "map4x", "name", and the "nations" array are properly indented and
spaced to match the repository Prettier config, then stage and commit the
updated manifest.json.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/core/game/Game.ts`:
- Line 125: The enum member TheBox was changed from "The Box" to "The Box PLUS",
which breaks deserialization; revert or add compatibility: update the Game enum
member TheBox in Game.ts back to the original "The Box" (or else add a stable
canonical value plus a legacy alias), and modify the Zod schemas GameConfig and
ServerPrestartMessageSchema in src/core/Schemas.ts to accept both values (use a
z.union or include the legacy literal) so existing saved games/replays and
network messages with "The Box" continue to parse; alternatively, if
intentional, add a clear migration path and documentation so deserializers can
map "The Box" → "The Box PLUS".

---

Outside diff comments:
In `@resources/maps/thebox/manifest.json`:
- Around line 1-124: The JSON manifest has formatting/style issues causing CI
failures; run the code formatter to fix it by executing the project-preferred
formatter (e.g., run "npx prettier --write resources/maps/thebox/manifest.json")
or reformat the file so keys like "map", "map16x", "map4x", "name", and the
"nations" array are properly indented and spaced to match the repository
Prettier config, then stage and commit the updated manifest.json.
🪄 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: f5e7c7b9-5d06-4144-9d9f-f306b4f3ca8d

📥 Commits

Reviewing files that changed from the base of the PR and between afdb04a and abcc60d.

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

Passage = "Passage",
Sierpinski = "Sierpinski",
TheBox = "The Box",
TheBox = "The Box PLUS",
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
# Check if the enum value is used in serialization or stored configs
rg -n "The Box" --type=ts -C2

Repository: openfrontio/OpenFrontIO

Length of output: 340


🏁 Script executed:

#!/bin/bash
# Check for any references to this map in test files or configs
rg -n "TheBox|thebox" --type=json -g '!**/lang/**' -g '!**/manifest.json'

Repository: openfrontio/OpenFrontIO

Length of output: 131


🏁 Script executed:

#!/bin/bash
# Find the enum definition and how it's used
rg -n "enum.*GameMapType|TheBox" --type=ts -B2 -A10 | head -80

Repository: openfrontio/OpenFrontIO

Length of output: 4025


🏁 Script executed:

#!/bin/bash
# Search for deserialization logic that might use the enum value
rg -n "deserialize|fromJSON|parse" --type=ts -A5 | grep -A5 -B5 "GameMapType\|TheBox" | head -80

Repository: openfrontio/OpenFrontIO

Length of output: 49


🏁 Script executed:

#!/bin/bash
# Check if the enum value is directly compared or used for lookups
rg -n "\"The Box\"|'The Box'" --type=ts

Repository: openfrontio/OpenFrontIO

Length of output: 49


🏁 Script executed:

#!/bin/bash
# Find where GameMapType enum is used for serialization
rg -n "GameMapType" --type=ts -B2 -A2 | head -100

Repository: openfrontio/OpenFrontIO

Length of output: 5132


Breaking change: enum value affects deserialization.

Changing the enum value from "The Box" to "The Box PLUS" breaks backward compatibility. The Zod validation schemas in src/core/Schemas.ts (GameConfig, ServerPrestartMessageSchema) validate serialized values against enum values. Existing game configs and network messages with "The Box" will fail deserialization.

The filesystem path lookup still works (uses enum key TheBox"thebox"), but any saved games, replays, or cross-version communication will break.

If this is temporary, document the breaking change clearly. Otherwise, implement a migration strategy.

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

In `@src/core/game/Game.ts` at line 125, The enum member TheBox was changed from
"The Box" to "The Box PLUS", which breaks deserialization; revert or add
compatibility: update the Game enum member TheBox in Game.ts back to the
original "The Box" (or else add a stable canonical value plus a legacy alias),
and modify the Zod schemas GameConfig and ServerPrestartMessageSchema in
src/core/Schemas.ts to accept both values (use a z.union or include the legacy
literal) so existing saved games/replays and network messages with "The Box"
continue to parse; alternatively, if intentional, add a clear migration path and
documentation so deserializers can map "The Box" → "The Box PLUS".

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