Skip to content

Add Map - The Box PLUS#3465

Closed
patrickbadly-hub wants to merge 12 commits intoopenfrontio:mainfrom
patrickbadly-hub:Add-Map---The-Box-PLUS
Closed

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

Conversation

@patrickbadly-hub
Copy link
Copy Markdown

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

coderabbitai bot commented Mar 18, 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: c47948e6-37ae-4833-b136-a1dea9e2ff0a

📥 Commits

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

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

Walkthrough

Renamed the game map label from "The Box" to "The Box PLUS" in code and English translations, and reformatted coordinate arrays in the map manifest from single-line to multi-line entries (no numeric changes).

Changes

Cohort / File(s) Summary
Map Name Update
resources/lang/en.json, src/core/game/Game.ts
Changed the map display name from "The Box" to "The Box PLUS" in the English locale and the GameMapType enum string literal.
Map Manifest Formatting
resources/maps/thebox/manifest.json
Reformatted coordinate arrays from single-line [x, y] to multi-line format; values unchanged, only whitespace/formatting adjusted.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

✨ A little name got a PLUS today,
Strings and enums all nod and sway.
Coordinates lined up, neat and fine,
Small tidy change — the map's divine! 🎁

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a new map called 'The Box PLUS' to the codebase.
Description check ✅ Passed The description clearly explains the purpose of the change—adding a temporary April Fools' Day map with varied terrain improvements.
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: 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
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
# 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
@github-project-automation github-project-automation bot moved this from Development to Complete in OpenFront Release Management Mar 29, 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.

1 participant