Skip to content

Add Map Chopping Block#4081

Closed
PatrickPlaysBadly wants to merge 10 commits into
openfrontio:mainfrom
PatrickPlaysBadly:Add-Map-Chopping-Block
Closed

Add Map Chopping Block#4081
PatrickPlaysBadly wants to merge 10 commits into
openfrontio:mainfrom
PatrickPlaysBadly:Add-Map-Chopping-Block

Conversation

@PatrickPlaysBadly
Copy link
Copy Markdown
Contributor

@PatrickPlaysBadly PatrickPlaysBadly commented May 31, 2026

Resolves #4080

Description:

Add Map Chopping Block
https://youtu.be/NpX73lHiKO8

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

Please put your Discord username so you can be contacted if a bug or regression is found:

PlaysBadly

@github-actions
Copy link
Copy Markdown

Hi @PatrickPlaysBadly, thanks for the contribution.

This PR was automatically closed because it doesn't fit our contribution workflow:

  • You aren't currently assigned to an issue labelled approved, and
  • The change is larger than 50 lines (our cap for unsolicited contributions).

To contribute to OpenFront:

  1. For bugs or small quality-of-life improvements: open an issue. A maintainer will label it approved if it's something we'll work on.
  2. For feature ideas: discuss in the dev Discord first. We don't accept unsolicited feature PRs — even if they're good ideas, every merged feature is a permanent maintenance burden.
  3. Once an issue is labelled approved, comment asking to be assigned. After you're assigned, you can open a PR referencing that issue.

If you believe this was closed in error, please reach out on our Discord or comment below.

See CONTRIBUTING.md for the full contribution process.

Automated PR gate. Source.

@github-actions github-actions Bot closed this May 31, 2026
@github-project-automation github-project-automation Bot moved this from Triage to Complete in OpenFront Release Management May 31, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 31, 2026

Review Change Stack

Walkthrough

This PR introduces the "Chopping Block" map to the game by adding map assets, registering the new type in the core game configuration, updating map-rotation weights, and providing localization entries. The Caribbean map is simultaneously removed from all registries.

Changes

Chopping Block Map Addition

Layer / File(s) Summary
Map asset definitions and metadata
map-generator/assets/maps/choppingblock/info.json, resources/maps/choppingblock/manifest.json
Chopping Block map data includes nation positions with coordinates, additional nation pattern names, and rectangular spawn regions for team counts 2 and 4.
Core map type and category registration
src/core/game/Game.ts
GameMapType enum gains ChoppingBlock and loses Caribbean; arcade category list receives ChoppingBlock after TheBox.
Map rotation frequency configuration
src/server/MapPlaylist.ts
FREQUENCY weights table assigns ChoppingBlock a frequency of 3 and removes Caribbean with frequency 5; other entries are reordered.
Localization and map generator registry
resources/lang/en.json, map-generator/main.go
English translation adds choppingblock key; map-generator registry adds choppingblock entry after caucasus.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

  • Add Map Copping Block #4080: Adds the same "Chopping Block" map with corresponding asset files, manifest, and registry updates—likely a duplicate or closely timed parallel submission.

Possibly related PRs

  • openfrontio/OpenFrontIO#3975: Updates the same map registration plumbing in Game.ts enum/categories and MapPlaylist.ts frequency table for a different map.
  • openfrontio/OpenFrontIO#3998: Modifies identical map-registration code paths (enum, category, frequency, manifest, localization) for a different map addition.
  • openfrontio/OpenFrontIO#4067: Updates the same game-type and rotation plumbing to add one map and remove another, directly parallel to this PR's Caribbean removal and ChoppingBlock addition.

Suggested reviewers

  • evanpelle

Poem

🗺️ A new land awaits, the Chopping Block born,
Caribbean bids farewell at the break of morn.
Spawn points aligned, frequencies set right,
Registry complete—the map's ready to fight! ⚔️

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding a new map called 'Chopping Block' to the game.
Description check ✅ Passed The description is directly related to the changeset, referencing the issue it resolves and providing context about the new map addition.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies"


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.

@PatrickPlaysBadly
Copy link
Copy Markdown
Contributor Author

