Repository navigation
New Map - Malta - #2726
New Map - Malta#2726NathanPortelli wants to merge 4 commits into
Conversation
Map of the islands of Malta and Gozo, incl. in the different languages
WalkthroughAdds Malta as a new playable map: map assets and manifest, map-generator registration, GameMapType entry, client label, default player counts, localization key, and playlist frequency. Changes
sequenceDiagram
autonumber
participant MG as Map Generator
participant Assets as Map Assets (manifest/info.json)
participant Core as Game Core (GameMapType, DefaultConfig)
participant Server as MapPlaylist
participant Client as UI (MapDescription, lang)
Note over Assets,MG: New Malta manifest & info added
MG->>Core: register "malta" in public maps
Core->>Server: include GameMapType.Malta in playlist pool
Server->>Client: playlist may include Malta (frequency 4)
Client->>Core: request map metadata (labels, defaults)
Note over Client,Assets: client displays Malta using MapDescription + lang key
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks✅ Passed checks (3 passed)
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 |
There was a problem hiding this comment.
Actionable comments posted: 14
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
resources/maps/manicouagan/manifest.json (1)
1-108: Fix Prettier formatting issue and revert unrelated changes.The pipeline is failing due to Prettier formatting violations in this file. Additionally, this file contains formatting changes unrelated to the Malta map addition.
Please:
- Run
npx prettier --write resources/maps/manicouagan/manifest.jsonto fix formatting- Consider reverting changes to this file if they are unintentional, as they appear unrelated to adding the Malta map
♻️ Duplicate comments (9)
resources/lang/fi.json (1)
181-182: Same translation workflow concern applies here.As noted in the Korean localization file, non-English translations should be handled separately by the translation team. This file should be excluded from this PR.
resources/lang/sh.json (1)
124-125: Translation workflow: defer to translation team.resources/lang/cs.json (1)
145-146: Translation workflow: defer to translation team.resources/lang/sk.json (1)
169-170: Translation workflow: defer to translation team.resources/lang/es.json (1)
145-146: Translation workflow: defer to translation team.resources/lang/mk.json (1)
181-182: Non-English translation files should not be updated in this PR.Based on learnings, only en.json should be updated in regular PRs when adding new translation keys. Non-English locale files are updated separately in dedicated "mls" translation PRs. Please revert these changes.
resources/lang/fr.json (1)
213-214: Non-English translation files should not be updated in this PR.Based on learnings, translation files other than en.json should only be updated in dedicated translation PRs. Regular PRs should only modify en.json. Please revert changes to this and other non-English locale files.
resources/lang/nl.json (1)
213-214: Non-English translation files should not be updated in this PR.Based on learnings, only en.json should be modified when adding new translation keys in regular PRs. Non-English translations are handled separately. Please revert.
resources/lang/tp.json (1)
131-132: Non-English translation files should not be updated in this PR.Based on learnings, only en.json should be updated in regular PRs. Non-English locale files like tp.json are updated in dedicated translation PRs. Please revert.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (4)
map-generator/assets/maps/malta/image.pngis excluded by!**/*.pngresources/maps/malta/map.binis excluded by!**/*.binresources/maps/malta/map16x.binis excluded by!**/*.binresources/maps/malta/map4x.binis excluded by!**/*.bin
📒 Files selected for processing (40)
map-generator/assets/maps/malta/info.jsonmap-generator/main.goresources/lang/ar.jsonresources/lang/bg.jsonresources/lang/bn.jsonresources/lang/cs.jsonresources/lang/da.jsonresources/lang/de.jsonresources/lang/debug.jsonresources/lang/el.jsonresources/lang/en.jsonresources/lang/eo.jsonresources/lang/es.jsonresources/lang/fa.jsonresources/lang/fi.jsonresources/lang/fr.jsonresources/lang/gl.jsonresources/lang/hi.jsonresources/lang/hu.jsonresources/lang/ko.jsonresources/lang/mk.jsonresources/lang/nl.jsonresources/lang/pl.jsonresources/lang/pt-BR.jsonresources/lang/pt-PT.jsonresources/lang/ru.jsonresources/lang/sh.jsonresources/lang/sk.jsonresources/lang/sl.jsonresources/lang/tp.jsonresources/lang/tr.jsonresources/lang/uk.jsonresources/lang/zh-CN.jsonresources/maps/malta/manifest.jsonresources/maps/malta/thumbnail.webpresources/maps/manicouagan/manifest.jsonsrc/client/components/Maps.tssrc/core/configuration/DefaultConfig.tssrc/core/game/Game.tssrc/server/MapPlaylist.ts
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: VariableVince
Repo: openfrontio/OpenFrontIO PR: 1655
File: resources/maps/giantworldmap/manifest.json:165-174
Timestamp: 2025-07-31T12:03:08.052Z
Learning: In OpenFrontIO draft PRs, flag names in map manifest files may be placeholders that will be updated to match the actual SVG flag file names when the assets are received. The final naming depends on the actual flag SVG files provided, not code naming conventions.
📚 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
📚 Learning: 2025-08-27T08:12:19.610Z
Learnt from: mokizzz
Repo: openfrontio/OpenFrontIO PR: 1940
File: resources/lang/en.json:763-766
Timestamp: 2025-08-27T08:12:19.610Z
Learning: In OpenFrontIO, some country entries in src/client/data/countries.json may have similar names but different codes (e.g., "Empire of Japan" vs "Empire of Japan1"). Each unique code requires its own translation key in resources/lang/en.json after normalization. Always verify against countries.json before suggesting removal of translation keys.
Applied to files:
resources/lang/cs.jsonresources/lang/debug.jsonresources/lang/eo.jsonresources/lang/uk.jsonresources/lang/pl.jsonresources/lang/en.jsonresources/lang/hi.jsonresources/lang/tp.jsonresources/lang/de.jsonresources/lang/gl.jsonresources/lang/sh.jsonresources/lang/el.jsonresources/lang/fr.json
📚 Learning: 2025-08-16T10:52:08.292Z
Learnt from: TheGiraffe3
Repo: openfrontio/OpenFrontIO PR: 884
File: resources/lang/en.json:456-461
Timestamp: 2025-08-16T10:52:08.292Z
Learning: In OpenFrontIO, translation files in resources/lang/*.json (except en.json) should not be updated in regular PRs. Only dedicated translation PRs titled "mls" and made by Aotumori should update non-English locale files. Regular PRs should only update en.json when adding or modifying translation keys.
Applied to files:
resources/lang/cs.jsonresources/lang/hu.jsonresources/lang/pt-BR.jsonresources/lang/pl.jsonresources/lang/hi.jsonresources/lang/tr.jsonresources/lang/el.jsonresources/lang/fr.jsonresources/lang/mk.json
📚 Learning: 2025-06-02T14:27:37.609Z
Learnt from: andrewNiziolek
Repo: openfrontio/OpenFrontIO PR: 1007
File: resources/lang/de.json:115-115
Timestamp: 2025-06-02T14:27:37.609Z
Learning: For OpenFrontIO project: When localization keys are renamed in language JSON files, the maintainers separate technical changes from translation content updates. They wait for community translators to update the actual translation values rather than attempting to translate in the same PR. This allows technical changes to proceed while ensuring accurate translations from native speakers.
Applied to files:
resources/lang/cs.jsonresources/lang/pl.json
📚 Learning: 2025-08-19T11:00:55.422Z
Learnt from: TheGiraffe3
Repo: openfrontio/OpenFrontIO PR: 1864
File: resources/maps/arabianpeninsula/manifest.json:13-170
Timestamp: 2025-08-19T11:00:55.422Z
Learning: In OpenFrontIO, nation names in map manifests are displayed directly in the UI without translation. They do not need to be added to resources/lang/en.json or processed through translateText(). This is the established pattern across all existing maps including Europe, World, Asia, Africa, and others.
Applied to files:
resources/lang/pl.jsonresources/lang/en.jsonresources/lang/el.jsonresources/maps/malta/manifest.json
📚 Learning: 2025-06-02T14:27:23.893Z
Learnt from: andrewNiziolek
Repo: openfrontio/OpenFrontIO PR: 1007
File: resources/lang/he.json:138-138
Timestamp: 2025-06-02T14:27:23.893Z
Learning: andrewNiziolek's project uses community translation for internationalization. When updating map names or other user-facing text, they update the keys programmatically but wait for community translators to provide accurate translations in each language rather than using machine translations.
Applied to files:
resources/lang/pl.json
🪛 GitHub Actions: 🧪 CI
resources/maps/manicouagan/manifest.json
[error] 1-1: Prettier formatting issue detected. Run 'npx prettier --write' to fix.
map-generator/assets/maps/malta/info.json
[error] 1-1: Prettier formatting issue detected. Run 'npx prettier --write' to fix.
resources/maps/malta/manifest.json
[error] 1-1: Prettier formatting issue detected. Run 'npx prettier --write' to fix.
🔇 Additional comments (11)
resources/lang/debug.json (1)
119-120: LGTM!The debug.json file correctly adds the Malta map key reference. This file serves as a development tool for translation key lookup, so it's appropriate to update it alongside en.json.
map-generator/main.go (1)
49-49: LGTM!Malta map correctly added to the registry in alphabetical order. The entry follows the established pattern and will enable map generation for Malta.
src/core/configuration/DefaultConfig.ts (1)
87-87: Player configuration looks reasonable for a regional map.The player caps
[36, 28, 20]for Malta fit appropriately between smaller maps like Lemnos[20, 15, 10]and medium maps like Lisbon[50, 40, 30].GameMapType.Maltais defined insrc/core/game/Game.ts(line 110) and the configuration is properly typed.src/client/components/Maps.ts (1)
47-47: No issues found. GameMapType.Malta enum exists and is properly integrated into the map system.src/server/MapPlaylist.ts (1)
60-60: LGTM!The frequency value of 4 for Malta is consistent with other regional maps of similar scope (e.g., Australia, Iceland, Lisbon).
resources/lang/en.json (1)
247-248: LGTM!The English translation entry for Malta is correctly added. This is the appropriate file to update in a regular PR.
map-generator/assets/maps/malta/info.json (1)
161-162: No action needed—flag code duplication is intentional.The flag code
"jo"is used for both "Ghaxaq" and "Birgu" by design. The Malta map systematically assigns flag codes (representing nation control) to multiple localities: 17 flag codes each appear exactly twice across the map. This is a consistent game mechanic, not a data error. Both localities can be visually distinguished by their coordinates and names, not by their assigned nation flag.Likely an incorrect or invalid review comment.
src/core/game/Game.ts (2)
110-110: LGTM!Malta correctly added to the GameMapType enum.
149-149: LGTM! Malta correctly categorized as regional.The "regional" category is appropriate for Malta as it represents real geography at a local scale without altered features.
resources/maps/malta/manifest.json (2)
18-523: Note: Flag codes appear to be placeholders.Based on learnings and the PR description noting "SVGs for the individual locality flags have not yet been provided," these flag codes (mt, it, gb, fr, etc.) are likely placeholders that will be updated when the actual flag SVG files are available. This is the established pattern for draft PRs.
1-524: Fix Prettier formatting issue.The pipeline indicates a Prettier formatting issue that must be resolved. Run
npx prettier --write resources/maps/malta/manifest.jsonto fix.⛔ Skipped due to learnings
Learnt from: VariableVince Repo: openfrontio/OpenFrontIO PR: 1655 File: resources/maps/giantworldmap/manifest.json:165-174 Timestamp: 2025-07-31T12:03:08.052Z Learning: In OpenFrontIO draft PRs, flag names in map manifest files may be placeholders that will be updated to match the actual SVG flag file names when the assets are received. The final naming depends on the actual flag SVG files provided, not code naming conventions.Learnt from: VariableVince Repo: openfrontio/OpenFrontIO PR: 957 File: resources/maps/GatewayToTheAtlantic.json:175-179 Timestamp: 2025-05-30T16:16:27.118Z Learning: In OpenFrontIO project, flag values in map JSON files (like GatewayToTheAtlantic.json) should match the actual flag file names in the resources directory (e.g., "French foreign legion" corresponds to "French foreign legion.svg"). The naming convention follows the file naming system rather than code naming conventions.Learnt from: VariableVince Repo: openfrontio/OpenFrontIO PR: 959 File: resources/maps/GatewayToTheAtlantic.json:124-124 Timestamp: 2025-05-30T18:11:56.014Z Learning: In OpenFrontIO, flag names in map JSON files can use spaces (like "Amazigh flag") and don't need to follow slug format. Flag assets are stored with matching filenames including spaces (e.g., "Amazigh flag.svg"). Nation names and flag names are not translated/localized in the translation files.Learnt from: mokizzz Repo: openfrontio/OpenFrontIO PR: 1940 File: resources/lang/en.json:763-766 Timestamp: 2025-08-27T08:12:19.610Z Learning: In OpenFrontIO, some country entries in src/client/data/countries.json may have similar names but different codes (e.g., "Empire of Japan" vs "Empire of Japan1"). Each unique code requires its own translation key in resources/lang/en.json after normalization. Always verify against countries.json before suggesting removal of translation keys.
| "faroeislands": "ফ্যারো দ্বীপপুঞ্জ", | ||
| "malta": "মাল্টা" |
There was a problem hiding this comment.
Non-English translation files should not be updated in this PR.
Same issue as in other locale files. This Bengali translation file should not be updated in this regular PR. Only dedicated "mls" translation PRs by Aotumori should modify non-English locale files.
Based on learnings, translation files in resources/lang/*.json (except en.json) should not be updated in regular PRs.
🤖 Prompt for AI Agents
In resources/lang/bn.json around lines 123 to 124, this PR changes non-English
locale content which violates the rule that only dedicated "mls" translation PRs
by Aotumori may modify non-English translation files; revert these changes to
keep bn.json identical to the main branch (remove the added/modified entries
such as "faroeislands" and "malta") so the file is untouched in this regular PR,
and if translations are required, open or defer to a proper "mls" translation PR
by Aotumori.
| "italia": "Italien", | ||
| "malta": "Malta" |
There was a problem hiding this comment.
Translation process violation: non-English locale updates should be in dedicated "mls" PR
The Malta translation entry is technically correct, but this PR updates non-English locale files which should only be modified in dedicated translation PRs titled "mls" and made by Aotumori. Regular feature PRs should only update resources/lang/en.json.
Recommended approach:
- Remove all non-English locale changes from this PR (keep only en.json if present)
- Submit translations separately through the established "mls" translation PR process
This same issue applies to all other non-English locale files in this PR (bg.json, pt-BR.json, da.json, ar.json, uk.json, eo.json, zh-CN.json).
Based on learnings from previous reviews.
🤖 Prompt for AI Agents
In resources/lang/de.json around lines 159 to 160, this PR incorrectly modifies
a non-English locale (adds/changes the "malta" entry); revert this change so
that de.json remains unchanged in this PR, ensure only resources/lang/en.json
contains locale updates in this feature PR, and move all translation edits
(including the other non-English files you touched: bg.json, pt-BR.json,
da.json, ar.json, uk.json, eo.json, zh-CN.json) into a separate "mls"
translation PR authored via the established Aotumori translation process.
| "baikalnukewars": "Βαϊκάλη (Πυρηνικοί Πόλεμοι)", | ||
| "malta": "Μάλτα" |
There was a problem hiding this comment.
Non-English translation files should not be updated in this PR.
This Greek translation file should not be modified in this regular PR. Please remove this change along with the other non-English locale updates.
Based on learnings, translation files in resources/lang/*.json (except en.json) should not be updated in regular PRs.
🤖 Prompt for AI Agents
In resources/lang/el.json around lines 200-201, this Greek translation was
modified but non-English locale files must not be changed in this PR; revert the
change by removing the added/edited lines (restore the file to its previous
state) or discard the file from the commit (e.g., git checkout --
resources/lang/el.json or git restore --staged && git checkout --
resources/lang/el.json), then amend the commit or create a new commit that
excludes any modifications to resources/lang/*.json except en.json so only
English locale changes remain in this PR.
| "baikalnukewars": "Bajkał (Wojny Atomowe)", | ||
| "malta": "Malta" |
There was a problem hiding this comment.
Non-English translation files should not be updated in this PR.
This Polish translation file should not be modified in this regular PR. Please remove this change along with the other non-English locale updates.
Based on learnings, translation files in resources/lang/*.json (except en.json) should not be updated in regular PRs.
🤖 Prompt for AI Agents
In resources/lang/pl.json around lines 200 to 201, the PR adds/modifies
non-English translations ("baikalnukewars": "Bajkał (Wojny Atomowe)", "malta":
"Malta"); remove these changes so the file remains unchanged in this PR. Revert
the modified lines to match the base branch (undo the locale edits) and ensure
only en.json or approved translation workflows update other locale files in
future PRs.
| "pluto": "Plutão", | ||
| "malta": "Malta" |
There was a problem hiding this comment.
Non-English translation files should not be updated in this PR.
Based on learnings, translation files other than en.json should only be updated in dedicated translation PRs titled "mls" and made by Aotumori. Regular PRs adding new maps should only update resources/lang/en.json with the new translation key. The translation to other languages happens separately.
Please revert changes to this file (and other non-English locale files) and ensure only en.json is updated.
🤖 Prompt for AI Agents
In resources/lang/pt-PT.json around lines 169-170, non-English translation files
were modified in this PR but per policy they must not be changed here; revert
these edits (remove the "pluto": "Plutão" and "malta": "Malta" additions and any
other changes to non-en locale files), commit the revert, and ensure only
resources/lang/en.json contains the new translation keys for this PR;
translations to other locales will be handled in the dedicated "mls" PR by
Aotumori.
| "pluto": "Plüto", | ||
| "malta": "Malta" |
There was a problem hiding this comment.
Non-English translation files should not be updated in this PR.
This Turkish translation file should not be modified in this regular PR. Please remove this change along with the other non-English locale updates.
Based on learnings, translation files in resources/lang/*.json (except en.json) should not be updated in regular PRs.
🤖 Prompt for AI Agents
In resources/lang/tr.json around lines 181 to 182, the Turkish locale was
modified (entries "pluto": "Plüto", "malta": "Malta") but non-English
translation files must not be changed in this PR; remove these edits so the file
is left unchanged (revert the two lines or discard the hunk) and ensure no other
resources/lang/*.json (except en.json) are modified before committing.
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
resources/maps/malta/manifest.json
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: VariableVince
Repo: openfrontio/OpenFrontIO PR: 1655
File: resources/maps/giantworldmap/manifest.json:165-174
Timestamp: 2025-07-31T12:03:08.052Z
Learning: In OpenFrontIO draft PRs, flag names in map manifest files may be placeholders that will be updated to match the actual SVG flag file names when the assets are received. The final naming depends on the actual flag SVG files provided, not code naming conventions.
🔇 Additional comments (1)
resources/maps/malta/manifest.json (1)
1-17: Map metadata structure looks good.The dimensions and land tile counts are properly defined for all three scale levels. The ratios between scales are consistent.
| "flag": "jo", | ||
| "name": "Ghaxaq" |
There was a problem hiding this comment.
Duplicate flag code "jo" on Malta island.
Both "Ghaxaq" (line 176) and "Birgu" (line 211) use the flag code "jo". Even as placeholders, duplicate flag identifiers within the same island could cause visual confusion or selection issues in the game.
🔎 Suggested fix
Assign a different placeholder flag code to one of these localities. For example, change Birgu to use an unused code:
{
"coordinates": [1844, 947],
- "flag": "jo",
+ "flag": "ye",
"name": "Birgu"
},Note: Based on learnings, flag names in draft PRs may be placeholders that will be updated when actual SVG flag files are provided.
Also applies to: 211-212
🤖 Prompt for AI Agents
resources/maps/malta/manifest.json around lines 176-177 and 211-212: the flag
code "jo" is duplicated for "Ghaxaq" (line 176) and "Birgu" (line 211); update
one of the entries to use a unique placeholder flag identifier (e.g., change
Birgu to a distinct code such as "mt-bg" or any unused code) and verify no other
locality on Malta uses the same code so flags remain unique within the island.
|
@NathanPortelli Could you add a photo of the map to the description for easy checking? |
Added the |
|
What resource did you use for this map? This question is mainly to note if the map is in the public domain (if the game can use it freely without infringing copyright) |
|
@NathanPortelli as @Duwibi said. I would suggest reaching out in the Map makers channel in the dev discord and someone should be able to help out with that. I'll close this for now whilst you reach out for help |
Description:
Adds a stylised map of the islands of Malta and Gozo, with locality names represented as separate nations.
SVGs for the locality flags are not yet included.
This change is limited to map assets and does not alter runtime game logic.
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found: