Skip to content

Add map chopping block#4082

Open
PatrickPlaysBadly wants to merge 15 commits into
openfrontio:mainfrom
PatrickPlaysBadly:Add-Map-Chopping-Block
Open

Add map chopping block#4082
PatrickPlaysBadly wants to merge 15 commits into
openfrontio:mainfrom
PatrickPlaysBadly:Add-Map-Chopping-Block

Conversation

@PatrickPlaysBadly
Copy link
Copy Markdown
Contributor

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 31, 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: abbe7b66-ee60-4e09-a460-0d115a0cd815

📥 Commits

Reviewing files that changed from the base of the PR and between bcada82 and 2c72078.

📒 Files selected for processing (2)
  • map-generator/main.go
  • resources/lang/en.json
✅ Files skipped from review due to trivial changes (1)
  • map-generator/main.go

Walkthrough

Adds the Chopping Block map assets and manifest, registers the map in the map-generator and playlist (replacing Caribbean), adds an English localization entry, and wires GameMapType.ChoppingBlock into the arcade category.

Changes

Chopping Block Map Addition

Layer / File(s) Summary
Map asset definitions
map-generator/assets/maps/choppingblock/info.json, resources/maps/choppingblock/manifest.json
Chopping Block metadata and manifest added: 32 primary nations with coordinates, many additional nation styles, map dimensions (map, map16x, map4x), and teamGameSpawnAreas for 2- and 4-team modes.
Game type and category wiring
src/core/game/Game.ts
GameMapType gains ChoppingBlock and mapCategories.arcade includes GameMapType.ChoppingBlock.
Map registration, playlist, and localization
map-generator/main.go, src/server/MapPlaylist.ts, resources/lang/en.json
Map-generator registry now includes choppingblock; MapPlaylist.FREQUENCY replaces the Caribbean entry with ChoppingBlock (value 4); English localization adds choppingblock.

Sequence Diagram(s)

sequenceDiagram
  participant CLI as MapGenerator
  participant Manifest as ResourcesManifest
  participant Server as MapPlaylist
  participant Game as GameCore
  CLI->>Manifest: register/load "choppingblock" manifest
  Manifest->>Game: expose map metadata (nations, dimensions, spawnAreas)
  Game->>Server: map type registered (GameMapType.ChoppingBlock)
  Server->>Game: include ChoppingBlock in public playlists (frequency=4)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • evanpelle
  • RickD004

Poem

Chopping Block set with nations and lines,
Spawn boxes placed where each team aligns.
Generator, manifest, playlist in sync,
Arcade map added — ready to link. 🎮

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add map chopping block' clearly and directly describes the main change: adding a new map named Chopping Block to the system.
Description check ✅ Passed The description is related to the changeset, referencing issue #4080 and providing context about the Chopping Block map addition with relevant details.
Linked Issues check ✅ Passed The pull request successfully implements all coding requirements from issue #4080: adds map metadata with 32 primary nations and ~45 secondary names, configures spawn areas for 2 and 4-team games, registers the map in the arcade category, and updates translations.
Out of Scope Changes check ✅ Passed All changes are directly related to adding the Chopping Block map: metadata files, map registration, arcade categorization, playlist frequency, and translation updates. The removal of Caribbean map is a necessary cleanup as part of the map addition workflow.
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.

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.

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 `@resources/maps/choppingblock/manifest.json`:
- Around line 1-461: The manifest.json is failing style checks (unformatted JSON
around keys like "additionalNations", "map", "nations", and
"teamGameSpawnAreas"); run the project's Prettier formatter (e.g., npx prettier
--write manifest.json or the repo's npm/yarn format script) against this file to
normalize spacing and ordering, then commit the formatted manifest.json so CI
style checks pass.
🪄 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: 2eec93c7-b42a-4306-ba87-480616ac5593