Add Map Copping Block #4080

Shows

github-actions
added
approved
Approved for a PR, if you assigned to the issue.
and removed
not-approved
This issue has NOT been approved by the maintainers.
1 hour ago

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)
src/core/game/Game.ts (1)

96-184: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Caribbean not fully removed—map assets still exist

  • “Caribbean” is still referenced in resources/maps/caribbean/manifest.json and map-generator/assets/maps/caribbean/info.json. Remove or rename these files/folders so the Caribbean map is completely gone (not only from src/core/game/Game.ts).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/core/game/Game.ts` around lines 96 - 184, The enum GameMapType shows
Caribbean was removed from src/core/game/Game.ts but the map assets still exist;
delete or rename the leftover asset folder/files
(resources/maps/caribbean/manifest.json and
map-generator/assets/maps/caribbean/info.json) and any sibling files in those
caribbean directories so the map is fully removed, then run a repo-wide search
for "caribbean" and remove/update any remaining references (tests, manifests,
import paths) to keep code and assets consistent with GameMapType.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/core/game/Game.ts`:
- Line 181: The test fails because there are leftover asset folders for
"Caribbean" but no corresponding GameMapType entry; either re-add a matching
enum member (e.g., add Caribbean to the GameMapType enum alongside
ChoppingBlock) so tests detect the map type, or remove the unused directories
under resources/maps/caribbean and map-generator/assets/maps/caribbean so there
are no excess folders; locate the GameMapType enum (where ChoppingBlock is
defined) and update it or delete the asset dirs, then run
tests/MapConsistency.test.ts to confirm coverage.

---

Outside diff comments:
In `@src/core/game/Game.ts`:
- Around line 96-184: The enum GameMapType shows Caribbean was removed from
src/core/game/Game.ts but the map assets still exist; delete or rename the
leftover asset folder/files (resources/maps/caribbean/manifest.json and
map-generator/assets/maps/caribbean/info.json) and any sibling files in those
caribbean directories so the map is fully removed, then run a repo-wide search
for "caribbean" and remove/update any remaining references (tests, manifests,
import paths) to keep code and assets consistent with GameMapType.
🪄 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: df6f5171-3450-421e-845c-df0b550cc08a

📥 Commits

Reviewing files that changed from the base of the PR and between 885e314 and 020980e.

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

Comment thread src/core/game/Game.ts
Korea = "Korea",
Balkans = "Balkans",
YellowSea = "Yellow Sea",
ChoppingBlock = "Chopping Block",
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 | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for test files that reference ChoppingBlock or test map type registration
rg -i "choppingblock" tests/ --type ts -C 3

Repository: openfrontio/OpenFrontIO

Length of output: 49


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show whether tests/ exists and what it contains (lightweight)
ls -la
ls -la tests 2>/dev/null || true

# 1) Look for any test mentions of the new map type
rg -n -i "choppingblock" . -g'*.ts' || true
rg -n -i "chopping block" . -g'*.ts' || true

# 2) Look for any registration/iteration over GameMapType in tests
rg -n "GameMapType" tests -S -g'*.ts' || true
rg -n "map type|mapType|category|arcade" tests -S -g'*.ts' || true

# 3) Ensure Caribbean was fully removed (in code + tests)
rg -n -i "caribbean" src tests . -S -g'*.ts' || true

# 4) Confirm where the enum + arcade category live, and what other places enumerate map types
rg -n "enum .*GameMapType|GameMapType\." src/core -S -g'*.ts' || true

Repository: openfrontio/OpenFrontIO

Length of output: 14705


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Inspect MapConsistency.test.ts where it checks registration + categories + translations
sed -n '1,260p' tests/MapConsistency.test.ts
echo '---'
sed -n '260,380p' tests/MapConsistency.test.ts

# 2) Confirm Caribbean references are truly gone
rg -n -i "caribbean" src tests . -S -g'*.ts' || true

Repository: openfrontio/OpenFrontIO

Length of output: 11372


🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -i "caribbean" src tests . -S -g'*.ts' || true

# Also check for any tests that load/validate map loading via GameMapType
rg -n "getMapData\(|FetchGameMapLoader|MapPlaylist|mapCategories" tests -S -g'*.ts' || true

