Skip to content

Add Map Chopping Block#3952

Open
PatrickPlaysBadly wants to merge 6 commits into
openfrontio:mainfrom
PatrickPlaysBadly:ChoppingBlock
Open

Add Map Chopping Block#3952
PatrickPlaysBadly wants to merge 6 commits into
openfrontio:mainfrom
PatrickPlaysBadly:ChoppingBlock

Conversation

@PatrickPlaysBadly
Copy link
Copy Markdown
Contributor

Description:

Describe the PR.

Custom designed map based off of a wooden chopping block pattern/production method.
About 50 additional named nations have been added along with the 32 default.
Map is setup for 2 and 4 teams.

https://www.youtube.com/watch?v=SVwQWMtZRuI

https://discord.com/channels/1284581928254701718/1482787372654399489/1482787372654399489

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:

PlaysBadly

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 17, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ PatrickPlaysBadly
❌ SAM


SAM seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 17, 2026

Review Change Stack

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: b30eafcf-ae69-4309-93c0-5ebcc4daac9d

📥 Commits

Reviewing files that changed from the base of the PR and between 211dabe and dbea845.

📒 Files selected for processing (2)
  • resources/lang/en.json
  • src/core/game/Game.ts

Walkthrough

Adds a new playable map "Chopping Block": map asset and manifest files, a new GameMapType entry, and integration into the map generator, English translations, and playlist rotation.

Changes

Chopping Block Map Addition

Layer / File(s) Summary
Map asset and metadata definitions
map-generator/assets/maps/choppingblock/info.json, resources/maps/choppingblock/manifest.json
Map layout, nation coordinates, additionalNations, and team spawn rectangles for 2- and 4-player modes are defined.
Map type registration
src/core/game/Game.ts
Adds GameMapType.ChoppingBlock and includes it in mapCategories.arcade.
Build, language, and playlist integration
map-generator/main.go, resources/lang/en.json, src/server/MapPlaylist.ts
Registers the map in the generator registry, adds map.choppingblock = "Chopping Block" to English locale, and sets playlist frequency ChoppingBlock: 5.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • openfrontio/OpenFrontIO#3929: Both PRs extend the map-selection/playlist logic by updating the GameMapType enum and corresponding registry/MapPlaylist.FREQUENCY entries.
  • openfrontio/OpenFrontIO#3920: Adds a different map using the same end-to-end integration pattern (generator, GameMapType, translations, playlist).
  • openfrontio/OpenFrontIO#3935: Another end-to-end map addition touching the same enum, categories, and playlist wiring.

Suggested reviewers

  • evanpelle

Poem

🗺️ New map by JSON, crisp and bright,
Chopping Block readies for each fight,
Manifests, types, and playlists sing,
Teams will clash — let the rounds begin! ⚔️

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add Map Chopping Block' clearly and directly summarizes the main change: adding a new map named Chopping Block to the codebase.
Description check ✅ Passed The description is directly related to the changeset, explaining the map's design inspiration, nation count, team configurations, and providing reference links.
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.


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

🤖 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 175: Add unit tests that cover the new enum member and its registration:
write a test asserting that the GameCategory (or relevant enum/class) includes
the "ChoppingBlock" member (e.g., check Game.ChoppingBlock or export where the
enum is defined) and another test asserting that the arcade category
registration (the function or map used to register categories, e.g.,
registerCategory or arcadeCategoryEntries) contains the ChoppingBlock entry;
ensure tests import the same symbols added in Game.ts and assert
membership/values so CI enforces the src/core/ change.
🪄 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: 2f20a946-4c81-4416-9370-6526bd2ff21c

📥 Commits

Reviewing files that changed from the base of the PR and between 2e17fb5 and 6674317.

⛔ 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
@github-project-automation github-project-automation Bot moved this from Triage to Development in OpenFront Release Management May 17, 2026
@RickD004
Copy link
Copy Markdown
Contributor

@coderabbitai Dismiss change request. New maps added to src dont need to be denoted in a test. No map is denoted in a test by name

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# List all review comments by coderabbitai on PR `#3952`
gh pr view 3952 --repo openfrontio/OpenFrontIO --json reviews,comments

# Also list review threads to find resolvable comments
gh api graphql -f query='
{
  repository(owner: "openfrontio", name: "OpenFrontIO") {
    pullRequest(number: 3952) {
      reviewThreads(first: 50) {
        nodes {
          id
          isResolved
          comments(first: 5) {
            nodes {
              author { login }
              body
              databaseId
            }
          }
        }
      }
    }
  }
}'

Length of output: 27881


🏁 Script executed:

#!/bin/bash
# Resolve the review thread PRRT_kwDONcWFSs6CrN3U
gh api graphql -f query='
mutation {
  resolveReviewThread(input: { threadId: "PRRT_kwDONcWFSs6CrN3U" }) {
    thread {
      id
      isResolved
    }
  }
}'

Length of output: 266


@RickD004, thanks for the clarification! I understand — adding a new GameMapType enum entry and its mapCategories registration are simple, low-risk map additions, and the project does not require tests named per map.

Unfortunately, I don't have permission to dismiss the change request programmatically in this repo. You or another maintainer can dismiss it manually via the GitHub PR UI ("Dismiss review" under the review).

I've noted this for future reviews:


✏️ Learnings added
Learnt from: RickD004
URL: https://github.com/openfrontio/OpenFrontIO/pull/3952

Timestamp: 2026-05-19T04:39:10.367Z
Learning: In the openfrontio/OpenFrontIO repository, adding a new map entry to `GameMapType` (enum in `src/core/game/Game.ts`) and registering it in `mapCategories` does NOT require dedicated unit tests. No map is referenced by name in any test. The `src/core/` test requirement does not apply to simple map enum/category additions.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

@evanpelle
Copy link
Copy Markdown
Collaborator

This maps seems a bit crazy.. not sure how the gameplay is on it?

@PatrickPlaysBadly
Copy link
Copy Markdown
Contributor Author

This maps seems a bit crazy.. not sure how the gameplay is on it?

Thats what I wanted to test. I can only do so much with bot testing. I intended to submit two other arcade style maps that are less 'crazy' overall when it comes to the rates of conquest. This map (given its name) seems to allow for the fast cutting up of your opponents. I found it interesting and played into it as a design element. The map was sectioned in four in effort to slow this down, but I didn't want to make another island map. This is meant to be a fast play/anti-stalemate kind of map in contrast to Los Angeles that I've seen go on for over 40 minutes at times.

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.

4 participants