Skip to content

Adds onion map#4057

Open
TKTK123456 wants to merge 6 commits into
openfrontio:mainfrom
TKTK123456:Onion-map
Open

Adds onion map#4057
TKTK123456 wants to merge 6 commits into
openfrontio:mainfrom
TKTK123456:Onion-map

Conversation

@TKTK123456
Copy link
Copy Markdown

@TKTK123456 TKTK123456 commented May 28, 2026

If this PR fixes an issue, link it below. If not, delete these two lines.
Resolves #4055

Description:

Adds a 512*512 onion map with 3 nations (Leafer Confederation, Outer Enclave and Inner Tribe)

thumbnail

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:

tktk1234567

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 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: 11fec6c0-783d-4ac6-b34d-ffd878678c2b

📥 Commits

Reviewing files that changed from the base of the PR and between 00b5723 and 3edfeac.

📒 Files selected for processing (1)
  • resources/lang/en.json
✅ Files skipped from review due to trivial changes (1)
  • resources/lang/en.json

Walkthrough

Adds the "Onion" map end-to-end: two JSON map assets (info and manifest), registers "onion" in the map-generator, exposes GameMapType.Onion and adds it to mapCategories.arcade, and sets playlist FREQUENCY["Onion"] = 2.

Changes

Onion Map Addition

Layer / File(s) Summary
Map configuration and definition
map-generator/assets/maps/onion/info.json, resources/maps/onion/manifest.json
info.json defines name: "onion" and three nations (Leafer Confederation, Outer Enclave, Inner Tribe) with coordinates and empty flag. manifest.json lists base, map16x, and map4x layers with dimensions/tiles and repeats the three nations with names and coordinates.
Generator registry update
map-generator/main.go
Adds "onion" to the maps registry so the generator will process the new map and locate its assets.
Game enum, category, and playlist frequency
src/core/game/Game.ts, src/server/MapPlaylist.ts
Adds GameMapType.Onion, includes it in mapCategories.arcade, and adds Onion: 2 to the playlist FREQUENCY table.
Localization
resources/lang/en.json
Adds map.onion = "Onion" and confirms map.balkans in the English locale.

Sequence Diagram

sequenceDiagram
  participant MapGenerator
  participant MapsRegistry
  participant MapAssets
  participant GameCore
  participant PlaylistService
  MapGenerator->>MapsRegistry: register "onion"
  MapsRegistry->>MapAssets: load info.json & manifest.json
  GameCore->>MapsRegistry: reference GameMapType.Onion
  GameCore->>PlaylistService: include "Onion" via mapCategories
  PlaylistService->>PlaylistService: set FREQUENCY["Onion"] = 2
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

  • Onion Map #3974: Appears to add the same "Onion" map and touches matching registration and asset points.

Possibly related PRs

Suggested reviewers

  • evanpelle
  • RickD004

Poem

🧅 Onion map now takes the stage,
Three nations ring the layered page.
Registry whispers its new name,
Game and playlists call its game,
Players soon will taste its sage.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Adds onion map' directly summarizes the main change—a new map is being added to the system.
Description check ✅ Passed The description explains the new map addition with specific details: 512×512 size, three nations, and a visual thumbnail. It relates directly to the changeset.
Linked Issues check ✅ Passed All coding requirements from #4055 are met: the onion map is added for Singleplayer/Custom lobbies [#4055], included in the lobby rotation [#4055], and contains the correct specifications (512×512, 3 nations) [#4055].
Out of Scope Changes check ✅ Passed All changes are in scope: map data files (info.json, manifest.json), game type definitions, map playlist weighting, and localization strings directly support the objective of adding the onion map.
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.

coderabbitai[bot]
coderabbitai Bot previously approved these changes May 28, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 28, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

Feature: Onion Map

1 participant