Repository: openfrontio/OpenFrontIO

Length of output: 1550


🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -i "caribbean" src/core tests -S -g'*.ts' || true

Repository: openfrontio/OpenFrontIO

Length of output: 49


🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -i "caribbean" src map-generator resources . || true

Repository: openfrontio/OpenFrontIO

Length of output: 345


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Caribbean presence/absence in core enum/categories
rg -n "Caribbean" src/core/game/Game.ts || true

# 2) ChoppingBlock assets folders exist
ls -la "resources/maps/choppingblock" 2>/dev/null || echo "missing: resources/maps/choppingblock"
ls -la "map-generator/assets/maps/choppingblock" 2>/dev/null || echo "missing: map-generator/assets/maps/choppingblock"

# 3) main.go entries for choppingblock + caribbean
rg -n 'Name:\s*"choppingblock"|Name:\s*"caribbean"' map-generator/main.go || true

Repository: openfrontio/OpenFrontIO

Length of output: 789


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== caribbean matches in Game.ts =="
rg -n -i "caribbean" src/core/game/Game.ts || true

echo "== Enum section around GameMapType =="
sed -n '70,140p' src/core/game/Game.ts

echo "== mapCategories references in Game.ts =="
rg -n -i "mapCategories|arcade|ChoppingBlock" src/core/game/Game.ts

echo "== caribbean matches in map-generator/main.go =="
rg -n -i 'Name:\s*"caribbean"|caribbean' map-generator/main.go || true

Repository: openfrontio/OpenFrontIO

Length of output: 2246


Fix Caribbean leftover assets (and confirm ChoppingBlock coverage)

  • tests/MapConsistency.test.ts auto-checks every GameMapType value (so ChoppingBlock is covered for mapCategories membership and required resources/maps/* + map-generator/assets/maps/* assets, even without a test that mentions the string directly).
  • Caribbean is still present under resources/maps/caribbean/ and map-generator/assets/maps/caribbean/, but Caribbean is not in src/core/game/Game.ts anymore; tests/MapConsistency.test.ts will fail because it rejects “excess folders” with no matching GameMapType.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/core/game/Game.ts` at line 181, The test fails because there are leftover
asset folders for "Caribbean" but no corresponding GameMapType entry; either
re-add a matching enum member (e.g., add Caribbean to the GameMapType enum
alongside ChoppingBlock) so tests detect the map type, or remove the unused
directories under resources/maps/caribbean and
map-generator/assets/maps/caribbean so there are no excess folders; locate the
GameMapType enum (where ChoppingBlock is defined) and update it or delete the
asset dirs, then run tests/MapConsistency.test.ts to confirm coverage.

@github-project-automation github-project-automation Bot moved this from Complete to Development in OpenFront Release Management May 31, 2026
@evanpelle evanpelle reopened this May 31, 2026
@github-project-automation github-project-automation Bot moved this from Development to Triage in OpenFront Release Management May 31, 2026
@github-actions
Copy link
Copy Markdown

Hi @PatrickPlaysBadly, thanks for the contribution.

This PR was automatically closed because it doesn't fit our contribution workflow:

  • You aren't currently assigned to an issue labelled approved, and
  • The change is larger than 50 lines (our cap for unsolicited contributions).

To contribute to OpenFront:

  1. For bugs or small quality-of-life improvements: open an issue. A maintainer will label it approved if it's something we'll work on.
  2. For feature ideas: discuss in the dev Discord first. We don't accept unsolicited feature PRs — even if they're good ideas, every merged feature is a permanent maintenance burden.
  3. Once an issue is labelled approved, comment asking to be assigned. After you're assigned, you can open a PR referencing that issue.

If you believe this was closed in error, please reach out on our Discord or comment below.

See CONTRIBUTING.md for the full contribution process.

Automated PR gate. Source.

@github-actions github-actions Bot closed this May 31, 2026
@github-project-automation github-project-automation Bot moved this from Triage to Complete in OpenFront Release Management May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-closed-needs-issue PR closed by gate — see comment for next steps

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

Add Map Copping Block

2 participants