-
Notifications
You must be signed in to change notification settings - Fork 762
Restructured PR for Philippines Addition #2812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
WalkthroughThis PR adds a new "Philippines" map: new map asset and manifest, registers it in the map generator, updates localization, client map descriptions, GameMapType enum and regional categories, default player counts, and server playlist frequencies. Changes
Sequence Diagram(s)(omitted — changes are data/registration-focused without a new multi-component control flow) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (3)
🧰 Additional context used🧠 Learnings (6)📚 Learning: 2025-10-21T20:06:04.823ZApplied to files:
📚 Learning: 2025-10-20T20:15:28.858ZApplied to files:
📚 Learning: 2025-11-12T23:11:34.445ZApplied to files:
📚 Learning: 2025-10-26T15:37:07.732ZApplied to files:
📚 Learning: 2025-07-12T06:35:10.457ZApplied to files:
📚 Learning: 2025-10-27T08:59:47.620ZApplied to files:
🪛 GitHub Actions: 🧪 CIsrc/core/game/Game.ts[error] 119-119: TypeScript error TS2339: Property 'AmazonRiver' does not exist on type 'typeof GameMapType'. 🔇 Additional comments (4)
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 |
|
@TsProphet94 can you check these conflicts? |
evanpelle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
DevelopingTom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
looks like there are some merge conflicts |
52c09bc
|
Done :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/core/game/Game.ts (2)
117-120: Fix the reference to removed map.This function references
GameMapType.AmazonRiverwhich was removed from the enum, causing the TypeScript compilation error shown in the pipeline failure.🐛 Proposed fix
If no current maps require unusual thumbnail sizing, simplify the function:
export function hasUnusualThumbnailSize(map: GameMapType): boolean { - return map === GameMapType.AmazonRiver; + return false; }If Philippines or another map needs
object-fit: cover, update accordingly:export function hasUnusualThumbnailSize(map: GameMapType): boolean { - return map === GameMapType.AmazonRiver; + return map === GameMapType.Philippines; }
159-171: Remove references to deleted maps from categories.The
fantasyandarcadecategories still reference maps that were removed from theGameMapTypeenum:
- Line 168:
GameMapType.Surrounded(removed)- Line 170:
GameMapType.Didier(removed)- Line 170:
GameMapType.Sierpinski(removed)These will cause TypeScript compilation errors.
🐛 Proposed fix
fantasy: [ GameMapType.Pangaea, GameMapType.Pluto, GameMapType.Mars, GameMapType.DeglaciatedAntarctica, GameMapType.Achiran, GameMapType.BaikalNukeWars, GameMapType.FourIslands, GameMapType.Svalmel, - GameMapType.Surrounded, ], - arcade: [GameMapType.Didier, GameMapType.Sierpinski], + arcade: [], };
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
map-generator/main.goresources/lang/en.jsonsrc/client/components/Maps.tssrc/core/configuration/DefaultConfig.tssrc/core/game/Game.tssrc/server/MapPlaylist.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- map-generator/main.go
- src/server/MapPlaylist.ts
- resources/lang/en.json
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-10-21T20:06:04.823Z
Learnt from: Saphereye
Repo: openfrontio/OpenFrontIO PR: 2233
File: src/client/HostLobbyModal.ts:891-891
Timestamp: 2025-10-21T20:06:04.823Z
Learning: For the HumansVsNations game mode in `src/client/HostLobbyModal.ts` and related files, the implementation strategy is to generate all nations and adjust their strength for balancing, rather than limiting lobby size based on the number of available nations on the map.
Applied to files:
src/core/configuration/DefaultConfig.ts
📚 Learning: 2025-10-20T20:15:28.858Z
Learnt from: sambokai
Repo: openfrontio/OpenFrontIO PR: 2225
File: src/core/execution/FakeHumanExecution.ts:51-51
Timestamp: 2025-10-20T20:15:28.858Z
Learning: In src/core/execution/FakeHumanExecution.ts, game balance constants like MIRV_COOLDOWN_TICKS, MIRV_HESITATION_ODDS, VICTORY_DENIAL_TEAM_THRESHOLD, VICTORY_DENIAL_INDIVIDUAL_THRESHOLD, and STEAMROLL_CITY_GAP_MULTIPLIER are experimental tuning parameters subject to frequent change during balance testing. Do not flag changes to these values as issues or compare them against previous values.
Applied to files:
src/core/configuration/DefaultConfig.ts
📚 Learning: 2025-11-12T23:11:34.445Z
Learnt from: MaxHT0x
Repo: openfrontio/OpenFrontIO PR: 2262
File: src/core/configuration/DefaultConfig.ts:806-832
Timestamp: 2025-11-12T23:11:34.445Z
Learning: In src/core/configuration/DefaultConfig.ts, JSDoc documentation for configuration methods should not be added inline, as it was requested that documentation be placed elsewhere in the codebase.
Applied to files:
src/core/configuration/DefaultConfig.ts
📚 Learning: 2025-10-26T15:37:07.732Z
Learnt from: GlacialDrift
Repo: openfrontio/OpenFrontIO PR: 2298
File: src/client/graphics/layers/TerritoryLayer.ts:200-210
Timestamp: 2025-10-26T15:37:07.732Z
Learning: In GameImpl.ts lines 124-139, team assignment logic varies by number of teams: when numPlayerTeams < 8, teams are assigned ColoredTeams values (Red, Blue, Yellow, Green, Purple, Orange, Teal); when numPlayerTeams >= 8, teams are assigned generic string identifiers like "Team 1", "Team 2", etc., which are not members of ColoredTeams.
Applied to files:
src/core/configuration/DefaultConfig.ts
📚 Learning: 2025-07-12T06:35:10.457Z
Learnt from: Aotumuri
Repo: openfrontio/OpenFrontIO PR: 1357
File: resources/lang/ja.json:0-0
Timestamp: 2025-07-12T06:35:10.457Z
Learning: In OpenFrontIO project, "giantworldmap" is the correct localization key name for the giant world map, used consistently across all language files and TypeScript code. Do not suggest renaming this key.
Applied to files:
src/core/game/Game.ts
📚 Learning: 2025-10-27T08:59:47.620Z
Learnt from: TheGiraffe3
Repo: openfrontio/OpenFrontIO PR: 2306
File: src/core/game/Game.ts:141-141
Timestamp: 2025-10-27T08:59:47.620Z
Learning: In OpenFrontIO, gamemode-specific map variants that have altered geography from their real-world counterparts should be categorized as "fantasy" rather than "regional", even if based on real locations. Example: BaikalNukeWars is in "fantasy" because it has different islands than real Baikal.
Applied to files:
src/core/game/Game.ts
🪛 GitHub Actions: 🧪 CI
src/core/game/Game.ts
[error] 119-119: TypeScript error TS2339: Property 'AmazonRiver' does not exist on type 'typeof GameMapType'.
🔇 Additional comments (4)
src/core/game/Game.ts (2)
112-112: LGTM! Philippines added to enum.The addition follows the existing naming pattern and enum structure correctly.
157-157: LGTM! Philippines correctly categorized.Adding Philippines to the regional category is appropriate as it represents a real-world geographic region.
src/client/components/Maps.ts (1)
52-52: LGTM! Map description added correctly.The Philippines entry is properly added to the
MapDescriptionrecord with the correct type constraint.src/core/configuration/DefaultConfig.ts (1)
90-90: LGTM! Player configuration is appropriate.The player count configuration
[70, 50, 40]for Philippines matches similar regional maps like Mena and South America, which is appropriate for a Southeast Asian regional map.
Description:
Adds a new Philippines map featuring Southeast Asian nations.


Changes
Added Philippines map files (map.bin, map4x.bin, map16x.bin, thumbnail.webp, manifest.json)
Added map-generator source assets (image.png, info.json)
Nations
Philippines
Indonesia
Vietnam
Malaysia
Thailand
Cambodia
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
TSProphet