A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
Hex tiles: the five civilian proto hooks draw their same-id Collection originals (Refs #1955) (#3076)
Eyal Golanf79f38c98e2c
diff --git a/changelog.d/1955-five-civilian-aliases.md b/changelog.d/1955-five-civilian-aliases.mdnew file mode 100644index 000000000..2fabde4e4--- /dev/null+++ b/changelog.d/1955-five-civilian-aliases.md@@ -0,0 +1,4 @@+### Changed+- Hex tiles (Refs #1955): the ma'abara camp's elder, woman, child and Yemenite immigrant, and the Negev kibbutz's+ woman, now draw Tal Heuberger's shipped Collection figures of the same names instead of a stand-in, as the owner+ approved on 30 October 2026. A player asks the Collection stream for them, as for the other hex figures.diff --git a/changelog.d/1955-khaki-tent-kibbutz-negev.md b/changelog.d/1955-khaki-tent-kibbutz-negev.mdnew file mode 100644index 000000000..e15dffca8--- /dev/null+++ b/changelog.d/1955-khaki-tent-kibbutz-negev.md@@ -0,0 +1,4 @@+### Changed+- Hex tiles (Refs #1955): the Negev kibbutz's two small tents now draw Tal Heuberger's khaki canvas tent, the one the+ transit camps use, instead of a box, as the owner decided on 10 November 2026 ("Where it fits"). The desert tiles'+ goat-hair tents keep their boxes, since the tent would take those tiles past their triangle budgets.diff --git a/unity/Assets/Scripts/Map/HexTiles/Core/HexModels.cs b/unity/Assets/Scripts/Map/HexTiles/Core/HexModels.csindex 0c488d7a7..26c8d5459 100644--- a/unity/Assets/Scripts/Map/HexTiles/Core/HexModels.cs+++ b/unity/Assets/Scripts/Map/HexTiles/Core/HexModels.cs@@ -112,6 +112,23 @@ namespace Statecraft.HexTiles// protos measure whole and keep drawing.("proto:figure-sheep-lite-1948", "figure-sheep-idle-1948-v1", "far"),("proto:figure-donkey-lite-1948", "figure-donkey-1948-v1", "far"),+ // The five civilian hooks of the ma'abara and Negev kibbutz tiles (#1955; owner, 30 October 2026: "Yes to both"):+ // Tal Heuberger's shipped Collection originals with the same ids, at the far level (one -stream prefab for both).+ ("proto:figure-elder-immigrant-v1", "figure-elder-immigrant-v1", "far"),+ ("proto:figure-immigrant-woman-v1", "figure-immigrant-woman-v1", "far"),+ ("proto:figure-immigrant-child-v1", "figure-immigrant-child-v1", "far"),+ ("proto:figure-yemenite-immigrant-v1", "figure-yemenite-immigrant-v1", "far"),+ ("proto:figure-kibbutz-woman-v1", "figure-kibbutz-woman-v1", "far"),+ };++ /// <summary>Hex-tile prop ids drawn as one of Tal Heuberger's generated Collection props (one prefab for both details,+ /// asked near like its other users), with the figures and under the same switch. The Negev kibbutz's two small tents+ /// are the khaki canvas tent the camps use (#1955; owner, 10 November 2026: "Where it fits + one per tile+ /// (Recommended)"). The desert tiles' goat-hair tents keep their boxes: one tent each would take negev_loess and+ /// judean_desert past their triangle budgets.</summary>+ public static readonly (string id, string prop)[] PropAliases =+ {+ ("tiles:kibbutz_negev/tent", CollectionCatalog.KhakiTent),};/// <summary>Off draws the proto figures again (a before shot, or a test of the fallback); call <see cref="Clear"/>@@ -139,6 +156,7 @@ namespace Statecraft.HexTilesstatic readonly Dictionary<string, (string figure, string level)> figureOf =FigureAliases.ToDictionary(a => a.id, a => (a.figure, a.level), StringComparer.Ordinal);+ static readonly Dictionary<string, string> propOf = PropAliases.ToDictionary(a => a.id, a => a.prop, StringComparer.Ordinal);internal static bool CollectionAlias(string id, out string figure, out CollectionDetail detail){@@ -156,6 +174,10 @@ namespace Statecraft.HexTiles{figure = alias.figure; detail = alias.level == "far" ? CollectionDetail.Far : CollectionDetail.Near; return true;}+ if (DrawCollectionFigures && propOf.TryGetValue(id, out var prop))+ {+ figure = prop; detail = CollectionDetail.Near; return true;+ }figure = ""; detail = CollectionDetail.Far; return false;}@@ -170,6 +192,17 @@ namespace Statecraft.HexTilesreturn null;}+ /// <summary>The Collection prefab a prop id draws in the editor (AssetDatabase), or null: in a player, not a prop+ /// alias, or switched off.</summary>+ static GameObject? CollectionProp(string id)+ {+#if UNITY_EDITOR+ if (DrawCollectionFigures && propOf.TryGetValue(id, out var prop))+ return UnityEditor.AssetDatabase.LoadAssetAtPath<GameObject>(CollectionCatalog.PrefabPath(prop, CollectionDetail.Near));+#endif+ return null;+ }+/// <summary>A streamed prop's prefab (HexProps) in the editor (AssetDatabase), or null: in a player, which streams it.</summary>static GameObject? StreamedProp(string id){@@ -205,7 +238,7 @@ namespace Statecraft.HexTilesbool town = id.StartsWith(TownPrefix, StringComparison.Ordinal), alias = townOf.ContainsKey(id);var made = town || alias ? Town(town ? id : townOf[id]) : null;if (made != null) return prefabs[id] = made;- var figure = CollectionFigure(id) ?? StreamedProp(id) ?? HouseLevel(id);+ var figure = CollectionFigure(id) ?? CollectionProp(id) ?? StreamedProp(id) ?? HouseLevel(id);if (figure != null) return prefabs[id] = figure;var prefab = town ? null : Resources.Load<GameObject>(PathOf(id));// Without the set (a player before the map scene has loaded it), not remembered, so the set is looked for again.diff --git a/unity/Assets/Scripts/Map/HexTiles/Prototypes/KibbutzNegev.cs b/unity/Assets/Scripts/Map/HexTiles/Prototypes/KibbutzNegev.csindex 285f76053..948fdf27f 100644--- a/unity/Assets/Scripts/Map/HexTiles/Prototypes/KibbutzNegev.cs+++ b/unity/Assets/Scripts/Map/HexTiles/Prototypes/KibbutzNegev.cs@@ -12,7 +12,8 @@ namespace Statecraft.HexTiles.Prototypes/// at its nearest, so the unit spot stays open. Its perimeter is a ring of thin stand-in posts/// (tiles:kibbutz_negev/fence_post). The gate faces the centre, and a dirt road runs from it through the centre./// - Inside the fence: a dining hut (sandbox:kit_kibbutz_2) facing the gate, three prefab huts (sandbox:kit_negev_2 and _3, 0.12 S),- /// two small canvas tents (tiles:kibbutz_negev/tent, 0.055 S, as DesertEdge keeps its tents under the building size), and the wooden water tower as the signature+ /// two small canvas tents (tiles:kibbutz_negev/tent, 0.055 S, as DesertEdge keeps its tents under the building size; drawn as+ /// Tal Heuberger's khaki canvas tent, HexModels.PropAliases), and the wooden water tower as the signature/// (tiles:kibbutz_negev/water_tower: a Palm stand-in reads as a frame with the barrel on top). No kibbutz is named./// - The water line: work began in January 1947 on a line from the Nir Am area, and by October 1947 water reached the/// southernmost points (the Hebrew article, checked 2026-10-19). It is a narrow painted dirt stroke from the back of@@ -28,6 +29,8 @@ namespace Statecraft.HexTiles.Prototypes/// - 3 desert rocks x 700 = 2,100./// - 1 figure (proto:figure-kibbutz-woman-v1, assumed 4,000) = 4,000./// - Stand-ins: 30 fence posts, 2 tents, the tower and 4 tamarisks, about 37 x 60 = 2,220.+ /// - Later, the 2 tents as Tal Heuberger's khaki canvas tent (#1955; owner, 10 November 2026): 2 x 3,988 = 7,976 in place of+ /// their 2 Box stand-ins (32), so the measured 36,633 below becomes at most 44,577 of 45,000./// - Total about 16,500 of 20,000.</summary>[HexPrototype("kibbutz_negev", Kind = "village", Region = "south")]public sealed class KibbutzNegev : IHexPrototypediff --git a/unity/Assets/Tests/EditMode/HexCollectionFiguresTests.cs b/unity/Assets/Tests/EditMode/HexCollectionFiguresTests.csindex 7ff4fca98..bbd95662f 100644--- a/unity/Assets/Tests/EditMode/HexCollectionFiguresTests.cs+++ b/unity/Assets/Tests/EditMode/HexCollectionFiguresTests.cs@@ -51,6 +51,69 @@ public sealed class HexCollectionFiguresTestsAssert.That(changes, Is.EqualTo(1));}+ // The five civilian hooks (#1955; owner, 30 October 2026: "Yes to both"): each tile still asks for its hook, and each+ // hook streams Tal Heuberger's shipped Collection original of the same id, far, from the people's bundle.+ [TestCase("maabara_camp", "figure-elder-immigrant-v1")]+ [TestCase("maabara_camp", "figure-immigrant-woman-v1")]+ [TestCase("maabara_camp", "figure-immigrant-child-v1")]+ [TestCase("maabara_camp", "figure-yemenite-immigrant-v1")]+ [TestCase("kibbutz_negev", "figure-kibbutz-woman-v1")]+ public void CivilianHookStreamsItsSameIdOriginal(string tile, string figure)+ {+ string id = "proto:" + figure;+ var ctx = new HexTileContext(2, -1, new FlatSurface(), 1948);+ HexPrototypes.Create(tile).Build(ctx);+ Assert.That(ctx.Placements.Count(p => p.Model == id), Is.GreaterThan(0), tile + " places " + id);+ Assert.That(HexModels.FigureAliases, Has.Exactly(1).EqualTo((id, figure, "far")));+ Assert.That(HexCollectionFigures.Streams(id), Is.True, id);+ using var models = new HexCollectionFigures(() => {});+ models.Prefab(id);+ Assert.That(pending.Select(r => (r.id, r.detail)), Is.EqualTo(new[] { (figure, CollectionDetail.Far) }));+ // Every Collection model streams in a bundle of its own (CollectionCatalog.Bundles), the original's here.+ Assert.That(CollectionCatalog.BundleOf(figure), Is.EqualTo("collection-" + figure));+ }++ // Tal Heuberger's khaki canvas tent on the hex tiles (#1955; owner, 10 November 2026: "Where it fits + one per tile+ // (Recommended)"): the Negev kibbutz's two small tents stream it from its own bundle, the one the camps' tents use.+ [Test] public void TheNegevKibbutzTentsStreamTalsKhakiTent()+ {+ const string id = "tiles:kibbutz_negev/tent";+ var ctx = new HexTileContext(2, -1, new FlatSurface(), 1948);+ HexPrototypes.Create("kibbutz_negev").Build(ctx);+ Assert.That(ctx.Placements.Count(p => p.Model == id), Is.EqualTo(2), "kibbutz_negev places its two tents");+ Assert.That(HexCollectionFigures.Streams(id), Is.True, id);+ using var models = new HexCollectionFigures(() => {});+ models.Prefab(id); models.Prefab(id);+ Assert.That(pending.Select(r => (r.id, r.detail)), Is.EqualTo(new[] { (CollectionCatalog.KhakiTent, CollectionDetail.Near) }), "asked once");+ Assert.That(CollectionCatalog.BundleOf(CollectionCatalog.KhakiTent), Is.EqualTo("collection-" + CollectionCatalog.KhakiTent));+ var editor = HexModels.Prefab(id);+ Assert.That(editor, Is.Not.Null, "the editor draws the tent's prefab");+ Assert.That(UnityEditor.AssetDatabase.GetAssetPath(editor), Is.EqualTo(CollectionCatalog.PrefabPath(CollectionCatalog.KhakiTent, CollectionDetail.Near)));+ HexModels.DrawCollectionFigures = false; HexModels.Clear();+ Assert.That(HexCollectionFigures.Streams(id), Is.False, "switched off with the figures");+ Assert.That(HexModels.Prefab(id), Is.Null, "off: the Box stand-in again");+ }++ // Where the tent does not fit (the same ruling; e6/tent-measure.md): one tent in place of each multi-box goat-hair tent+ // would take negev_loess past its 8,000 and judean_desert past its documented 11,850 of 14,000, so both keep their boxes.+ [TestCase("negev_loess")]+ [TestCase("judean_desert")]+ public void TheDesertTilesKeepTheirBoxTents(string tile)+ {+ string id = "tiles:" + tile + "/tent";+ // A judean_desert hex puts its tent only where a rim edge is clear of the seeded wadis, so look for a hex that does.+ int placed = 0;+ for (int i = 0; i < 64 && placed == 0; i++)+ {+ var ctx = new HexTileContext(i % 8 - 4, i / 8 - 4, new FlatSurface(), 1948);+ HexPrototypes.Create(tile).Build(ctx);+ placed = ctx.Placements.Count(p => p.Model == id);+ }+ Assert.That(placed, Is.GreaterThan(0), tile + " places " + id + " on some hex");+ Assert.That(HexCollectionFigures.Streams(id), Is.False, id);+ Assert.That(HexModels.Prefab(id), Is.Null, id + " draws its Box stand-in");+ }+[Test] public void FailureStaysOnFallbackAndDoesNotRequestEveryFrame(){using var models = new HexCollectionFigures(() => Assert.Fail("failure does not need a visual rebuild"));