Skip to content

A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.

Map: the 1949 armistice lines are on by default, signed-off lines only for players (Refs #196) (#2195)

Eyal Golanad8fcb243d24
diff --git a/changelog.d/196-armistice-lines-on.md b/changelog.d/196-armistice-lines-on.md
new file mode 100644
index 000000000..6bf6e08a8
--- /dev/null
+++ b/changelog.d/196-armistice-lines-on.md
@@ -0,0 +1,11 @@
+### Changed
+- The 1949 armistice lines drawn as true polylines are on by default (#196; owner, 1 November 2026: "On by default
+ (Recommended)"). A release build still draws and ships only the 11 lines the owner has signed off; the five draft ones
+ stay out. Each line shows from its own agreement's date, so nothing changes on the map before 24 February 1949.
+ `?noarmisticelines` in the web page's URL (`-noarmisticelines` on desktop) turns the lines off; `?armisticelines` is
+ no longer needed. Display only: the sim never reads the lines and the goldens do not move.
+- The minimap's Borders button hides and shows the true armistice lines with the borders (owner, 2 November 2026: "Tie
+ to Borders button (Recommended)").
+- The low-accuracy Jordan lines are drawn dotted (300 m dots, 450 m gaps) instead of dashed, so the legend's grey dash
+ stays the sign of no-man's land and the demilitarized zones (owner, 2 November 2026: "Restyle Jordan lines
+ (Recommended)").
diff --git a/docs/dev-setup.md b/docs/dev-setup.md
index f58868eca..481f1f681 100644
--- a/docs/dev-setup.md
+++ b/docs/dev-setup.md
@@ -59,8 +59,8 @@ Not possible without Unity and not in CI: the Unity EditMode tests, player build
- Page flags: `?golden` (golden check), `?smoke=N` (play N turns through the UI; bare `?smoke` = 5, `?smoke=0` = off),
`?profile` (terrain profile), `?camlog` (log the camera distance), `?bootlog` (each boot phase's timing) and `?navlog`
(every UI pointer and submit event, screen toggle and map click, with its frame), `?vprofile` (the visual frame-time
- profile per feature), `?shot` (screenshots at the promo poses as `SHOT` console lines) and `?kitscale=N`, `?housescale=N`, `?treescale=N` (the settlement kits' symbolic scale for city blocks, houses and trees, clamped to 5–200; defaults 60, 100, 100), `?armisticelines` (the 1949 armistice lines as true polylines over the hex bands, #237; a release build draws and ships only the signed-off features). In the editor, `MapCapture.Kits` takes `-kitScale`, `-houseScale` and `-treeScale`. Desktop players take `-golden`,
- `-smoke N`, `-profile`, `-camlog`, `-bootlog`, `-navlog`, `-vprofile`, `-shot` and `-armisticelines`. The console also shows `GAME OK <date> turn <n> hash <h>` at start and `TURN <n> <date> hash <h>` per turn.
+ profile per feature), `?shot` (screenshots at the promo poses as `SHOT` console lines) and `?kitscale=N`, `?housescale=N`, `?treescale=N` (the settlement kits' symbolic scale for city blocks, houses and trees, clamped to 5–200; defaults 60, 100, 100), `?noarmisticelines` (turns off the 1949 armistice lines drawn as true polylines over the hex bands, which are on by default, #237 and #196; a release build draws and ships only the signed-off features). In the editor, `MapCapture.Kits` takes `-kitScale`, `-houseScale` and `-treeScale`. Desktop players take `-golden`,
+ `-smoke N`, `-profile`, `-camlog`, `-bootlog`, `-navlog`, `-vprofile`, `-shot` and `-noarmisticelines`. The console also shows `GAME OK <date> turn <n> hash <h>` at start and `TURN <n> <date> hash <h>` per turn.
- First card in normal mode (#909): `?firstcard` keeps the start screen and decision video on, presses New Game at once
and logs `FIRST CARD OK event=<id> media=<photo|portrait fallback> wait=<ms> ms budget=<ms> ms`, or `FIRST CARD FAIL`
after the budget (10 s, proposed). Run it with `uv run tools/machine_lock.py --shared -- uv run tools/web_check.py <build>
diff --git a/unity/Assets/Scripts/Boot/ContentManifest.cs b/unity/Assets/Scripts/Boot/ContentManifest.cs
index 732b73e45..1d1bd34ae 100644
--- a/unity/Assets/Scripts/Boot/ContentManifest.cs
+++ b/unity/Assets/Scripts/Boot/ContentManifest.cs
@@ -35,7 +35,7 @@ namespace Statecraft.Game.Boot
/// <summary>Baked map files that are not YAML, listed when present: the runtime forms of the 1948 localities and of the
/// route paths and the region files (boot budget, issue #321). Their YAML still ships: each runtime file is checked
- /// against it. Also the true armistice lines, which the "armisticelines" map mode draws as they are (#237).</summary>
+ /// against it. Also the true armistice lines, which the map draws as they are, on unless turned off (#237, #196).</summary>
public static readonly IReadOnlyList<string> RuntimeData = new[] { "map/localities_1948.tsv", "map/route_paths_1948.tsv",
"map/subdistrict_hexes_1948.tsv", "map/armistice_hexes_1949.tsv", "map/control_hexes_1948_49.tsv", "map/armistice_lines_1949.geojson" };
diff --git a/unity/Assets/Scripts/Boot/GameInputs.cs b/unity/Assets/Scripts/Boot/GameInputs.cs
index 3e56875e3..dafceea95 100644
--- a/unity/Assets/Scripts/Boot/GameInputs.cs
+++ b/unity/Assets/Scripts/Boot/GameInputs.cs
@@ -42,8 +42,8 @@ namespace Statecraft.Game.Boot
/// <summary>content/map/control_hexes_1948_49.yaml: who held which areas, 1948-49, by period (display only; "" when
/// absent: the older drawing, sub-districts with the armistice zones over them).</summary>
public string ControlYaml = "";
- /// <summary>content/map/armistice_lines_1949.geojson: the true armistice lines, drawn as polylines in the
- /// "armisticelines" map mode (ArmisticeLines, #237; display only; "" when absent: no overlay).</summary>
+ /// <summary>content/map/armistice_lines_1949.geojson: the true armistice lines, drawn as polylines unless the run
+ /// turns them off with "noarmisticelines" (ArmisticeLines, #237, #196; display only; "" when absent: no overlay).</summary>
public string ArmisticeLinesGeojson = "";
/// <summary>heightmap.r16z as read: packed (HeightmapCodec); HeightmapLoader decodes it when the map is built.</summary>
public byte[] HeightmapR16z = new byte[0];
diff --git a/unity/Assets/Scripts/Map/ArmisticeLine.cs b/unity/Assets/Scripts/Map/ArmisticeLine.cs
index 2c3a726ab..b9d2c5435 100644
--- a/unity/Assets/Scripts/Map/ArmisticeLine.cs
+++ b/unity/Assets/Scripts/Map/ArmisticeLine.cs
@@ -28,7 +28,7 @@ namespace Statecraft.Game.Map
}
/// <summary>Draws the line at a width scale; each scale's mesh is made once, on first use. At most three steps past the
- /// gameplay zoom, so the first zoom-out past each costs one rebuild of the lines (a one-off hitch, in an opt-in mode).</summary>
+ /// gameplay zoom, so the first zoom-out past each costs one rebuild of the lines (a one-off hitch).</summary>
internal void DrawAt(float scale)
{
if (MeshAt == null) return;
diff --git a/unity/Assets/Scripts/Map/ArmisticeLines.cs b/unity/Assets/Scripts/Map/ArmisticeLines.cs
index d2b5bb9f1..dd7277dd8 100644
--- a/unity/Assets/Scripts/Map/ArmisticeLines.cs
+++ b/unity/Assets/Scripts/Map/ArmisticeLines.cs
@@ -14,20 +14,22 @@ namespace Statecraft.Game.Map
{
/// <summary>The 1949 armistice lines as their true polylines (#237; option 3 of docs/visual-v1.md, "Region borders"):
/// every feature of content/map/armistice_lines_1949.geojson drawn as a thin dark line draped on the ground, over the
- /// hex-snapped bands (<see cref="Armistice1949"/>), which stay as they are. A map mode, off unless asked for
- /// ("armisticelines" in the WebGL page URL, -armisticelines on desktop and in the editor): with the flag the map builds
- /// it, without it nothing is built. A release build draws only the features the owner has signed off
+ /// hex-snapped bands (<see cref="Armistice1949"/>), which stay as they are. On unless turned off (owner, 1
+ /// November 2026: "On by default (Recommended)"; #196): "noarmisticelines" in the WebGL page URL, -noarmisticelines on
+ /// desktop and in the editor, builds nothing, and the "armisticelines" visual toggle hides a built overlay (the
+ /// minimap's Borders button works it with the bands: owner, 2 November 2026, "Tie to Borders button (Recommended)"). A release build draws only the features the owner has signed off
/// (<see cref="ForBuild"/>) and ships only those (<see cref="ReleaseText"/>). Zoomed out past the gameplay zoom the lines
/// widen with the distance (<see cref="WidthScale"/>). Each feature shows from its own shown_from date, as the bands do. Features traced
- /// from the low-resolution scan (source_quality: low_res_scan, the Jordan lines) are drawn dashed and a step lighter, so
- /// they read as low accuracy without a legend and without colour alone. Zones (the Demilitarized Zones, including the
+ /// from the low-resolution scan (source_quality: low_res_scan, the Jordan lines) are drawn dotted and a step lighter, so
+ /// they read as low accuracy without a legend and without colour alone, and apart from the bands' grey dash for
+ /// no-man's land and the demilitarized zones (owner, 2 November 2026: "Restyle Jordan lines (Recommended)"). Zones (the Demilitarized Zones, including the
/// two Syrian parts too narrow to hold a hex centre) are drawn as their closed outlines. Reuses the route ribbons'
/// draping (<see cref="RouteLayer.Geometry"/>) and the selected hex's unlit material (HexSelection.mat, copied per
/// style). Display only: the sim never reads the file, and this changes no sim state and no other map layer.</summary>
public static class ArmisticeLines
{
public const string FileName = "armistice_lines_1949.geojson", RootName = "ArmisticeLines", ToggleName = "armisticelines",
- Flag = "armisticelines";
+ OffFlag = "noarmisticelines";
/// <summary>The line's width on the ground: about 4 px at the gameplay zoom (52 m a pixel), a third of a road's, so
/// it reads as a drawn line, not as a band or a route.</summary>
public const float WidthM = 200f;
@@ -38,9 +40,9 @@ namespace Statecraft.Game.Map
/// about 52 m a pixel at 1080 px). Farther out the lines widen with the distance (<see cref="WidthScale"/>), since a
/// fixed ground width thins to about a pixel at the full-map zoom (owner review of #2012).</summary>
public const float WidthsSetAtM = 90000f;
- /// <summary>The low-accuracy dashes: a DashM period, DashOn of it drawn (1 km dashes, 0.6 km gaps; about 19 and 12 px
- /// at the gameplay zoom).</summary>
- public const float DashM = 1600f, DashOn = 0.625f;
+ /// <summary>The low-accuracy dots: a DashM period, DashOn of it drawn (300 m marks, as long as the line is wide, and
+ /// 450 m gaps; about 6 and 9 px at the gameplay zoom), a pattern apart from MapBorders' neutral dash (1.3 km).</summary>
+ public const float DashM = 750f, DashOn = 0.4f;
/// <summary>sRGB. Firm: a near-black ink that stands out on the gold and olive ground and on both sides' bands.
/// Low accuracy: a dark grey, a step lighter, so the dashes read as the weaker line (a mid grey was lost on the hills'
/// ground in the captures).</summary>
@@ -55,15 +57,17 @@ namespace Statecraft.Game.Map
public List<List<(double lon, double lat)>> Parts = new List<List<(double lon, double lat)>>();
}
- /// <summary>Whether this run draws the overlay (MapScene.Build asks). A seam: a test turns the mode on to build the map
- /// with it.</summary>
+ /// <summary>Whether this run draws the overlay (MapScene.Build asks). A seam: a test sets it to build the map with or
+ /// without it.</summary>
internal static Func<bool> Wanted = Requested;
public static bool Requested() =>
Requested(Application.absoluteURL, Environment.GetCommandLineArgs(), Application.platform == RuntimePlatform.WebGLPlayer);
+ /// <summary>True unless the run turns the overlay off (<see cref="OffFlag"/>, as "notiltshift" turns tilt-shift off).
+ /// The earlier opt-in flag ("armisticelines") is no longer read, so an old link still shows the lines.</summary>
public static bool Requested(string? url, string[] args, bool webgl) =>
- webgl ? UrlFlags.Has(url, Flag) : args.Contains("-" + Flag);
+ !(webgl ? UrlFlags.Has(url, OffFlag) : args.Contains("-" + OffFlag));
/// <summary>Parses the GeoJSON (JSON is YAML, so the YAML reader the content already uses reads it). Every malformed
/// input throws InvalidDataException naming the file and the feature.</summary>
diff --git a/unity/Assets/Scripts/Map/MapScene.cs b/unity/Assets/Scripts/Map/MapScene.cs
index 88fe68c9f..35259300b 100644
--- a/unity/Assets/Scripts/Map/MapScene.cs
+++ b/unity/Assets/Scripts/Map/MapScene.cs
@@ -715,8 +715,8 @@ namespace Statecraft.Game.Map
Routes.RouteLayer.Build(Terrain, Frame, routes, Routes.RouteLayer.ModeForThisRun(), RouteDate ?? Routes.RouteLayer.DefaultDate,
Routes.RouteRibbonFile.Source.Of(heights, inputs.HeightmapJson, inputs.RoutesYaml), this);
DiagLog.BootPhase("routes built");
- // The 1949 armistice lines as their true polylines (#237), only in the map mode asked for with the
- // "armisticelines" flag; a missing or malformed file means no overlay and a warning. Display only.
+ // The 1949 armistice lines as their true polylines (#237), unless the run turns them off with the
+ // "noarmisticelines" flag; a missing or malformed file means no overlay and a warning. Display only.
if (ArmisticeLines.Wanted() && inputs.ArmisticeLinesGeojson == "") Debug.LogWarning($"ARMISTICE LINES: {ArmisticeLines.FileName} is missing; no overlay");
else if (ArmisticeLines.Wanted())
{
diff --git a/unity/Assets/Scripts/UI/GameRoot.cs b/unity/Assets/Scripts/UI/GameRoot.cs
index 252da45f2..1c9765b79 100644
--- a/unity/Assets/Scripts/UI/GameRoot.cs
+++ b/unity/Assets/Scripts/UI/GameRoot.cs
@@ -893,7 +893,7 @@ namespace Statecraft.Game.UI
// Dated routes (the Burma Road from June 1948); in the GDD loop the corridors by their built segments (#792).
Statecraft.Game.Map.Routes.RouteLayer.ShowAt(map, Bridge.State.Date,
Bridge.Content.IsGdd ? Statecraft.Game.Map.Routes.RouteLayer.BuiltSegments(Bridge.Content, Bridge.State) : null);
- // The true armistice lines (#237, the "armisticelines" map mode), each from its own date; nothing without the mode.
+ // The true armistice lines (#237; on unless "noarmisticelines" turns them off, #196), each from its own date.
ArmisticeLines.ShowAt(map, Bridge.State.Date);
// Tal Heuberger's whole-town models on their towns far off (#663, "Whole model far, buildings near"), streamed after the first frame; the ma'abara from its date.
// The camps and housing built as city projects bring theirs too, as the placement layer draws them (#1275).
diff --git a/unity/Assets/Scripts/UI/MinimapPresenter.cs b/unity/Assets/Scripts/UI/MinimapPresenter.cs
index 94396bfe7..4308e830d 100644
--- a/unity/Assets/Scripts/UI/MinimapPresenter.cs
+++ b/unity/Assets/Scripts/UI/MinimapPresenter.cs
@@ -102,6 +102,8 @@ namespace Statecraft.Game.UI
{
BordersShown = !BordersShown;
Switch(MapBorders.ToggleName, BordersShown, borders);
+ // The true armistice lines go with the borders (owner, 2 November 2026: "Tie to Borders button (Recommended)").
+ if (VisualToggles.Names.Contains(ArmisticeLines.ToggleName)) VisualToggles.Set(ArmisticeLines.ToggleName, BordersShown);
BordersChanged?.Invoke();
}
diff --git a/unity/Assets/Tests/EditMode/ArmisticeLinesTests.cs b/unity/Assets/Tests/EditMode/ArmisticeLinesTests.cs
index 09ecd3974..6d878e4f7 100644
--- a/unity/Assets/Tests/EditMode/ArmisticeLinesTests.cs
+++ b/unity/Assets/Tests/EditMode/ArmisticeLinesTests.cs
@@ -8,6 +8,7 @@ using NUnit.Framework;
using Statecraft.Game;
using Statecraft.Game.Boot;
using Statecraft.Game.Map;
+using Statecraft.Game.UI;
using Statecraft.Sim;
using UnityEditor;
using UnityEditor.SceneManagement;
@@ -23,6 +24,12 @@ public class ArmisticeLinesTests
/// <summary>The feature ids, read off the file with a pattern rather than the parser under test.</summary>
static List<string> FileIds => Regex.Matches(GeoText, "\"properties\":\\s*\\{\\s*\"id\":\\s*\"([a-z0-9_]+)\"").Select(m => m.Groups[1].Value).ToList();
static readonly DateTime After = new DateTime(1951, 1, 1);
+ /// <summary>The 11 features the owner signed off on 23 October 2026 (#196, #1444; docs/m3-release.md, "Map lines") and
+ /// the five flagged then, by id: a player's map draws exactly the first list.</summary>
+ static readonly string[] SignedOff = { "lebanon_adl", "syria_dmz_north", "syria_dmz_central", "syria_dmz_south", "egypt_el_auja_dmz",
+ "jordan_adl_iraqi_a_triangle", "jordan_adl_iraqi_b_wadi_ara", "jordan_adl_iraqi_c_east", "jordan_adl_iraqi_c_south",
+ "jordan_adl_bc_south", "jordan_adl_d_arava" };
+ static readonly string[] Drafts = { "egypt_adl_gaza", "egypt_mv1950_demarcation", "egypt_mv1950_zone_lines", "jordan_adl_a_latrun", "syria_adl" };
static MapScene? map;
static MapScene Map => map != null ? map : map = RouteTests.BuildMap();
@@ -106,13 +113,56 @@ public class ArmisticeLinesTests
float covered = dashes.Sum(d => (d[d.Count - 1] - d[0]).magnitude);
Assert.AreEqual(10000f * ArmisticeLines.DashOn, covered, ArmisticeLines.DashM * ArmisticeLines.DashOn);
Assert.IsTrue(dashes.All(d => (d[d.Count - 1] - d[0]).magnitude <= ArmisticeLines.DashM * ArmisticeLines.DashOn + 1f));
- // A dash runs on round a bend: on an L with an 800 m first leg the first dash keeps the corner and its full length.
- var bent = ArmisticeLines.Dashes(new List<Vector2> { Vector2.zero, new Vector2(800f, 0f), new Vector2(800f, 2000f) });
- CollectionAssert.Contains(bent[0], new Vector2(800f, 0f), "the dash over the corner keeps the corner");
+ // A dash runs on round a bend: on an L whose first leg is 100 m shorter than a dash, the first dash keeps the corner
+ // and its full length.
+ float leg = ArmisticeLines.DashM * ArmisticeLines.DashOn - 100f;
+ var bent = ArmisticeLines.Dashes(new List<Vector2> { Vector2.zero, new Vector2(leg, 0f), new Vector2(leg, 2000f) });
+ CollectionAssert.Contains(bent[0], new Vector2(leg, 0f), "the dash over the corner keeps the corner");
float first = 0f; for (int i = 1; i < bent[0].Count; i++) first += (bent[0][i] - bent[0][i - 1]).magnitude;
Assert.AreEqual(ArmisticeLines.DashM * ArmisticeLines.DashOn, first, 1f, "a full dash, measured along the bend");
}
+ /// <summary>Owner, 2 November 2026 (#2195): "Restyle Jordan lines (Recommended)". The low-accuracy lines are drawn
+ /// dotted: each mark no longer than the line is wide, the gaps at least as long, and a mark a quarter or less of the
+ /// bands' grey dash for no-man's land and the demilitarized zones (MapBorders.NeutralDashM, NeutralDashOn), so the
+ /// legend's "No-man's land or demilitarized zone: grey, dashed" stays true of the dashes alone.</summary>
+ [Test]
+ public void TheLowAccuracyLinesAreDottedApartFromTheNeutralDash()
+ {
+ float mark = ArmisticeLines.DashM * ArmisticeLines.DashOn, gap = ArmisticeLines.DashM - mark;
+ Assert.LessOrEqual(mark, ArmisticeLines.LowAccuracyWidthM, "a dot: no longer than the line is wide");
+ Assert.GreaterOrEqual(gap, mark, "the gaps are at least as long as the dots");
+ Assert.LessOrEqual(mark, MapBorders.NeutralDashM * MapBorders.NeutralDashOn / 4f, "a quarter of the neutral dash or less");
+ }
+
+ /// <summary>Owner, 2 November 2026 (#2195): "Tie to Borders button (Recommended)". The minimap's Borders button hides
+ /// the true lines with the bands, and pressing it again shows them.</summary>
+ [Test]
+ public void TheMinimapBordersButtonHidesTheLinesAndShowsThemAgain()
+ {
+ var root = Overlay(After);
+ try
+ {
+ using var ui = new UiTestKit();
+ using var mini = new MinimapPresenter(ui.Root, Map.Hexes);
+ var lines = root.transform.Find("Lines").gameObject;
+ Assert.IsTrue(lines.activeSelf, "precondition: the lines are shown");
+ ui.Press("minimap-borders");
+ Assert.IsFalse(mini.BordersShown);
+ Assert.IsFalse(lines.activeSelf, "Borders off hides the true lines");
+ ui.Press("minimap-borders");
+ Assert.IsTrue(mini.BordersShown);
+ Assert.IsTrue(lines.activeSelf, "Borders on shows them again");
+ }
+ finally
+ {
+ Object.DestroyImmediate(root);
+ // The presses also work the shared map's bands (MapBorders' switch, which keeps its state): leave them on for
+ // the next test however this one ended (review of #2195, C5).
+ if (VisualToggles.Names.Contains(MapBorders.ToggleName)) VisualToggles.Set(MapBorders.ToggleName, true);
+ }
+ }
+
[Test]
public void EachLineIsShownFromItsOwnDate()
{
@@ -132,16 +182,22 @@ public class ArmisticeLinesTests
finally { Object.DestroyImmediate(root); }
}
- /// <summary>Display only: off unless asked for (the map builds no overlay without the flag), nothing in the sim reads the
- /// file (the content hash), and drawing it leaves the hex-snapped layer and its baked data as they were.</summary>
+ /// <summary>Display only, and on unless turned off (owner, 1 November 2026: "On by default (Recommended)"): the map
+ /// builds the overlay with no flag, "noarmisticelines" turns it off (the old "armisticelines" links still show it),
+ /// nothing in the sim reads the file (the content hash), and drawing it leaves the hex-snapped layer and its baked data
+ /// as they were.</summary>
[Test]
- public void TheOverlayIsDisplayOnlyAndOffUnlessAsked()
+ public void TheOverlayIsDisplayOnlyAndOnUnlessTurnedOff()
{
- Assert.IsNull(Map.Terrain.transform.Find(ArmisticeLines.RootName), "no overlay without the flag");
- Assert.IsFalse(ArmisticeLines.Requested("https://x/index.html", new string[0], true));
- Assert.IsTrue(ArmisticeLines.Requested("https://x/index.html?armisticelines", new string[0], true));
+ Assert.IsNotNull(Map.Terrain.transform.Find(ArmisticeLines.RootName), "the overlay with no flag");
+ Assert.IsTrue(ArmisticeLines.Requested("https://x/index.html", new string[0], true));
+ Assert.IsTrue(ArmisticeLines.Requested(null, new[] { "game" }, false));
+ Assert.IsTrue(ArmisticeLines.Requested("https://x/index.html?armisticelines", new string[0], true), "an old link still shows it");
Assert.IsTrue(ArmisticeLines.Requested(null, new[] { "game", "-armisticelines" }, false));
- Assert.IsFalse(ArmisticeLines.Requested(null, new[] { "game" }, false));
+ Assert.IsFalse(ArmisticeLines.Requested("https://x/index.html?noarmisticelines", new string[0], true), "turned off");
+ Assert.IsFalse(ArmisticeLines.Requested("https://x/index.html?lang=he&noarmisticelines#x", new string[0], true));
+ Assert.IsFalse(ArmisticeLines.Requested(null, new[] { "game", "-noarmisticelines" }, false));
+ Assert.IsTrue(ArmisticeLines.Requested("https://x/index.html?noarmisticelinesx", new string[0], true), "a whole flag only");
// The hex bands are drawn from the RegionHexes texture (MapBorders); drawing the overlay leaves every texel as it was
// (a layer is drawn first, so the texels are not all empty).
@@ -269,6 +325,55 @@ public class ArmisticeLinesTests
finally { ArmisticeLines.Wanted = was; map = null; }
}
+ /// <summary>The kill switch through the real map build (review of #2195, C4): with -noarmisticelines the map builds no
+ /// overlay and registers no "armisticelines" switch, and the minimap's Borders button still works the bands.</summary>
+ [Test]
+ public void WithTheOffFlagTheMapBuildsNoOverlayAndBordersStillWork()
+ {
+ var was = ArmisticeLines.Wanted;
+ ArmisticeLines.Wanted = () => ArmisticeLines.Requested(null, new[] { "game", "-" + ArmisticeLines.OffFlag }, false);
+ try
+ {
+ var built = RouteTests.BuildMap();
+ Assert.IsNull(built.Terrain.transform.Find(ArmisticeLines.RootName), "no overlay with the off flag");
+ CollectionAssert.DoesNotContain(VisualToggles.Names, ArmisticeLines.ToggleName, "no switch for the lines");
+ CollectionAssert.Contains(VisualToggles.Names, MapBorders.ToggleName, "precondition: the bands' switch");
+ using var ui = new UiTestKit();
+ using var mini = new MinimapPresenter(ui.Root, built.Hexes);
+ Assert.DoesNotThrow(() => ui.Press("minimap-borders"));
+ Assert.IsFalse(mini.BordersShown, "Borders off with no lines to hide");
+ Assert.DoesNotThrow(() => ui.Press("minimap-borders"));
+ Assert.IsTrue(mini.BordersShown);
+ }
+ finally { ArmisticeLines.Wanted = was; map = null; }
+ }
+
+ /// <summary>Owner, 1 November 2026: "On by default (Recommended)", with only the signed-off lines for players. A
+ /// release player's map, built with no flag from the file as a release build ships it (ContentManifest's release copy),
+ /// draws the 11 signed-off features and none of the five drafts.</summary>
+ [Test]
+ public void APlayersMapDrawsTheSignedOffLinesByDefaultAndNoDraft()
+ {
+ var all = ArmisticeLines.Parse(GeoText);
+ CollectionAssert.AreEquivalent(SignedOff, all.Where(f => f.Reviewed).Select(f => f.Id).ToList(), "the file's signed-off features");
+ CollectionAssert.AreEquivalent(Drafts, all.Where(f => !f.Reviewed).Select(f => f.Id).ToList(), "the file's drafts");
+ var signedOff = SignedOff; var drafts = Drafts;
+ var target = Path.Combine(Path.GetTempPath(), "statecraft-armlines-player-" + Guid.NewGuid().ToString("N"));
+ try
+ {
+ ContentManifest.Copy(Paths.Content, target, release: true);
+ var inputs = GameInputs.MapFromDisk(Paths.Content, Paths.StreamingMap);
+ inputs.ArmisticeLinesGeojson = File.ReadAllText(Path.Combine(target, "map", ArmisticeLines.FileName));
+ var built = RouteTests.BuildMap(inputs);
+ var root = built.Terrain.transform.Find(ArmisticeLines.RootName);
+ Assert.IsNotNull(root, "the overlay is on with no flag");
+ var ids = root.GetComponentsInChildren<ArmisticeLine>(true).Select(l => l.Id).ToList();
+ CollectionAssert.AreEquivalent(signedOff, ids, "the signed-off features, each once");
+ foreach (var id in drafts) CollectionAssert.DoesNotContain(ids, id, $"{id} stays out of a player's map");
+ }
+ finally { map = null; if (Directory.Exists(target)) Directory.Delete(target, true); }
+ }
+
[Test]
public void TheWebGLBuildShipsTheTrueLinesAndTheMapReadsThem()
{
diff --git a/unity/Assets/Tests/EditMode/RouteTests.cs b/unity/Assets/Tests/EditMode/RouteTests.cs
index 494c65fd4..62b61a6a4 100644
--- a/unity/Assets/Tests/EditMode/RouteTests.cs
+++ b/unity/Assets/Tests/EditMode/RouteTests.cs
@@ -3,6 +3,7 @@ using System.IO;
using System.Linq;
using NUnit.Framework;
using Statecraft.Game;
+using Statecraft.Game.Boot;
using Statecraft.Game.Map;
using Statecraft.Game.Map.Routes;
using Statecraft.Sim;
@@ -74,12 +75,12 @@ public class RouteTests
for (int i = 1; i + 1 < along.Count; i++) Assert.AreEqual(120f * i, along[i], 1e-3f);
}
- internal static MapScene BuildMap()
+ internal static MapScene BuildMap(MapInputs inputs = null)
{
EditorSceneManager.NewScene(NewSceneSetup.DefaultGameObjects, NewSceneMode.Single);
var map = new GameObject("MapScene").AddComponent<MapScene>();
map.Configure(Load("Terrain"), Load("SettlementMarker"), Load("HexSelection"), Load("Sea"), Load("MapFrame"));
- map.Build();
+ if (inputs == null) map.Build(); else map.Build(inputs);
return map;
}