Add Map Chopping Block#4081
Conversation
Add raw map files
Ad chopping block to Go
Add rendered map file for chopping block
Add chopping block to EN
Updated Game.ts
Updated MapPlaylist
|
Hi @PatrickPlaysBadly, thanks for the contribution. This PR was automatically closed because it doesn't fit our contribution workflow:
To contribute to OpenFront:
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. |
WalkthroughThis 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. ChangesChopping Block Map Addition
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ 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. Comment |
|
Add Map Copping Block #4080 Shows github-actions |
There was a problem hiding this comment.
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 winCaribbean not fully removed—map assets still exist
- “Caribbean” is still referenced in
resources/maps/caribbean/manifest.jsonandmap-generator/assets/maps/caribbean/info.json. Remove or rename these files/folders so the Caribbean map is completely gone (not only fromsrc/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
⛔ Files ignored due to path filters (4)
map-generator/assets/maps/choppingblock/image.pngis excluded by!**/*.pngresources/maps/choppingblock/map.binis excluded by!**/*.binresources/maps/choppingblock/map16x.binis excluded by!**/*.binresources/maps/choppingblock/map4x.binis excluded by!**/*.bin
📒 Files selected for processing (7)
map-generator/assets/maps/choppingblock/info.jsonmap-generator/main.goresources/lang/en.jsonresources/maps/choppingblock/manifest.jsonresources/maps/choppingblock/thumbnail.webpsrc/core/game/Game.tssrc/server/MapPlaylist.ts
| Korea = "Korea", | ||
| Balkans = "Balkans", | ||
| YellowSea = "Yellow Sea", | ||
| ChoppingBlock = "Chopping Block", |
There was a problem hiding this comment.
🧩 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 3Repository: 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' || trueRepository: 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' || trueRepository: 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' || trueRepository: openfrontio/OpenFrontIO
Length of output: 1550
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -i "caribbean" src/core tests -S -g'*.ts' || trueRepository: openfrontio/OpenFrontIO
Length of output: 49
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -i "caribbean" src map-generator resources . || trueRepository: 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 || trueRepository: 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 || trueRepository: openfrontio/OpenFrontIO
Length of output: 2246
Fix Caribbean leftover assets (and confirm ChoppingBlock coverage)
tests/MapConsistency.test.tsauto-checks everyGameMapTypevalue (soChoppingBlockis covered for mapCategories membership and requiredresources/maps/*+map-generator/assets/maps/*assets, even without a test that mentions the string directly).Caribbeanis still present underresources/maps/caribbean/andmap-generator/assets/maps/caribbean/, butCaribbeanis not insrc/core/game/Game.tsanymore;tests/MapConsistency.test.tswill fail because it rejects “excess folders” with no matchingGameMapType.
🤖 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.
|
Hi @PatrickPlaysBadly, thanks for the contribution. This PR was automatically closed because it doesn't fit our contribution workflow:
To contribute to OpenFront:
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. |
Resolves #4080
Description:
Add Map Chopping Block
https://youtu.be/NpX73lHiKO8
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
PlaysBadly