📥 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 on lines +1 to +461
{
"additionalNations": [
{
"name": "Repeaterer"
},
{
"name": "Checkered"
},
{
"name": "Plaid"
},
{
"name": "Gingham"
},
{
"name": "Tartan"
},
{
"name": "Madras"
},
{
"name": "Pinstripe"
},
{
"name": "Awning"
},
{
"name": "Argyle"
},
{
"name": "Houndstooth"
},
{
"name": "Herringbone"
},
{
"name": "Chevron"
},
{
"name": "Lattice"
},
{
"name": "Graph Check"
},
{
"name": "Windowpane"
},
{
"name": "Polka Dots"
},
{
"name": "Confetti"
},
{
"name": "Speckled"
},
{
"name": "Cheetah"
},
{
"name": "Zebra"
},
{
"name": "Tiger"
},
{
"name": "Giraffe"
},
{
"name": "Snakeskin"
},
{
"name": "Cowhide"
},
{
"name": "Camouflage"
},
{
"name": "Peacock"
},
{
"name": "Botanical"
},
{
"name": "Chintz"
},
{
"name": "Damask"
},
{
"name": "Toile"
},
{
"name": "Brocade"
},
{
"name": "Ikat"
},
{
"name": "Batik"
},
{
"name": "Moroccan"
},
{
"name": "Suzani"
},
{
"name": "Kashmiri"
},
{
"name": "Greek Key"
},
{
"name": "Geometrical"
},
{
"name": "Kaleidoscope"
},
{
"name": "Gradient"
},
{
"name": "Splatter"
},
{
"name": "Marbled"
},
{
"name": "Quilted"
},
{
"name": "Eyelet"
},
{
"name": "Scallop"
},
{
"name": "Bubble"
},
{
"name": "Honeycomb"
}
],
"map": {
"height": 1616,
"num_land_tiles": 1485703,
"width": 1616
},
"map16x": {
"height": 404,
"num_land_tiles": 87035,
"width": 404
},
"map4x": {
"height": 808,
"num_land_tiles": 364395,
"width": 808
},
"name": "Chopping Block",
"nations": [
{
"coordinates": [
230,
230
],
"flag": "",
"name": "Boxey"
},
{
"coordinates": [
230,
570
],
"flag": "",
"name": "Gridsly"
},
{
"coordinates": [
580,
230
],
"flag": "",
"name": "Blocko"
},
{
"coordinates": [
570,
570
],
"flag": "",
"name": "Squarm"
},
{
"coordinates": [
1030,
230
],
"flag": "",
"name": "Boximilian"
},
{
"coordinates": [
1030,
570
],
"flag": "",
"name": "Rectanglo"
},
{
"coordinates": [
1370,
230
],
"flag": "",
"name": "Cornerlius"
},
{
"coordinates": [
1380,
570
],
"flag": "",
"name": "Repeater"
},
{
"coordinates": [
230,
1030
],
"flag": "",
"name": "Derorrim"
},
{
"coordinates": [
230,
1380
],
"flag": "",
"name": "Boxedin"
},
{
"coordinates": [
580,
1040
],
"flag": "",
"name": "Mazely"
},
{
"coordinates": [
580,
1380
],
"flag": "",
"name": "Diagonalf"
},
{
"coordinates": [
1040,
1040
],
"flag": "",
"name": "Blockedhof"
},
{
"coordinates": [
1040,
1390
],
"flag": "",
"name": "Blockhead"
},
{
"coordinates": [
1380,
1035
],
"flag": "",
"name": "Chopin"
},
{
"coordinates": [
1380,
1390
],
"flag": "",
"name": "Hacker"
},
{
"coordinates": [
400,
160
],
"flag": "",
"name": "Slasher"
},
{
"coordinates": [
160,
410
],
"flag": "",
"name": "Brixs"
},
{
"coordinates": [
410,
650
],
"flag": "",
"name": "Plaido"
},
{
"coordinates": [
650,
415
],
"flag": "",
"name": "Harlequin"
},
{
"coordinates": [
410,
970
],
"flag": "",
"name": "Checkheir"
},
{
"coordinates": [
160,
1210
],
"flag": "",
"name": "Zigzag"
},
{
"coordinates": [
410,
1460
],
"flag": "",
"name": "Scaler"
},
{
"coordinates": [
650,
1220
],
"flag": "",
"name": "Crossed"
},
{
"coordinates": [
1210,
970
],
"flag": "",
"name": "Beeline"
},
{
"coordinates": [
960,
1220
],
"flag": "",
"name": "Bowtie"
},
{
"coordinates": [
1210,
1460
],
"flag": "",
"name": "Buckly"
},
{
"coordinates": [
1450,
1210
],
"flag": "",
"name": "Dexted"
},
{
"coordinates": [
1210,
170
],
"flag": "",
"name": "Flukes"
},
{
"coordinates": [
970,
410
],
"flag": "",
"name": "Jonqal"
},
{
"coordinates": [
1210,
650
],
"flag": "",
"name": "Huggins"
},
{
"coordinates": [
1460,
410
],
"flag": "",
"name": "Keeko"
}
],
"teamGameSpawnAreas": {
"2": [
{
"height": 1610,
"width": 800,
"x": 0,
"y": 0
},
{
"height": 1610,
"width": 800,
"x": 809,
"y": 0
}
],
"4": [
{
"height": 800,
"width": 800,
"x": 0,
"y": 0
},
{
"height": 800,
"width": 800,
"x": 809,
"y": 0
},
{
"height": 800,
"width": 800,
"x": 0,
"y": 809
},
{
"height": 800,
"width": 800,
"x": 809,
"y": 809
}
]
}
} No newline at end of file
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 | 🟡 Minor | ⚡ Quick win

