Skip to content

Add strait of Gibraltar and Italia maps - #1363

Merged
evanpelle merged 2 commits into
mainfrom
evan-add-maps
Jul 7, 2025
Merged

evanpelle merged 2 commits into
mainfrom
evan-add-maps

Conversation

@evanpelle

@evanpelle evanpelle commented Jul 7, 2025 •

Copy link
Copy Markdown
Collaborator

Description:

Add strait of Gibraltar and Italia maps

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
  • I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors

Please put your Discord username so you can be contacted if a bug or regression is found:

evan

@coderabbitai

coderabbitai Bot commented Jul 7, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Two new regional maps, "Strait of Gibraltar" and "Italia," were added to the project. This includes updates to language resources, map manifests, configuration files, enums, map descriptions, and playlist frequency settings to support these new maps and their associated metadata.

Changes

Files/Paths Change Summary
resources/lang/en.json Added "straitofgibraltar" and "italia" entries under the "map" section.
resources/maps/italia/manifest.json,
resources/maps/straitofgibraltar/manifest.json
Added manifest files defining metadata and nations for "Italia" and "Strait of Gibraltar" maps.
src/client/components/Maps.ts Extended MapDescription with "StraitOfGibraltar" and "Italia".
src/core/configuration/DefaultConfig.ts Added player count configs for "StraitOfGibraltar" and "Italia".
src/core/game/Game.ts Added "Strait of Gibraltar" and "Italia" to GameMapType enum and the regional map category.
src/server/MapPlaylist.ts Added "StraitOfGibraltar" and "Italia" to map frequency list.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Client
    participant Server

    User->>Client: Selects "Strait of Gibraltar" or "Italia" map
    Client->>Server: Requests map data for selected map
    Server->>Client: Returns manifest and configuration for the map
    Client->>User: Displays map and nation details
Loading

Suggested labels

Feature - Revision

Suggested reviewers

  • scottanderson

Poem

Two new maps upon the sea,
Italia and Gibraltar, fresh as can be!
Nations and flags, all set in place,
Adventure awaits—pick up the pace!
With new lands to explore and new flags to unfurl,
The map grows bigger in our world! 🌍🗺️

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.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error https://github.com/npm/cli/issues
npm error A complete log of this run can be found in: /.npm/_logs/2025-07-07T20_02_57_142Z-debug-0.log


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@evanpelle
evanpelle merged commit 1a7c107 into main Jul 7, 2025
@evanpelle
evanpelle deleted the evan-add-maps branch July 7, 2025 20:00
@github-project-automation github-project-automation Bot moved this from Triage to Complete in OpenFront Release Management Jul 7, 2025

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 2

🔭 Outside diff range comments (1)
src/server/MapPlaylist.ts (1)

20-46: Make frequency a typed record to prevent future omissions

Today every new enum key must be manually added to this plain object; otherwise parseInt(frequency[key]) will return NaN and silently skip the map. Turning the structure into a fully-typed map eliminates that foot-gun and removes the need for the parseInt dance:

-const frequency = {
+const frequency: Record<GameMapType, number> = {
   World: 3,
   ...
-  Italia: 1,
+  Italia: 1,
 } as const;

Then in shuffleMapsPlaylist you can iterate directly without parseInt:

-Object.keys(GameMapType).forEach((key) => {
-  for (let i = 0; i < parseInt(frequency[key]); i++) {
-    maps.push(GameMapType[key]);
-  }
-});
+for (const [map, freq] of Object.entries(frequency) as [GameMapType, number][]) {
+  maps.push(...Array(freq).fill(map));
+}

This keeps the playlist in lock-step with the enum at compile time.

🧹 Nitpick comments (1)
src/client/components/Maps.ts (1)

33-35: Consider deriving map names from i18n instead of hard-coding

MapDescription now duplicates the English strings that already live in resources/lang/en.json. Prefer resolving the label at runtime via translateText('map.' + key.toLowerCase()) so future localisation tweaks don’t require touching this file.

(Not blocking; optional quality upgrade.)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d3dbda4 and b14df66.

⛔ Files ignored due to path filters (4)
  • resources/maps/italia/map.bin is excluded by !**/*.bin
  • resources/maps/italia/mini_map.bin is excluded by !**/*.bin
  • resources/maps/straitofgibraltar/map.bin is excluded by !**/*.bin
  • resources/maps/straitofgibraltar/mini_map.bin is excluded by !**/*.bin
📒 Files selected for processing (7)
  • resources/lang/en.json (1 hunks)
  • resources/maps/italia/manifest.json (1 hunks)
  • resources/maps/straitofgibraltar/manifest.json (1 hunks)
  • src/client/components/Maps.ts (1 hunks)
  • src/core/configuration/DefaultConfig.ts (1 hunks)
  • src/core/game/Game.ts (2 hunks)
  • src/server/MapPlaylist.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: andrewNiziolek
PR: openfrontio/OpenFrontIO#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.
Learnt from: andrewNiziolek
PR: openfrontio/OpenFrontIO#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.
Learnt from: VariableVince
PR: openfrontio/OpenFrontIO#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
PR: openfrontio/OpenFrontIO#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.
src/client/components/Maps.ts (1)
Learnt from: devalnor
PR: openfrontio/OpenFrontIO#1248
File: src/client/graphics/layers/TerritoryInfoLayer.ts:20-20
Timestamp: 2025-06-22T21:51:14.990Z
Learning: In TerritoryInfoLayer.ts, the highlightedTerritory field uses both null and undefined intentionally: undefined represents initial state or inactive layer (Ctrl released), while null represents active layer with no territory being highlighted at cursor position. This distinction is important for proper state change detection.
src/core/configuration/DefaultConfig.ts (2)
Learnt from: scottanderson
PR: openfrontio/OpenFrontIO#784
File: src/core/game/StatsImpl.ts:125-134
Timestamp: 2025-05-19T06:00:38.007Z
Learning: In StatsImpl.ts, unused parameters in boat/stats-related methods are intentionally kept for future use and shouldn't be removed.
Learnt from: Ble4Ch
PR: openfrontio/OpenFrontIO#1063
File: src/core/configuration/PastelThemeDark.ts:53-53
Timestamp: 2025-06-10T09:56:44.473Z
Learning: In ColorAllocator class in src/core/configuration/Colors.ts, the correct method names are assignColor(id: string): Colord for general color assignment and assignTeamColor(team: Team): Colord for team-specific colors. There are no assignPlayerColor() or assignBotColor() methods.
resources/maps/straitofgibraltar/manifest.json (2)
Learnt from: VariableVince
PR: openfrontio/OpenFrontIO#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
PR: openfrontio/OpenFrontIO#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.
resources/maps/italia/manifest.json (2)
Learnt from: VariableVince
PR: openfrontio/OpenFrontIO#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
PR: openfrontio/OpenFrontIO#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.
resources/lang/en.json (5)
Learnt from: andrewNiziolek
PR: openfrontio/OpenFrontIO#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.
Learnt from: VariableVince
PR: openfrontio/OpenFrontIO#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: andrewNiziolek
PR: openfrontio/OpenFrontIO#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.
Learnt from: VariableVince
PR: openfrontio/OpenFrontIO#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
PR: openfrontio/OpenFrontIO#959
File: resources/maps/Japan.json:31-35
Timestamp: 2025-05-30T18:11:20.372Z
Learning: Nation names on maps in OpenFrontIO are not localized/translated. They are displayed directly without using the translateText() function or requiring entries in localization files like resources/lang/en.json.
🔇 Additional comments (4)
src/core/configuration/DefaultConfig.ts (1)

68-70: Player-count entry looks good

The two new maps are wired into numPlayersConfig with a sensible [50, 40, 30] spread matching other regional maps. No further action needed.

src/core/game/Game.ts (2)

83-85: Enum expansion acknowledged

StraitOfGibraltar and Italia are added consistently; values match the user-facing strings. No issues spotted.


112-114: Category list updated correctly

Both maps are slotted into the regional bucket. Looks coherent.

resources/lang/en.json (1)

157-160: Remember placeholders in other languages

The new keys straitofgibraltar and italia exist only in en.json. Following project practice, please add the same keys to every other language file with identical English values so community translators get clear TODOs and the UI doesn’t fall back to raw keys.

Comment on lines +13 to +55
"nations": [
{
"coordinates": [1941, 1031],
"flag": "Rif",
"name": "Rif",
"strength": 2
},
{
"coordinates": [2733, 1190],
"flag": "dz",
"name": "Algeria",
"strength": 2
},
{
"coordinates": [1287, 1175],
"flag": "ma",
"name": "Morocco",
"strength": 2
},
{
"coordinates": [414, 59],
"flag": "pt",
"name": "Portugal",
"strength": 2
},
{
"coordinates": [2675, 49],
"flag": "es",
"name": "Spain",
"strength": 2
},
{
"coordinates": [1271, 1393],
"flag": "Shilha",
"name": "Shilha",
"strength": 1
},
{
"coordinates": [1555, 258],
"flag": "Andalusia",
"name": "Andalusia",
"strength": 2
}

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.

💡 Verification agent

🧩 Analysis chain

Flag IDs mix ISO codes & custom names – please align with project convention

Some flags use ISO-3166 codes ("dz", "ma", "pt", "es"), while others are bare custom names ("Rif", "Shilha", "Andalusia").
In earlier maps we prefix every non-ISO asset with custom: to avoid clashes and make lookup logic trivial.

-      "flag": "Rif",
+      "flag": "custom:Rif",
…
-      "flag": "Shilha",
+      "flag": "custom:Shilha",
…
-      "flag": "Andalusia",
+      "flag": "custom:Andalusia",

Before merging, please confirm the matching SVGs actually live in resources/flags/ with the same filenames.
If they already follow another naming rule, update the manifest or the assets so they stay in sync.
This keeps the flag loader simple and prevents broken icons in-game.


🏁 Script executed:

#!/bin/bash
echo "Verifying custom flag asset filenames exist in resources/flags/"
for flag in "Rif" "Shilha" "Andalusia"; do
  echo "- Checking \"$flag\""
  fd -e svg resources/flags | grep -i "^.*${flag}\.svg$" || echo "  → No asset found for $flag"
done

Length of output: 1879


🏁 Script executed:

#!/bin/bash
echo "Checking for flag SVG assets in resources/flags/"
for flag in Rif Shilha Andalusia; do
  echo "- Checking \"$flag\""
  find resources/flags -type f -iname "${flag}.svg" -print || echo "  → No asset found for $flag"
done

Length of output: 526


🏁 Script executed:

#!/bin/bash
echo "Listing resource directories:"
find resources -maxdepth 2 -type d | sed 's/^/ - /'
echo ""
echo "Listing all SVG files under resources:"
find resources -type f -iname '*.svg' | sed 's/^/ - /'

Length of output: 23171


Prefix custom flag IDs and add missing SVG assets

Three nations in resources/maps/straitofgibraltar/manifest.json use custom flags but lack matching files. Let’s fix that:

• In straitofgibraltar/manifest.json, update each custom flag to include the custom: prefix:

-    "flag": "Rif",
+    "flag": "custom:Rif",

-    "flag": "Shilha",
+    "flag": "custom:Shilha",

-    "flag": "Andalusia",
+    "flag": "custom:Andalusia",

• Add the corresponding SVG files under resources/flags/custom/:

  • resources/flags/custom/Rif.svg
  • resources/flags/custom/Shilha.svg
  • resources/flags/custom/Andalusia.svg

If those assets already exist under a different name, either rename them to match above or adjust the manifest entries accordingly.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"nations": [
{
"coordinates": [1941, 1031],
"flag": "Rif",
"name": "Rif",
"strength": 2
},
{
"coordinates": [2733, 1190],
"flag": "dz",
"name": "Algeria",
"strength": 2
},
{
"coordinates": [1287, 1175],
"flag": "ma",
"name": "Morocco",
"strength": 2
},
{
"coordinates": [414, 59],
"flag": "pt",
"name": "Portugal",
"strength": 2
},
{
"coordinates": [2675, 49],
"flag": "es",
"name": "Spain",
"strength": 2
},
{
"coordinates": [1271, 1393],
"flag": "Shilha",
"name": "Shilha",
"strength": 1
},
{
"coordinates": [1555, 258],
"flag": "Andalusia",
"name": "Andalusia",
"strength": 2
}
"nations": [
{
"coordinates": [1941, 1031],
- "flag": "Rif",
+ "flag": "custom:Rif",
"name": "Rif",
"strength": 2
},
{
"coordinates": [2733, 1190],
"flag": "dz",
"name": "Algeria",
"strength": 2
},
{
"coordinates": [1287, 1175],
"flag": "ma",
"name": "Morocco",
"strength": 2
},
{
"coordinates": [414, 59],
"flag": "pt",
"name": "Portugal",
"strength": 2
},
{
"coordinates": [2675, 49],
"flag": "es",
"name": "Spain",
"strength": 2
},
{
"coordinates": [1271, 1393],
- "flag": "Shilha",
+ "flag": "custom:Shilha",
"name": "Shilha",
"strength": 1
},
{
"coordinates": [1555, 258],
- "flag": "Andalusia",
+ "flag": "custom:Andalusia",
"name": "Andalusia",
"strength": 2
}
]
🤖 Prompt for AI Agents
In resources/maps/straitofgibraltar/manifest.json between lines 13 and 55, the
custom flag IDs for Rif, Shilha, and Andalusia lack the required "custom:"
prefix and their corresponding SVG files are missing. Update the flag fields for
these nations by prefixing their IDs with "custom:" (e.g., "custom:Rif"). Then,
add the matching SVG files named Rif.svg, Shilha.svg, and Andalusia.svg to the
resources/flags/custom/ directory. If these SVG assets exist under different
names, rename them accordingly or update the manifest to match the existing
filenames.

Comment on lines +38 to +85
{
"coordinates": [595, 190],
"flag": "venice",
"name": "Venice",
"strength": 2
},
{
"coordinates": [469, 386],
"flag": "custom:Modena",
"name": "Modena",
"strength": 1
},
{
"coordinates": [391, 254],
"flag": "custom:Parma",
"name": "Parma",
"strength": 1
},
{
"coordinates": [361, 68],
"flag": "ch",
"name": "Switzerland",
"strength": 1
},
{
"coordinates": [278, 774],
"flag": "custom:Kingdom of Sardinia",
"name": "Kingdom of Sardinia",
"strength": 2
},
{
"coordinates": [29, 266],
"flag": "fr",
"name": "France",
"strength": 3
},
{
"coordinates": [747, 39],
"flag": "Habsburg Austria",
"name": "Austrian Empire",
"strength": 3
},
{
"coordinates": [1238, 349],
"flag": "custom:Ottoman Empire2",
"name": "Ottoman Empire",
"strength": 3
}

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.

💡 Verification agent

🧩 Analysis chain

Make flag keys consistent; two entries break the current loader

The manifest mainly sticks to custom: for non-ISO flags, but two entries slip through:

-      "flag": "venice",
+      "flag": "custom:Venice",
…
-      "flag": "Habsburg Austria",
+      "flag": "custom:Habsburg Austria",

Additionally the key "custom:Ottoman Empire2" contains the extra “2”.
Double-check the actual SVG file name – if it is simply Ottoman Empire.svg, drop the suffix:

-      "flag": "custom:Ottoman Empire2",
+      "flag": "custom:Ottoman Empire",

Unifying these keys avoids null-flag icons at runtime and keeps the asset pipeline predictable.


🏁 Script executed:

#!/bin/bash
# List SVG files for Venice, Habsburg Austria, Ottoman Empire
echo "SVG files containing 'venice', 'habsburg', or 'ottoman' in filename:"
find resources -type f -iname '*.svg' -printf "%f\n' | grep -Ei 'venice|habsburg|ottoman'

Length of output: 281


🏁 Script executed:

#!/bin/bash
# Find SVG files for Venice, Habsburg Austria, and Ottoman Empire
echo "Searching for relevant flag SVG filenames:"
find resources -type f -iname '*.svg' | grep -Ei 'venice|habsburg austria|ottoman empire' | sed 's|.*/||'

Length of output: 253


Update custom flag keys to match SVG filenames
The loader expects non-ISO flags to be prefixed with custom: and named exactly as their SVG files. Based on the files found (venice.svg, Habsburg Austria.svg, Ottoman Empire.svg), please apply these fixes in resources/maps/italia/manifest.json (lines 38–85):

Proposed changes:

-      "flag": "venice",
+      "flag": "custom:Venice",

-      "flag": "Habsburg Austria",
+      "flag": "custom:Habsburg Austria",

-      "flag": "custom:Ottoman Empire2",
+      "flag": "custom:Ottoman Empire",

This will ensure the manifest keys align with the actual SVG filenames and avoid null icons at runtime.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
"coordinates": [595, 190],
"flag": "venice",
"name": "Venice",
"strength": 2
},
{
"coordinates": [469, 386],
"flag": "custom:Modena",
"name": "Modena",
"strength": 1
},
{
"coordinates": [391, 254],
"flag": "custom:Parma",
"name": "Parma",
"strength": 1
},
{
"coordinates": [361, 68],
"flag": "ch",
"name": "Switzerland",
"strength": 1
},
{
"coordinates": [278, 774],
"flag": "custom:Kingdom of Sardinia",
"name": "Kingdom of Sardinia",
"strength": 2
},
{
"coordinates": [29, 266],
"flag": "fr",
"name": "France",
"strength": 3
},
{
"coordinates": [747, 39],
"flag": "Habsburg Austria",
"name": "Austrian Empire",
"strength": 3
},
{
"coordinates": [1238, 349],
"flag": "custom:Ottoman Empire2",
"name": "Ottoman Empire",
"strength": 3
}
{
"coordinates": [595, 190],
"flag": "custom:Venice",
"name": "Venice",
"strength": 2
},
{
"coordinates": [469, 386],
"flag": "custom:Modena",
"name": "Modena",
"strength": 1
},
{
"coordinates": [391, 254],
"flag": "custom:Parma",
"name": "Parma",
"strength": 1
},
{
"coordinates": [361, 68],
"flag": "ch",
"name": "Switzerland",
"strength": 1
},
{
"coordinates": [278, 774],
"flag": "custom:Kingdom of Sardinia",
"name": "Kingdom of Sardinia",
"strength": 2
},
{
"coordinates": [29, 266],
"flag": "fr",
"name": "France",
"strength": 3
},
{
"coordinates": [747, 39],
"flag": "custom:Habsburg Austria",
"name": "Austrian Empire",
"strength": 3
},
{
"coordinates": [1238, 349],
"flag": "custom:Ottoman Empire",
"name": "Ottoman Empire",
"strength": 3
}
🤖 Prompt for AI Agents
In resources/maps/italia/manifest.json between lines 38 and 85, update the
"flag" values for custom flags to exactly match their SVG filenames with the
"custom:" prefix. Change "custom:Modena" and "custom:Parma" to their correct SVG
filenames if applicable, and modify "Habsburg Austria" to "custom:Habsburg
Austria" and "custom:Ottoman Empire2" to "custom:Ottoman Empire" to align with
the actual SVG filenames. This ensures the loader correctly finds the icons and
prevents null icons at runtime.

@github-project-automation github-project-automation Bot moved this from Complete to Development in OpenFront Release Management Jul 7, 2025
@scottanderson scottanderson added this to the v24 milestone Jul 8, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Jul 9, 2025
5 tasks done
This was referenced Jul 20, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Sep 21, 2025
4 tasks done
@coderabbitai coderabbitai Bot mentioned this pull request Nov 19, 2025
4 tasks done
This was referenced Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development

Development

Successfully merging this pull request may close these issues.

2 participants