diff --git a/src/renderer/src/intl/en-US.ts b/src/renderer/src/intl/en-US.ts
index ce44c87..8d36069 100644
--- a/src/renderer/src/intl/en-US.ts
+++ b/src/renderer/src/intl/en-US.ts
@@ -330,6 +330,8 @@ export default {
When enabled, the overall border of the galaxy will be circular in shape, and there will be no "holes" between systems.
If the galaxy is a "Starburst", a special spiral shape will be used instead of a circle.
`,
+ borderGap: 'Border Gap',
+ borderGap_tooltip: 'Adds blank space between country borders',
hyperlaneSensitiveBorders: 'Hyperlane Sensitive Borders',
hyperlaneSensitiveBorders_tooltip: `
- When enabled, borders will follow hyperlanes.
diff --git a/src/renderer/src/lib/map/data/processBorders.ts b/src/renderer/src/lib/map/data/processBorders.ts
index d6faad4..7f1b3b3 100644
--- a/src/renderer/src/lib/map/data/processBorders.ts
+++ b/src/renderer/src/lib/map/data/processBorders.ts
@@ -38,6 +38,7 @@ export const processBordersDeps = [
'sectorBorderStroke',
'mapMode',
'mapModePointOfView',
+ 'borderGap',
] satisfies (keyof MapSettings)[];
export default function processBorders(
@@ -345,11 +346,19 @@ export default function processBorders(
if (settings.borderStroke.smoothing && boundedOuterBorderGeoJSON != null) {
smoothedOuterBorderGeoJSON = smoothGeojson(boundedOuterBorderGeoJSON, 2);
}
+ smoothedOuterBorderGeoJSON =
+ smoothedOuterBorderGeoJSON == null
+ ? null
+ : (turf.buffer(smoothedOuterBorderGeoJSON, -(settings.borderGap ?? 0) / 2 / SCALE, {
+ units: 'degrees',
+ steps: settings.borderStroke.smoothing ? 8 : 1,
+ }) as ReturnType | null);
const smoothedInnerBorderGeoJSON =
smoothedOuterBorderGeoJSON == null
? null
: (turf.buffer(smoothedOuterBorderGeoJSON, -settings.borderStroke.width / SCALE, {
units: 'degrees',
+ steps: settings.borderStroke.smoothing ? 8 : 1,
}) as ReturnType | null);
border.outerPath =
smoothedOuterBorderGeoJSON == null
diff --git a/src/renderer/src/lib/settings/mapSettings.ts b/src/renderer/src/lib/settings/mapSettings.ts
index c074530..a5bd101 100644
--- a/src/renderer/src/lib/settings/mapSettings.ts
+++ b/src/renderer/src/lib/settings/mapSettings.ts
@@ -14,6 +14,7 @@ export type NumberMapSettings =
| 'systemNamesFontSize';
export type NumberOptionalMapSettings =
+ | 'borderGap'
| 'countryEmblemsMaxSize'
| 'countryEmblemsMinSize'
| 'countryNamesMaxSize'
@@ -313,6 +314,7 @@ export const defaultMapSettings: MapSettings = {
colorAdjustments: [],
},
voronoiGridSize: 30,
+ borderGap: null,
hyperlaneSensitiveBorders: true,
claimVoidBorderThreshold: 0.6,
claimVoidMaxSize: 1000,
diff --git a/src/renderer/src/lib/settings/mapSettingsConfig.ts b/src/renderer/src/lib/settings/mapSettingsConfig.ts
index 989e826..5041d84 100644
--- a/src/renderer/src/lib/settings/mapSettingsConfig.ts
+++ b/src/renderer/src/lib/settings/mapSettingsConfig.ts
@@ -483,6 +483,15 @@ export const mapSettingsConfig: MapSettingConfigGroup[] = [
type: 'toggle',
tooltip: 'setting.circularGalaxyBorders_tooltip',
},
+ {
+ id: 'borderGap',
+ requiresReprocessing: true,
+ type: 'number',
+ step: 0.5,
+ min: 0,
+ optional: true,
+ tooltip: 'setting.borderGap_tooltip',
+ },
{
id: 'hyperlaneSensitiveBorders',
requiresReprocessing: true,