Run Prettier on this manifest before merge.

CI is already failing style checks for this file; please format it with Prettier to unblock the pipeline.

🧰 Tools
🪛 GitHub Actions: 🧪 CI / 🎨 Prettier

[warning] 1-1: Prettier reported code style issues in this file. Run 'prettier --write resources/maps/choppingblock/manifest.json' (or 'npx prettier --write .') to fix.

🪛 GitHub Actions: 🧪 CI / 2_🎨 Prettier.txt

[warning] 1-1: Prettier --check reported code style issues. Run 'npx prettier --write resources/maps/choppingblock/manifest.json' (or 'npx prettier --write .' ) to fix.

🤖 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 `@resources/maps/choppingblock/manifest.json` around lines 1 - 461, The
manifest.json is failing style checks (unformatted JSON around keys like
"additionalNations", "map", "nations", and "teamGameSpawnAreas"); run the
project's Prettier formatter (e.g., npx prettier --write manifest.json or the
repo's npm/yarn format script) against this file to normalize spacing and
ordering, then commit the formatted manifest.json so CI style checks pass.

@github-project-automation github-project-automation Bot moved this from Triage to Development in OpenFront Release Management May 31, 2026
evanpelle
evanpelle previously approved these changes Jun 1, 2026
Updated Game.ts
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: 2

🤖 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 183: The PR adds a new map enum GameMapType.Caribbean and assets/playlist
wiring for the Caribbean map but the PR title/description only mentions
“Chopping Block”; update the PR metadata to accurately reflect that Caribbean is
included (or split the Caribbean changes into a separate PR) so reviewers know
the scope; locate the symbol GameMapType.Caribbean in src/core/game/Game.ts and
the Caribbean entry in src/server/MapPlaylist.ts and ensure the PR description
lists both maps (or separate the commits/files into distinct PRs).

In `@src/server/MapPlaylist.ts`:
- Line 53: The diff adds a "Caribbean" entry to the playlist frequency map (the
key "Caribbean" in MapPlaylist.ts) but the PR only intended to add "Chopping
Block" per the objectives; verify whether "Caribbean" should be part of this
change and if not, remove the "Caribbean: 5" entry from the playlist frequency
map to keep the commit focused (also check Game.ts for any related additions of
Caribbean and revert them if they were added accidentally).
🪄 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: e4ddc826-a163-4d53-abb5-538e0edd3452

📥 Commits

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

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

Comment thread src/core/game/Game.ts
Comment thread src/server/MapPlaylist.ts
@iiamlewis iiamlewis added this to the v32 milestone Jun 1, 2026
@iiamlewis iiamlewis added Maps A new map, or adjustments to an existing map itself, its json, etc, approved Approved for a PR, if you assigned to the issue. labels Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Approved for a PR, if you assigned to the issue. Maps A new map, or adjustments to an existing map itself, its json, etc,

Projects

Status: Development

Development

Successfully merging this pull request may close these issues.

Add Map Copping Block

3 participants