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.

unity: Social cohesion on the top bar, re-tiered for seven meters, and the objective card's line and photograph (refs #380) (#831)

Eyal Golan90077d6d838d
diff --git a/ASSETS.yaml b/ASSETS.yaml
index f78f017ad..83f40e4d8 100644
--- a/ASSETS.yaml
+++ b/ASSETS.yaml
@@ -563,6 +563,15 @@ rules:
adapted: "graded and cropped"
commons: "CC BY 4.0; Cc-by-4.0, Meitar Collection/license credit line, National Library of Israel/Meitar Collection; Items with VRTS permission confirmed"
note: "Event iraqi_exodus. Original 1914x1322, SHA-1 70c4dfa48f2794853b6eb6229663f2840c68c613 (https://upload.wikimedia.org/wikipedia/commons/1/1d/Aliyah_%28997008136551705171%29.jpg); made by tools/event_images.py (crop [0.5, 0.55, 1.0]). Commons VRTS permission ticket 2021092910005788. Licence verified 2026-10-11 via the Commons API (licence review), with the owner's sign-off 2026-10-11 (in session, via controller). Re-cropped 2026-10-13 to the centred card's 16:9 media header (at most 960x540) from the same original, the same crop centre and width; only the crop changed, the credit and licence are as before."
+ - glob: "unity/Assets/UI/EventImages/first_new_yishuv.jpg"
+ licence: CC-BY-4.0
+ source: "https://commons.wikimedia.org/wiki/File:Mefalsim_(997009452698205171.jpg"
+ status: owner-verify
+ artist: "Boris Carmi"
+ credit: "Boris Carmi / Meitar Collection / National Library of Israel / The Pritzker Family National Photography Collection · CC BY 4.0 · graded and cropped"
+ adapted: "graded and cropped"
+ commons: "CC BY 4.0; Cc-by-4.0, Meitar Collection/license credit line, National Library of Israel/Meitar Collection; Items with VRTS permission confirmed"
+ note: "Event first_new_yishuv, the GDD objective card (#380). Original 1528x1566, SHA-1 f4d82b8f08f810081145eec13d24ac09f672873f (https://upload.wikimedia.org/wikipedia/commons/e/e3/Mefalsim_%28997009452698205171.jpg); made by tools/event_images.py (crop [0.5, 0.53, 1.0]). Commons VRTS permission ticket 2021092910005788. NLI title 'the first days of kibbutz Mefalsim', June 1949. Licence, artist and credit read through the Commons API on 2026-10-16. Waits for the owner's sign-off (the issue's 'What needs maintainer sign-off')."
- glob: "unity/Assets/UI/EventImages/israel_bonds.jpg"
licence: Public-Domain
source: "https://commons.wikimedia.org/wiki/File:Photograph_of_President_Truman_in_the_Oval_Office,_evidently_receiving_a_Menorah_as_a_gift_from_the_Prime_Minister_of..._-_NARA_-_200318.jpg"
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 52630feec..ee9b3f91a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -146,6 +146,14 @@ adds a line under **Unreleased**; CI's `Changelog` job checks this (see `CONTRIB
showcase's coaches, four articulated cars that ride the track (owner, 16 October 2026: "ride the track, cut walls"):
on the Sorek valley's tightest bends their sides pass into the gorge walls. It streams only once the game date reaches
the service, never at boot. If it does not stream, the game plays on without it and logs one warning.
+- Social cohesion on the top bar, a resource meter (לכידות חברתית in Hebrew) with its change since last turn, in the GDD
+ loop only; it reads `GameState.Cohesion` (R-CITY-005; the owner's ruling of 15 October 2026, refs #380). The
+ objective card's line under its text, completed early (both dates and the months), on time or later, in English and
+ Hebrew (`Objectives.MonthsFromHistory`; the owner's wording on #379), and its photograph of Mefalsim's first days
+ (Boris Carmi, June 1949, CC BY 4.0, Meitar Collection; `ASSETS.yaml` row `owner-verify`). With seven meters
+ the bar re-tiers (the owner's "tighten and re-tier", 16 October 2026): each meter's sides are 6 px narrower; 16:9 at
+ 1920x1080 keeps the one-row bar, while 16:10, 4:3, 1280x720 and 1366x768 take the stacked bar, 5:4 drops the icons, a
+ square window takes two rows, and a phone's meters wrap to two lines. No golden moves.
- Tal's (@pixelrenderai-hash) 23 single-building Tripo models from #507, imported for the strategic map (refs #659, step
1): `unity/Assets/Art/Settlements/Prototype/Models/b*`, outside every `Resources/` folder, meshes compressed with no
animation, rig, tangents or Read/Write, colour maps committed and crunched at 512 px; `BuildingModelImportTests` pins
diff --git a/NOTICE b/NOTICE
index 3fb8c22b3..0a9e27b5f 100644
--- a/NOTICE
+++ b/NOTICE
@@ -146,6 +146,9 @@ CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/), via Wikimedia Commons:
- iraqi_exodus.jpg: Benno Rothenberg / Meitar Collection / National Library of Israel / The Pritzker Family National
Photography Collection, CC BY 4.0, graded and cropped.
https://commons.wikimedia.org/wiki/File:Aliyah_(997008136551705171).jpg
+- first_new_yishuv.jpg: Boris Carmi / Meitar Collection / National Library of Israel / The Pritzker Family National
+ Photography Collection, CC BY 4.0, graded and cropped.
+ https://commons.wikimedia.org/wiki/File:Mefalsim_(997009452698205171.jpg
Public domain or CC0 (credited as a courtesy):
- second_truce.jpg: Ben Merk / Anefo, Nationaal Archief (Anefo 934-6899) · CC0 · graded and cropped.
https://commons.wikimedia.org/wiki/File:Graaf_Bernadotte_op_Schiphol,_Bestanddeelnr_934-6899.jpg
diff --git a/README.he.md b/README.he.md
index 0ec7ac451..451f69adb 100644
--- a/README.he.md
+++ b/README.he.md
@@ -85,7 +85,7 @@ flowchart RL
| שלב | מה הוא מוסיף | מצב | Issue |
|---|---|---|---|
| 0 | החלטות הבעלים בסעיפים הפתוחים ב־GDD | בתהליך: ההחלטות של שלב 1 התקבלו | [#375](https://github.com/eyalgolan/statecraft-israel/issues/375) |
-| 1 | פרוסה ראשונה מאחורי מתג: עיר אחת (תל אביב), אימון, יישוב חדש אחד וכרטיס יעד אחד | בתהליך: 6 מתוך 8 PRs מוזגו | [#374](https://github.com/eyalgolan/statecraft-israel/issues/374) |
+| 1 | פרוסה ראשונה מאחורי מתג: עיר אחת (תל אביב), אימון, יישוב חדש אחד וכרטיס יעד אחד | בתהליך: 7 מתוך 8 PRs מוזגו | [#374](https://github.com/eyalgolan/statecraft-israel/issues/374) |
| 2 | תורות חודשיים במשחק האמיתי, וחמשת המשאבים | בתהליך: התורות החודשיים והכסף הושלמו | [#382](https://github.com/eyalgolan/statecraft-israel/issues/382) |
| 3 | כל הערים, עם דיור, תעסוקה וקליטת עלייה | בהמשך | [#383](https://github.com/eyalgolan/statecraft-israel/issues/383) |
| 4 | חלוצים, אתרי בנייה, כבישים ומסילות ברזל | בהמשך | [#384](https://github.com/eyalgolan/statecraft-israel/issues/384) |
diff --git a/README.md b/README.md
index 5a593250f..ae78491f4 100644
--- a/README.md
+++ b/README.md
@@ -104,7 +104,7 @@ flowchart LR
| Phase | What it adds | Status | Issue |
|---|---|---|---|
| 0 | Owner decisions on the open GDD items | In progress: the Phase 1 decisions are made | [#375](https://github.com/eyalgolan/statecraft-israel/issues/375) |
-| 1 | A first slice behind a switch: one city (Tel Aviv), training, one new settlement and one objective card | In progress: 6 of 8 PRs merged | [#374](https://github.com/eyalgolan/statecraft-israel/issues/374) |
+| 1 | A first slice behind a switch: one city (Tel Aviv), training, one new settlement and one objective card | In progress: 7 of 8 PRs merged | [#374](https://github.com/eyalgolan/statecraft-israel/issues/374) |
| 2 | Monthly turns for the real game, and the five resources | In progress: monthly turns and Money are done | [#382](https://github.com/eyalgolan/statecraft-israel/issues/382) |
| 3 | Every city, with housing, jobs and immigrant absorption | Later | [#383](https://github.com/eyalgolan/statecraft-israel/issues/383) |
| 4 | Pioneers, building sites, roads and railways | Later | [#384](https://github.com/eyalgolan/statecraft-israel/issues/384) |
diff --git a/docs/event-images.md b/docs/event-images.md
index fd66198a8..329938a60 100644
--- a/docs/event-images.md
+++ b/docs/event-images.md
@@ -1,12 +1,11 @@
# Event-card photographs
The event card's header picture, as in the promo (`promo/final/03-gameplay-1936.png`, `05-event-transit-camps.png`), is a
-real archival photograph of the event, never an AI image. 24 of the 32 events in `content/events/` have one. Seven
+real archival photograph of the event, never an AI image. 25 of the 32 events in `content/events/` have one. Seven
others show the responsible minister's portrait in the card's head, as before: `rhodes_talks`, `armistice_lebanon`,
`armistice_syria`, `sinai_withdrawal`, `education_registration_1951`, `reparations_claim` and `forex_crisis_1951`. No
-free photograph that fits them was found (for `sinai_withdrawal`, see the decisions below). The eighth, the GDD objective
-card `first_new_yishuv`, has no `office`, so it shows no picture at all until its photograph (Boris Carmi, June 1949, CC BY
-4.0) comes in GDD Phase 1 PR 7 (#380).
+free photograph that fits them was found (for `sinai_withdrawal`, see the decisions below). The GDD objective card
+`first_new_yishuv` shows Mefalsim's first days (Boris Carmi, June 1949, CC BY 4.0; #380).
Owner ruling 2026-10-11 (summarised; recorded in `docs/CONTENT_POLICY.md` section 4):
- Images of real people stay public domain or CC0, with one narrow exception: archival event photographs (not
diff --git a/docs/gdd/one-city.md b/docs/gdd/one-city.md
index a4ffe9266..59437c836 100644
--- a/docs/gdd/one-city.md
+++ b/docs/gdd/one-city.md
@@ -12,7 +12,7 @@ As a player of the MVP, I want to put Tel Aviv's people to work and house the im
- Production: each employed unit earns `income_per_job_per_year` IL millions a year, for the turn's share of a year (R-CITY-002).
- Arrivals: the CBS series in `content/aliyah.yaml` arrives as refugees in `arrivals_city`, in whole units, counted from the game's start so that no unit is lost or counted twice (R-CITY-003, D-A5 [S2]).
- Housing: refugees become civilians, without a job, up to the city's housing capacity. The cap is a placeholder while D-D1 is open (R-CITY-004).
-- Social cohesion: a share from 0% to 100%, the weighted housed share and employed share over all cities (R-CITY-005). It is a placeholder while D-C1 is open: no other system reads it and nothing shows it.
+- Social cohesion: a share from 0% to 100%, the weighted housed share and employed share over all cities (R-CITY-005). No other system reads it; the top bar shows it as a resource meter, in the GDD loop only (the owner's ruling of 15 October 2026 [S4]).
## Data touched
@@ -36,6 +36,7 @@ As a player of the MVP, I want to put Tel Aviv's people to work and house the im
- [S1] The game design of record, docs/GDD.md
- [S2] GDD v0.1 impact analysis and phased plan, section 5, docs/superpowers/specs/2026-10-12-gdd-v0.1-impact-and-plan.md
- [S3] GDD Phase 1 implementation plan, PR 3, docs/superpowers/plans/2026-10-12-gdd-phase-1.md
+- [S4] The owner's ruling on showing Social cohesion, 15 October 2026, https://github.com/eyalgolan/statecraft-israel/issues/380, checked 2026-10-16
## Open questions
diff --git a/sim/Statecraft.Sim.Tests/CitiesTests.cs b/sim/Statecraft.Sim.Tests/CitiesTests.cs
index d00b35ede..e9935f410 100644
--- a/sim/Statecraft.Sim.Tests/CitiesTests.cs
+++ b/sim/Statecraft.Sim.Tests/CitiesTests.cs
@@ -200,9 +200,9 @@ public class CitiesTests
Assert.Equal(0.8 * 0.6 + 0.2 * 0.5, after.Cohesion, 12);
}
- /// <summary>Social cohesion is a labelled placeholder while D-C1 is open (an owner question on #375): no effect, morale,
- /// threshold or display reads it. Two states that differ only in it step to the same state, and no code outside the
- /// city rules and the state names it.</summary>
+ /// <summary>Social cohesion is a labelled placeholder while D-C1 is open (an owner question on #375): no effect, morale or
+ /// threshold reads it, and only the top bar displays it (#380). Two states that differ only in it step to the same state,
+ /// and no code outside the city rules, the state and the top bar names it.</summary>
// R-CITY-005
[Fact]
public void CohesionFeedsNothingElse()
@@ -219,7 +219,9 @@ public class CitiesTests
.SelectMany(d => System.IO.Directory.GetFiles(d, "*.cs", System.IO.SearchOption.AllDirectories))
.Where(f => System.Text.RegularExpressions.Regex.IsMatch(System.IO.File.ReadAllText(f), @"\bCohesion\b"))
.Select(f => System.IO.Path.GetFileName(f)).OrderBy(f => f, StringComparer.Ordinal);
- Assert.Equal(new[] { "Cities.cs", "GameState.cs" }, readers);
+ // The top bar shows it (the owner's ruling of 15 October 2026, #380): the HUD's model, presenter and tests read it to
+ // display it, and nothing else in Unity or the sim does.
+ Assert.Equal(new[] { "Cities.cs", "GameState.cs", "HudModel.cs", "HudPresenter.cs", "HudTests.cs" }, readers);
}
[Fact]
diff --git a/sim/Statecraft.Sim/GameState.cs b/sim/Statecraft.Sim/GameState.cs
index a871cd068..744014930 100644
--- a/sim/Statecraft.Sim/GameState.cs
+++ b/sim/Statecraft.Sim/GameState.cs
@@ -61,7 +61,7 @@ namespace Statecraft.Sim
/// <summary>The cities by id (ordinal).</summary>
public SortedDictionary<string, City> Cities = new SortedDictionary<string, City>(StringComparer.Ordinal);
/// <summary>Social cohesion, 0 to 1, from the cities' housing and jobs (R-CITY-005). A placeholder while D-C1 is open:
- /// no other system reads it and nothing shows it. Hashed only when the state has cities.</summary>
+ /// no other system reads it, and only the top bar shows it (#380). Hashed only when the state has cities.</summary>
public double Cohesion;
/// <summary>The movable units by id.</summary>
public SortedList<int, Unit> Units = new SortedList<int, Unit>();
diff --git a/tools/tests/test_event_images.py b/tools/tests/test_event_images.py
index 55924409b..e23613c11 100644
--- a/tools/tests/test_event_images.py
+++ b/tools/tests/test_event_images.py
@@ -98,7 +98,7 @@ def test_a_download_with_the_wrong_sha1_is_refused(tmp_path, capsys, as_isolated
def test_every_row_has_a_shipped_file_and_a_crop():
rows = ei.load_rows()
- assert len(rows) == 24
+ assert len(rows) == 25 # first_new_yishuv, the objective card (#380)
for r in rows:
assert (ei.FOLDER / r["file"]).is_file()
assert len(r["crop"]) == 3 and len(r["sha1"]) == 40
diff --git a/unity/Assets/Resources/EventImageCatalog.asset b/unity/Assets/Resources/EventImageCatalog.asset
index 719274632..35fc09500 100644
--- a/unity/Assets/Resources/EventImageCatalog.asset
+++ b/unity/Assets/Resources/EventImageCatalog.asset
@@ -75,6 +75,14 @@ MonoBehaviour:
and cropped"
sensitive: 0
sensitivityReviewed: 0
+ - eventId: first_new_yishuv
+ image: {fileID: 2800000, guid: 8622975d7ac09487890f20fcc50bc45f, type: 3}
+ alt: Two men put up a barbed-wire fence on open ground in the first days of Kibbutz
+ Mefalsim, June 1949.
+ credit: "Boris Carmi / Meitar Collection / National Library of Israel / The Pritzker
+ Family National Photography Collection \xB7 CC BY 4.0 \xB7 graded and cropped"
+ sensitive: 0
+ sensitivityReviewed: 0
- eventId: first_truce
image: {fileID: 2800000, guid: e52b94b9d64f24bafa07294fd5068c17, type: 3}
alt: A quiet, tree-lined street in Jerusalem during a pause in the fighting,
diff --git a/unity/Assets/Scripts/UI/EventCardPresenter.cs b/unity/Assets/Scripts/UI/EventCardPresenter.cs
index efca83824..1ff7c21ac 100644
--- a/unity/Assets/Scripts/UI/EventCardPresenter.cs
+++ b/unity/Assets/Scripts/UI/EventCardPresenter.cs
@@ -219,6 +219,9 @@ namespace Statecraft.Game.UI
card.Q<Label>("event-title").text = Cabinet.Fill(c, s, e.Title, date);
card.Q<Label>("event-office").text = holder == null ? "" : text.Format("event.office", c.Offices.First(o => o.Id == e.Office).Title, holder.Name);
card.Q<Label>("event-text").text = EventSystem.Render(c, s, e);
+ var objective = card.Q<Label>("event-objective"); // an objective card's line (#380); none on any other card
+ objective.text = ObjectiveLine(c, s, e, text);
+ objective.style.display = objective.text.Length == 0 ? DisplayStyle.None : DisplayStyle.Flex;
var options = card.Q<VisualElement>("event-options");
options.Clear();
foreach (var o in e.Options)
@@ -233,6 +236,25 @@ namespace Statecraft.Game.UI
if (shown && focusedFor != e.Id) FocusCard(e.Id, force: false);
}
+ /// <summary>An objective card's line under its text (#380; the owner's wording, #379): completed early, "Completed on
+ /// {date}; historically {date}; n months early."; in the same calendar month, "Completed on time, as in history.";
+ /// later, "Completed n months later than in history.". The dates are the recorded completion (GameState.Objectives)
+ /// and the objective's reference date, in the UI's language; the months are Objectives.MonthsFromHistory. Empty for
+ /// an event that is not an objective's card, or whose objective is not recorded (the card fires only once it is,
+ /// R-OBJ-003).</summary>
+ public static string ObjectiveLine(Content c, GameState s, GameEvent e, UiText t)
+ {
+ if (e.Objective.Length == 0 || !s.Objectives.TryGetValue(e.Objective, out var done)) return "";
+ var o = c.Objectives.First(x => x.Id == e.Objective); // the loader checks the event names an objective
+ string Date(System.DateTime d) => t.Format("date.day_month_year", d.Day, t["date.month_" + d.Month], d.Year);
+ var months = Objectives.MonthsFromHistory(done, o.ReferenceDate);
+ if (months == 0) return t["event.objective_on_time"];
+ if (months < 0) return months == -1 ? t["event.objective_late_one"] : t.Format("event.objective_late", -months);
+ var early = Objectives.MonthsEarly(done, o.ReferenceDate);
+ return early == 1 ? t.Format("event.objective_early_one", Date(done), Date(o.ReferenceDate))
+ : t.Format("event.objective_early", Date(done), Date(o.ReferenceDate), early);
+ }
+
/// <summary>A newly shown event puts the keyboard focus on the card (keyboard play, #41): the next Tab reaches its
/// first option, and no option is lit before the player picks. Not while the layer is out of reach (the start screen
/// or a screen covers it): then nothing is recorded, and the card takes the focus when the cover closes
diff --git a/unity/Assets/Scripts/UI/HudModel.cs b/unity/Assets/Scripts/UI/HudModel.cs
index cec31f0a4..52f469b68 100644
--- a/unity/Assets/Scripts/UI/HudModel.cs
+++ b/unity/Assets/Scripts/UI/HudModel.cs
@@ -23,6 +23,10 @@ namespace Statecraft.Game.UI
{
public string Year = "", Turn = "", Date = "", Attention = "", SecurityLevel = "", Score = "";
public Meter Treasury, Immigration, Security, Support, Standing, Fx;
+ /// <summary>Social cohesion (GameState.Cohesion, R-CITY-005) on the 0-100 scale, shown only in the GDD loop
+ /// (ShowsCohesion; the owner's ruling of 15 October 2026, #380). Empty in the legacy loop.</summary>
+ public Meter Cohesion = new Meter("", "", 0, "", "");
+ public bool ShowsCohesion;
static double Arrivals(StepResult? r) => r == null ? 0 : r.Why.Where(w => w.System == "population").Sum(w => w.Delta);
@@ -85,6 +89,8 @@ namespace Statecraft.Game.UI
Support = Points(EffectsSystem.Approval(c, s), prev == null ? (double?)null : EffectsSystem.Approval(c, prev)),
Standing = Points(s.Indicators["intl_standing"], prev?.Indicators["intl_standing"]),
Fx = Money("fx_reserves", s.FxReserves, prev?.FxReserves),
+ ShowsCohesion = c.IsGdd,
+ Cohesion = c.IsGdd ? Points(s.Cohesion, prev?.Cohesion) : new Meter("", "", 0, "", ""),
};
}
}
diff --git a/unity/Assets/Scripts/UI/HudPresenter.cs b/unity/Assets/Scripts/UI/HudPresenter.cs
index 43218bd50..bb19d546e 100644
--- a/unity/Assets/Scripts/UI/HudPresenter.cs
+++ b/unity/Assets/Scripts/UI/HudPresenter.cs
@@ -18,31 +18,36 @@ namespace Statecraft.Game.UI
// Three tiers by the bar's logical width (1080p reference, match 0.5: the panel's scale is the plain mean of the two
// ratios, (w/1920 + h/1080) / 2, so logical width = w / that; TopBarTests logs it). HUD round 2 moved the four screen
- // buttons to the left column (#602), about 248 px out of the bar, so every tier starts narrower (part 3). The one-row
- // edge sits between a fullscreen 5:4 and 4:3 (review of #624): the first run found the one-row bar wrapping two
- // captions with the widest values at 1563-1612; TopBarTests holds one row at 1642 and the stacked bar at 1635:
- // 16:9 1920, 16:10 ~1819, 4:3 ~1646 | NarrowBelowPx 1640 | 5:4 ~1585 | CompactBelowPx 1452 | square ~1382
- // | TwoRowBelowPx 1370 | half a 1080p screen (960x1080) ~1280.
+ // buttons to the left column (#602), about 248 px out of the bar, so every tier starts narrower (part 3). With six
+ // meters the one-row edge sat between a fullscreen 5:4 and 4:3 (1640; review of #624).
+ // Social cohesion made seven meters (#380). The owner chose "tighten and re-tier" (16 October 2026): the meters' padding
+ // is about 6 px narrower, and the edges move to the seven meters' measured widths (widest values, the Hebrew bar the
+ // widest: one row about 1285 px of meters, stacked about 1055, without icons about 811, each with 5% to spare, beside
+ // about 484 px of plate, turn box and padding). 16:9 at 1920 keeps the one-row bar; 16:10, 4:3, and 1280x720 and
+ // 1366x768 (where the text floor raises the captions) take the stacked bar; 5:4 drops the icons; a square window
+ // takes two rows; a phone's meters wrap to two lines. TopBarTests holds one row at 1865 and the stacked bar at 1855:
+ // 21:9 ~2217 | 16:9 1920 | NarrowBelowPx 1860 | 16:10 ~1819 | 4:3 ~1646 | CompactBelowPx 1640 | 5:4 ~1585
+ // | TwoRowBelowPx 1400 | square ~1382 | half a 1080p screen (960x1080) ~1280.
// PromoHudTests.EveryWindowShapeFitsTheBarAfterATurn proves each tier holds the widest late-game values and changes.
/// <summary>Below this width the HUD's root gets NarrowClass: a taller bar (124 px) whose meters stack the change under
/// the value, and the panels below it move down to match (Statecraft.uss .hud-narrow). Above it, the 70 px one-row bar
- /// (promo 03's 6.5%) holds six values and their changes side by side with the icons.</summary>
- public const float NarrowBelowPx = 1640f;
+ /// (promo 03's 6.5%) holds seven values and their changes side by side with the icons.</summary>
+ public const float NarrowBelowPx = 1860f;
public const string NarrowClass = "hud-narrow";
/// <summary>Below this width the meters also drop their icons (Statecraft.uss .top-bar--compact): a square window does not
/// have the room for them on the stacked bar.</summary>
- public const float CompactBelowPx = 1452f;
+ public const float CompactBelowPx = 1640f;
public const string CompactClass = "top-bar--compact";
/// <summary>Below this width (windows narrower than about square, e.g. a browser snapped to half a 1080p screen, about
- /// 1360 logical px) one row cannot hold the badge, six meters, New Game and End Turn: the root also gets
+ /// 1360 logical px, and a square one, about 1382) one row cannot hold the badge, seven meters, New Game and End Turn: the root also gets
/// TwoRowClass, and the bar wraps into two rows, the date and the meters above, the screen buttons and End Turn
/// below (Statecraft.uss .hud-two-row).</summary>
- public const float TwoRowBelowPx = 1370f;
+ public const float TwoRowBelowPx = 1400f;
public const string TwoRowClass = "hud-two-row";
- /// <summary>Below this width (a phone held upright: 390x844 is about 790 logical px) the badge and six meters do not
- /// fit one row either: the root also gets ThreeRowClass, and the bar takes three rows, the badge, the meters, then the
- /// screen buttons and End Turn (Statecraft.uss .hud-three-row; #210).</summary>
+ /// <summary>Below this width (a phone held upright: 390x844 is about 790 logical px) the badge and the meters do not
+ /// fit one row either: the root also gets ThreeRowClass, and the bar takes three rows, the badge, the meters (seven,
+ /// wrapped to two lines, #380), then the screen buttons and End Turn (Statecraft.uss .hud-three-row; #210).</summary>
public const float ThreeRowBelowPx = 1100f;
public const string ThreeRowClass = "hud-three-row";
/// <summary>On the one-row bar, when the meters leave enough room, the bar gets RoomyClass: promo-sized icons (38 px)
@@ -54,9 +59,10 @@ namespace Statecraft.Game.UI
/// editor's; PromoHudTests.EveryWindowShapeFitsTheBarAfterATurn asserts it).</summary>
public const float SpareShare = 0.05f;
- /// <summary>The meters' predicted growth when roomy: six icons 30 -> 38 px, values 22 -> 25 px (about 14% wider), and
- /// each wrapped caption back to its one-line width (<paramref name="captionGrowth"/>).</summary>
- public static float RoomyGrowth(float valueWidths, float captionGrowth = 0f) => 6 * 8f + 0.14f * valueWidths + captionGrowth;
+ /// <summary>The meters' predicted growth when roomy: each of the <paramref name="icons"/> shown icons 30 -> 38 px (six,
+ /// or seven with Social cohesion in the GDD loop), values 22 -> 25 px (about 14% wider), and each wrapped caption back
+ /// to its one-line width (<paramref name="captionGrowth"/>).</summary>
+ public static float RoomyGrowth(float valueWidths, float captionGrowth = 0f, int icons = 6) => icons * 8f + 0.14f * valueWidths + captionGrowth;
/// <summary>The top bar's static texts and their strings (#193): the screen buttons, New Game and End Turn. The
/// meters' captions are hud.caption.*, the same words their tooltips say.</summary>
@@ -127,7 +133,7 @@ namespace Statecraft.Game.UI
if (root.Q<Label>(HoverTip.TipName) != null)
barTips = new HoverTip(root, new[] { newGame }, () => hudRoot.ClassListContains(UiLanguage.HebrewClass) ? HoverTip.Side.Right : HoverTip.Side.Left);
}
- foreach (var id in new[] { "treasury", "immigration", "security", "support", "standing", "fx" })
+ foreach (var id in new[] { "treasury", "immigration", "security", "support", "cohesion", "standing", "fx" })
{
var meter = root.Q<VisualElement>("meter-" + id); var caption = text["hud.caption." + id];
meter.Q<Label>(className: "meter-name").text = caption; // the bar shows the words its tooltip says
@@ -178,6 +184,7 @@ namespace Statecraft.Game.UI
/// <summary>Roomy only on the one-row bar with icons; see RoomyClass.</summary>
void UpdateRoomy()
{
+ var meters = this.meters.Where(m => m.resolvedStyle.display != DisplayStyle.None).ToList(); // a hidden meter takes no room
if (meters.Count == 0) return;
var oneRow = !hudRoot.ClassListContains(NarrowClass) && !bar.ClassListContains(CompactClass);
// Panel coordinates (logical px), so the meters and the screen buttons compare directly.
@@ -198,7 +205,7 @@ namespace Statecraft.Game.UI
var oneLine = c.MeasureTextSize(c.text, 0, VisualElement.MeasureMode.Undefined, 0, VisualElement.MeasureMode.Undefined).x;
return UnityEngine.Mathf.Max(0f, oneLine - c.worldBound.width);
});
- if (spare - RoomyGrowth(values, captions) >= SpareShare * used + 8f) bar.AddToClassList(RoomyClass);
+ if (spare - RoomyGrowth(values, captions, meters.Count) >= SpareShare * used + 8f) bar.AddToClassList(RoomyClass);
}
}
@@ -348,6 +355,9 @@ namespace Statecraft.Game.UI
score.style.display = m.Score.Length == 0 ? DisplayStyle.None : DisplayStyle.Flex;
Set("treasury", m.Treasury); Set("immigration", m.Immigration); Set("security", m.Security);
Set("support", m.Support); Set("standing", m.Standing); Set("fx", m.Fx);
+ // Social cohesion: the GDD loop only (#380), as the score; a hidden meter takes no room in the bar.
+ Set("cohesion", m.Cohesion);
+ said["cohesion"].element.style.display = m.ShowsCohesion ? DisplayStyle.Flex : DisplayStyle.None;
root.Q<Button>("end-turn").SetEnabled(bridge.State.GameOver == null);
}
}
diff --git a/unity/Assets/Scripts/UI/UiIcon.cs b/unity/Assets/Scripts/UI/UiIcon.cs
index e65c52add..f4f17428d 100644
--- a/unity/Assets/Scripts/UI/UiIcon.cs
+++ b/unity/Assets/Scripts/UI/UiIcon.cs
@@ -8,7 +8,7 @@ namespace Statecraft.Game.UI
{
/// <summary>A small vector icon drawn with Painter2D (no image asset), in the promo's style (promo/final/03): a gold coin
/// for the Treasury, figures for Immigration and Public Support, a blue shield for Security, a globe for International
- /// Standing, a banknote for Foreign Currency, gold line icons for the screen buttons, and a terrain sign per biome. Each
+ /// Standing, a banknote for Foreign Currency, two linked rings for Social cohesion, gold line icons for the screen buttons, and a terrain sign per biome. Each
/// glyph is drawn in a 24 x 24 design box, scaled to the element's content box and centred in it. In UXML:
/// <c>&lt;Statecraft.Game.UI.UiIcon glyph="coin" /&gt;</c>. An unknown glyph draws nothing.</summary>
[UxmlElement]
@@ -40,7 +40,7 @@ namespace Statecraft.Game.UI
static readonly Dictionary<string, Painter> Painters = new Dictionary<string, Painter>
{
- ["coin"] = Coin, ["people"] = People, ["crowd"] = Crowd, ["shield"] = Shield, ["globe"] = Globe, ["banknote"] = Banknote,
+ ["coin"] = Coin, ["people"] = People, ["crowd"] = Crowd, ["shield"] = Shield, ["globe"] = Globe, ["banknote"] = Banknote, ["rings"] = Rings,
["columns"] = Columns, ["scales"] = Scales, ["helmet"] = Helmet, ["question"] = Question, ["restart"] = Restart, ["gear"] = Gear,
["chevron"] = Chevron, ["chevron-back"] = ChevronBack, ["hourglass"] = Hourglass,
["region"] = Region, ["house"] = House, ["village"] = Village, ["flag"] = Flag,
@@ -177,6 +177,18 @@ namespace Statecraft.Game.UI
p.BeginPath(); p.MoveTo(at(4.4f, 16.6f)); p.LineTo(at(19.6f, 16.6f)); p.Stroke();
}
+ /// <summary>Social cohesion (#380): two linked gold rings, each drawn over a dark edge so it reads on the bar.</summary>
+ static void Rings(Painter2D p, Func<float, float, Vector2> at, float s, Color gold)
+ {
+ foreach (var (x, colour) in new[] { (8.6f, GoldBase), (15.4f, GoldLight) })
+ {
+ p.strokeColor = GoldDark; p.lineWidth = 3.4f * s;
+ Circle(p, at(x, 12), 5.8f * s); p.Stroke();
+ p.strokeColor = colour; p.lineWidth = 2f * s;
+ Circle(p, at(x, 12), 5.8f * s); p.Stroke();
+ }
+ }
+
static void Banknote(Painter2D p, Func<float, float, Vector2> at, float s, Color gold)
{
p.fillColor = new Color32(84, 120, 82, 255); p.strokeColor = SageLight; p.lineWidth = 0.9f * s;
diff --git a/unity/Assets/Tests/EditMode/ArmisticeTests.cs b/unity/Assets/Tests/EditMode/ArmisticeTests.cs
index ab1230365..006920e28 100644
--- a/unity/Assets/Tests/EditMode/ArmisticeTests.cs
+++ b/unity/Assets/Tests/EditMode/ArmisticeTests.cs
@@ -287,8 +287,19 @@ public class ArmisticeTests
var c = Inputs.Content; var t = Text;
var text = L(Regions(), new DateTime(1950, 3, 1));
StringAssert.Contains("Jordan (low accuracy)", text);
- foreach (var (w, h) in new[] { (1920, 1080), (1280, 720), (1531, 784), (1366, 657), (2560, 1080), (1920, 900), (1280, 1024),
- (960, 600), (1024, 768), (390, 844), (1600, 757) })
+ // Each window with the longest text without a picture; the two-row shapes also with the longest text that has its
+ // photograph (the tallest card a player meets: review B1 of #831 saw it cover the label at 1024x1024 where the first
+ // did not). On main the photo card already touches the label at some one-row and stacked windows (1920x1080,
+ // 1680x1050, 1280x720, 1280x1024; noted in #831's review): a follow-up, so those are not pinned here.
+ var catalog = AssetDatabase.LoadAssetAtPath<EventImageCatalog>("Assets/Resources/EventImageCatalog.asset");
+ Assert.IsNotNull(catalog, "precondition: the photo catalog");
+ var pictured = new System.Collections.Generic.HashSet<string>(catalog.entries.Where(x => x.image != null).Select(x => x.eventId));
+ foreach (var (w, h, photo) in new[] { (1920, 1080), (1280, 720), (1531, 784), (1366, 657), (2560, 1080), (1920, 900), (1280, 1024),
+ (960, 600), (1024, 768), (390, 844), (1600, 757),
+ // the two-row bar's shapes (#380's re-tier gives a square window two rows; review B1 of #831)
+ (1024, 1024), (960, 1080), (800, 1000) }
+ .Select(x => (x.Item1, x.Item2, false))
+ .Concat(new[] { (1024, 1024, true), (960, 1080, true), (800, 1000, true) }))
{
var rt = new RenderTexture(w, h, 0);
var ps = Object.Instantiate(AssetDatabase.LoadAssetAtPath<PanelSettings>(UiPaths.Panel));
@@ -300,11 +311,11 @@ public class ArmisticeTests
var root = doc.rootVisualElement;
var bridge = new SimBridge(GameSession.New(c, GoldenRun.Seed, Mode.Historical), t);
var hud = new HudPresenter(root, bridge, t);
- var card = new EventCardPresenter(root, bridge, t, null, null);
+ var card = new EventCardPresenter(root, bridge, t, null, photo ? catalog : null);
try
{
var g = GameSession.New(c, GoldenRun.Seed, Mode.Historical);
- var e = c.Events.OrderByDescending(x => x.Text.Length).First(); // the longest text: the tallest card without a picture
+ var e = c.Events.Where(x => !photo || pictured.Contains(x.Id)).OrderByDescending(x => x.Text.Length).First();
g.State.Date = e.From; g.State.PendingEvents.Clear(); g.State.PendingEvents.Add(e.Id);
bridge.Replace(g);
var label = root.Q<Label>("map-layer");
@@ -314,16 +325,16 @@ public class ArmisticeTests
var lb = label.worldBound;
var screen = root.worldBound;
Assert.IsTrue(lb.xMin >= screen.xMin - 0.5f && lb.xMax <= screen.xMax + 0.5f && lb.yMin >= screen.yMin - 0.5f && lb.yMax <= screen.yMax + 0.5f,
- $"{w}x{h}: the label {lb} leaves the screen {screen}");
- Assert.IsFalse(lb.Overlaps(R("minimap")), $"{w}x{h}: the label {lb} overlaps the minimap {R("minimap")}");
- Assert.IsFalse(lb.Overlaps(R("event-card")), $"{w}x{h}: the event card {R("event-card")} overlaps the label {lb}");
+ $"{w}x{h}{(photo ? " (photo card)" : "")}: the label {lb} leaves the screen {screen}");
+ Assert.IsFalse(lb.Overlaps(R("minimap")), $"{w}x{h}{(photo ? " (photo card)" : "")}: the label {lb} overlaps the minimap {R("minimap")}");
+ Assert.IsFalse(lb.Overlaps(R("event-card")), $"{w}x{h}{(photo ? " (photo card)" : "")}: the event card {R("event-card")} overlaps the label {lb}");
if (root.Q("info-panel").resolvedStyle.display == DisplayStyle.Flex)
- Assert.IsFalse(lb.Overlaps(R("info-panel")), $"{w}x{h}: the info panel {R("info-panel")} overlaps the label {lb}");
- Assert.IsFalse(lb.Overlaps(R("top-bar")), $"{w}x{h}: the top bar overlaps the label");
+ Assert.IsFalse(lb.Overlaps(R("info-panel")), $"{w}x{h}{(photo ? " (photo card)" : "")}: the info panel {R("info-panel")} overlaps the label {lb}");
+ Assert.IsFalse(lb.Overlaps(R("top-bar")), $"{w}x{h}{(photo ? " (photo card)" : "")}: the top bar overlaps the label");
var size = label.MeasureTextSize(text, lb.width - label.resolvedStyle.paddingLeft - label.resolvedStyle.paddingRight,
VisualElement.MeasureMode.Exactly, 0, VisualElement.MeasureMode.Undefined);
- Assert.LessOrEqual(size.y, lb.height + 1f, $"{w}x{h}: the label's text is cut off");
- Assert.LessOrEqual(size.y, 4 * label.resolvedStyle.fontSize * 1.4f, $"{w}x{h}: the label takes more than four lines ({size.y} px)");
+ Assert.LessOrEqual(size.y, lb.height + 1f, $"{w}x{h}{(photo ? " (photo card)" : "")}: the label's text is cut off");
+ Assert.LessOrEqual(size.y, 4 * label.resolvedStyle.fontSize * 1.4f, $"{w}x{h}{(photo ? " (photo card)" : "")}: the label takes more than four lines ({size.y} px)");
}
finally { card.Dispose(); hud.Dispose(); Object.DestroyImmediate(go); Object.DestroyImmediate(ps); rt.Release(); Object.DestroyImmediate(rt); }
}
diff --git a/unity/Assets/Tests/EditMode/BuildGateTests.cs b/unity/Assets/Tests/EditMode/BuildGateTests.cs
index 61f02f03b..29a7c7e6c 100644
--- a/unity/Assets/Tests/EditMode/BuildGateTests.cs
+++ b/unity/Assets/Tests/EditMode/BuildGateTests.cs
@@ -192,7 +192,7 @@ public class BuildGateTests
StringAssert.IsMatch("\"shareable\":\\s*false", dev);
foreach (var id in SensitivePhotos)
StringAssert.IsMatch($"\"event_id\":\\s*\"{id}\",\\s*\"sensitive\":\\s*true,\\s*\"sensitivity_reviewed\":\\s*true", dev);
- Assert.AreEqual(24, System.Text.RegularExpressions.Regex.Matches(dev, "\"event_id\"").Count);
+ Assert.AreEqual(25, System.Text.RegularExpressions.Regex.Matches(dev, "\"event_id\"").Count); // first_new_yishuv came with #380
StringAssert.IsMatch("\"shareable\":\\s*true", (string)json.Invoke(null, new object?[] { photos, true })!);
StringAssert.IsMatch("\"photos\":\\s*\\[\\s*\\]", (string)json.Invoke(null, new object?[] { null, true })!);
}
diff --git a/unity/Assets/Tests/EditMode/DecisionCardTests.cs b/unity/Assets/Tests/EditMode/DecisionCardTests.cs
index 471da27ca..5a5690ab9 100644
--- a/unity/Assets/Tests/EditMode/DecisionCardTests.cs
+++ b/unity/Assets/Tests/EditMode/DecisionCardTests.cs
@@ -86,6 +86,23 @@ public class DecisionCardTests
static readonly (int w, int h)[] Tiers = { (1920, 1080), (960, 1080) };
+ /// <summary>#380: the taller two- and three-row bars raise the centred card (the event layer keeps room at its bottom), and
+ /// the backdrop must still reach the window's bottom and right edges, so no strip of map stays live under an open card.</summary>
+ [UnityTest]
+ public IEnumerator TheBackdropReachesTheWindowsEdgesAtEveryTier()
+ {
+ foreach (var (w, h) in new[] { (1920, 1080), (1280, 1024), (1024, 1024), (960, 1080), (800, 1000), (390, 844) })
+ {
+ using var r = new Rig(w, h, "law_of_return");
+ yield return Frames(4);
+ var where = $"{w}x{h}";
+ Assert.IsTrue(r.Shows("event-scrim"), $"{where}: the backdrop shows");
+ var screen = r.Root.worldBound; var scrim = r.Root.Q("event-scrim").worldBound;
+ Assert.GreaterOrEqual(scrim.yMax, screen.yMax - 0.5f, $"{where}: the backdrop {scrim} reaches the window's bottom {screen.yMax}");
+ Assert.GreaterOrEqual(scrim.xMax, screen.xMax - 0.5f, $"{where}: the backdrop {scrim} reaches the window's right edge {screen.xMax}");
+ }
+ }
+
[UnityTest]
public IEnumerator TheOpenCardTakesThePointerAndThePanelsUnderIt()
{
diff --git a/unity/Assets/Tests/EditMode/EventCardTests.cs b/unity/Assets/Tests/EditMode/EventCardTests.cs
index 893299c59..4d07ff73b 100644
--- a/unity/Assets/Tests/EditMode/EventCardTests.cs
+++ b/unity/Assets/Tests/EditMode/EventCardTests.cs
@@ -276,4 +276,95 @@ public class EventCardTests
card.Dispose();
}
}
+
+ // ---- The objective card (#380): its line and its photograph ----
+
+ static UiText He => UiText.Parse(AssetDatabase.LoadAssetAtPath<TextAsset>(UiPaths.StringsHebrew).text, "strings.he.yaml");
+
+ /// <summary>The first new yishuv's card, recorded as completed on <paramref name="done"/> (R-OBJ-001), pending.</summary>
+ static SimBridge ObjectiveDone(System.DateTime done, UiText text)
+ {
+ var g = GameSession.New(C, GoldenRun.Seed, Mode.Historical);
+ g.State.Date = done;
+ g.State.Objectives["first_new_yishuv"] = done;
+ g.State.PendingEvents.Clear(); g.State.PendingEvents.Add("first_new_yishuv");
+ return new SimBridge(g, text);
+ }
+
+ /// <summary>The objective card's line under its text, in the owner's wording (#379, 14 October 2026), against Mefalsim's
+ /// reference date of 12 June 1949 (objectives.yaml), by calendar months (Objectives.MonthsFromHistory): early with both
+ /// dates and the months, on time in the same month, later with the months; one month in the singular.</summary>
+ [Test]
+ public void TheObjectiveCardSaysWhenItWasCompletedAgainstHistory()
+ {
+ Assert.AreEqual(new System.DateTime(1949, 6, 12), C.Objectives.Single(o => o.Id == "first_new_yishuv").ReferenceDate, "precondition");
+ foreach (var (done, line) in new[]
+ {
+ (new System.DateTime(1949, 3, 15), "Completed on 15 March 1949; historically 12 June 1949; 3 months early."),
+ (new System.DateTime(1949, 5, 31), "Completed on 31 May 1949; historically 12 June 1949; 1 month early."),
+ (new System.DateTime(1949, 6, 1), "Completed on time, as in history."),
+ (new System.DateTime(1949, 6, 30), "Completed on time, as in history."),
+ (new System.DateTime(1949, 7, 1), "Completed 1 month later than in history."),
+ (new System.DateTime(1950, 2, 15), "Completed 8 months later than in history."),
+ })
+ {
+ using var ui = new UiTestKit();
+ using var card = new EventCardPresenter(ui.Root, ObjectiveDone(done, Text), Text, null);
+ Assert.AreEqual("first_new_yishuv", card.Shown!.Id);
+ var label = ui.Q<Label>("event-objective");
+ Assert.AreEqual(line, label.text, done.ToString("yyyy-MM-dd"));
+ Assert.AreEqual(DisplayStyle.Flex, label.style.display.value, done.ToString("yyyy-MM-dd"));
+ }
+ }
+
+ /// <summary>The same line in Hebrew: Hebrew months (date.month_*), the values between left-to-right marks (#543).</summary>
+ [Test]
+ public void TheObjectiveCardsLineIsInHebrewInTheHebrewUi()
+ {
+ foreach (var (done, line) in new[]
+ {
+ (new System.DateTime(1949, 3, 15), "הושלם ב־15 במרץ 1949; בהיסטוריה ב־12 ביוני 1949; מוקדם ב־3 חודשים."),
+ (new System.DateTime(1949, 5, 31), "הושלם ב־31 במאי 1949; בהיסטוריה ב־12 ביוני 1949; מוקדם בחודש אחד."),
+ (new System.DateTime(1949, 6, 30), "הושלם בזמן, כמו בהיסטוריה."),
+ (new System.DateTime(1949, 7, 1), "הושלם באיחור של חודש אחד לעומת ההיסטוריה."),
+ (new System.DateTime(1950, 2, 15), "הושלם באיחור של 8 חודשים לעומת ההיסטוריה."),
+ })
+ {
+ using var ui = new UiTestKit();
+ using var card = new EventCardPresenter(ui.Root, ObjectiveDone(done, He), He, null);
+ var shown = ui.Q<Label>("event-objective").text;
+ Assert.AreEqual(line, shown.Replace("\u200E", ""), done.ToString("yyyy-MM-dd"));
+ Assert.IsFalse(System.Text.RegularExpressions.Regex.IsMatch(shown, "[A-Za-z]"), $"English in the Hebrew line: {shown}");
+ }
+ }
+
+ /// <summary>Every other card has no objective line, and takes no room for one.</summary>
+ [Test]
+ public void ACardThatIsNoObjectiveHasNoObjectiveLine()
+ {
+ using var ui = new UiTestKit();
+ using var card = new EventCardPresenter(ui.Root, AtArmistice(), Text, null);
+ Assert.AreEqual("armistice_egypt", card.Shown!.Id);
+ Assert.AreEqual("", ui.Q<Label>("event-objective").text);
+ Assert.AreEqual(DisplayStyle.None, ui.Q<Label>("event-objective").style.display.value);
+ }
+
+ /// <summary>The objective card shows Mefalsim's photograph (Boris Carmi, June 1949, CC BY 4.0) with its credit, in place
+ /// of a portrait (the event has no office).</summary>
+ [Test]
+ public void TheObjectiveCardShowsItsPhotographWithItsCredit()
+ {
+ using var ui = new UiTestKit();
+ var photos = AssetDatabase.LoadAssetAtPath<EventImageCatalog>(PhotosPath);
+ var entry = photos.Find("first_new_yishuv");
+ Assert.IsNotNull(entry, "the catalog has the card's photograph (EventImageImport.Run)");
+ using var card = new EventCardPresenter(ui.Root, ObjectiveDone(new System.DateTime(1949, 3, 15), Text), Text, null, photos);
+ var band = ui.Q<VisualElement>("event-photo");
+ Assert.AreEqual(entry!.Value.image, band.style.backgroundImage.value.texture);
+ Assert.AreEqual(DisplayStyle.Flex, band.style.display.value);
+ Assert.AreEqual(entry.Value.alt, card.PhotoAlt);
+ var credit = ui.Q<Label>("event-photo-credit").text;
+ StringAssert.StartsWith("Boris Carmi / Meitar Collection", credit);
+ StringAssert.EndsWith("CC BY 4.0 · graded and cropped", credit);
+ }
}
diff --git a/unity/Assets/Tests/EditMode/EventImageMappingTests.cs b/unity/Assets/Tests/EditMode/EventImageMappingTests.cs
index c4e048c3e..fcbbff44d 100644
--- a/unity/Assets/Tests/EditMode/EventImageMappingTests.cs
+++ b/unity/Assets/Tests/EditMode/EventImageMappingTests.cs
@@ -20,8 +20,10 @@ public class EventImageMappingTests
static IReadOnlyList<EventImageMapping.Row> Rows => EventImageMapping.Parse(File.ReadAllText(EventImageMapping.Path));
/// <summary>No free photograph was found for these (docs/event-images.md): they keep the minister's portrait plate.</summary>
- static readonly string[] Fallback = { "armistice_lebanon", "armistice_syria", "education_registration_1951", "forex_crisis_1951", "reparations_claim", "sinai_withdrawal", "rhodes_talks",
- "first_new_yishuv" }; // GDD Phase 1 PR 6: its photograph (Boris Carmi, June 1949, CC BY 4.0) arrives with PR 7 (#380)
+ static readonly string[] Fallback = { "armistice_lebanon", "armistice_syria", "education_registration_1951", "forex_crisis_1951", "reparations_claim", "sinai_withdrawal", "rhodes_talks" };
+ /// <summary>Photographs whose ASSETS.yaml row waits for the owner's sign-off (#380, "What needs maintainer sign-off"). When the
+ /// owner signs one off, its row becomes verified and its name leaves this list.</summary>
+ static readonly string[] AwaitingSignOff = { "first_new_yishuv" };
static readonly string[] SensitivePhotos =
{ "altalena", "bernadotte_assassination", "operation_hiram", "operation_horev", "operation_yoav", "ten_days" };
@@ -29,7 +31,7 @@ public class EventImageMappingTests
public void TheMappingIsSoundAgainstTheContent()
{
var rows = Rows;
- Assert.AreEqual(24, rows.Count);
+ Assert.AreEqual(25, rows.Count); // first_new_yishuv's photograph came with #380
CollectionAssert.IsEmpty(EventImageMapping.Problems(rows, C));
CollectionAssert.AreEquivalent(C.Events.Select(e => e.Id).Except(Fallback), rows.Select(r => r.Event), "every event but the fallbacks has a picture");
CollectionAssert.AreEquivalent(SensitivePhotos, rows.Where(r => r.Sensitive).Select(r => r.Event), "the owner's sensitive list");
@@ -137,7 +139,8 @@ public class EventImageMappingTests
Assert.AreEqual(r.Licence, Get(rule!, "licence"), glob);
Assert.AreEqual(r.Commons, Get(rule!, "source"), glob);
Assert.AreEqual(r.Credit, Get(rule!, "credit"), glob);
- Assert.AreEqual("verified", Get(rule!, "status"), glob); // the owner's sign-off of 2026-10-11 (docs/event-images.md)
+ // The owner's sign-off of 2026-10-11 (docs/event-images.md) covers every picture but the ones still waiting for it.
+ Assert.AreEqual(AwaitingSignOff.Contains(r.Event) ? "owner-verify" : "verified", Get(rule!, "status"), glob);
Assert.AreEqual("graded and cropped", Get(rule!, "adapted"), glob);
if (r.Sensitive) StringAssert.Contains("sensitivity review", Get(rule!, "note"), glob);
}
diff --git a/unity/Assets/Tests/EditMode/HebrewUiTests.cs b/unity/Assets/Tests/EditMode/HebrewUiTests.cs
index f3de894cc..9610fa13b 100644
--- a/unity/Assets/Tests/EditMode/HebrewUiTests.cs
+++ b/unity/Assets/Tests/EditMode/HebrewUiTests.cs
@@ -215,7 +215,7 @@ public class HebrewUiTests
("loading", "boot.loading"),
("meter-treasury/meter-name", "hud.caption.treasury"), ("meter-immigration/meter-name", "hud.caption.immigration"),
("meter-security/meter-name", "hud.caption.security"), ("meter-support/meter-name", "hud.caption.support"),
- ("meter-standing/meter-name", "hud.caption.standing"), ("meter-fx/meter-name", "hud.caption.fx"),
+ ("meter-cohesion/meter-name", "hud.caption.cohesion"), ("meter-standing/meter-name", "hud.caption.standing"), ("meter-fx/meter-name", "hud.caption.fx"),
("nav-cabinet", "hud.nav.cabinet"), ("nav-budget", "hud.nav.budget"), ("nav-defence", "hud.nav.defence"),
("nav-why", "hud.nav.why"), ("new-game", "hud.new_game"), ("end-turn", "hud.end_turn"),
("event-draft", "event.draft"),
diff --git a/unity/Assets/Tests/EditMode/HudTests.cs b/unity/Assets/Tests/EditMode/HudTests.cs
index 815f6ee68..f158945bd 100644
--- a/unity/Assets/Tests/EditMode/HudTests.cs
+++ b/unity/Assets/Tests/EditMode/HudTests.cs
@@ -153,6 +153,55 @@ public class HudTests
Assert.AreEqual("Score 150", label.text);
}
+ // ---- Social cohesion (#380): a resource meter, only in the GDD loop, from GameState.Cohesion ----
+
+ /// <summary>The owner's ruling of 15 October 2026 (#380): Social cohesion on the top bar as a resource meter, in the GDD
+ /// loop. Its value is GameState.Cohesion (R-CITY-005) on the 0-100 scale, as the other 0..1 meters; after a turn it
+ /// shows the change, and its tooltip says both, under the caption the bar shows (Hebrew: לכידות חברתית).</summary>
+ [Test]
+ public void TheGddGameShowsSocialCohesion()
+ {
+ using var ui = new UiTestKit();
+ var bridge = GddBridge();
+ using var hud = new HudPresenter(ui.Root, bridge, Text);
+ var meter = ui.Q<VisualElement>("meter-cohesion");
+ Assert.AreEqual(DisplayStyle.Flex, meter.style.display.value, "shown in the GDD loop");
+ Assert.AreEqual("Social cohesion", meter.Q<Label>(className: "meter-name").text);
+ Assert.AreEqual("rings", meter.Q<UiIcon>().Glyph);
+ Assert.Greater(bridge.State.Cohesion, 0.0, "precondition: the cities have set it at the start");
+ Assert.AreEqual(PlayerText.Percent(bridge.State.Cohesion), ui.Q<Label>("cohesion-value").text);
+ Assert.AreEqual("", ui.Q<Label>("cohesion-delta").text, "no change before the first turn");
+ Assert.AreEqual($"Social cohesion: {PlayerText.Percent(bridge.State.Cohesion)}", meter.tooltip);
+ bridge.EndTurn();
+ var prev = bridge.Session.Previous!; var now = bridge.State;
+ now.Cohesion = 0.634; prev.Cohesion = 0.584; // 58% -> 63%: up 5 points
+ hud.Render();
+ Assert.AreEqual("63%", ui.Q<Label>("cohesion-value").text);
+ Assert.AreEqual("+5%", ui.Q<Label>("cohesion-delta").text);
+ Assert.IsTrue(ui.Q<Label>("cohesion-delta").ClassListContains("delta-up"));
+ Assert.AreEqual("Social cohesion: 63%, up 5 points since last turn", meter.tooltip);
+ now.Cohesion = 0.574; // 58% -> 57%: down 1 point
+ hud.Render();
+ Assert.AreEqual("-1%", ui.Q<Label>("cohesion-delta").text);
+ Assert.IsTrue(ui.Q<Label>("cohesion-delta").ClassListContains("delta-down"));
+ Assert.AreEqual("Social cohesion: 57%, down 1 point since last turn", meter.tooltip);
+ using var heUi = new UiTestKit();
+ using var heHud = new HudPresenter(heUi.Root, GddBridge(), He);
+ Assert.AreEqual("לכידות חברתית", heUi.Q<VisualElement>("meter-cohesion").Q<Label>(className: "meter-name").text);
+ StringAssert.StartsWith("לכידות חברתית: ", heUi.Q<VisualElement>("meter-cohesion").tooltip);
+ }
+
+ /// <summary>The legacy loop has no Social cohesion (its cities do not exist): the meter is hidden, as the score is.</summary>
+ [Test]
+ public void TheLegacyLoopShowsNoSocialCohesion()
+ {
+ SimBridge LegacyBridge() => new SimBridge(GameSession.New(SimBridgeGddTests.Legacy, GoldenRun.Seed, Mode.Historical), Text);
+ using var ui = new UiTestKit();
+ using var hud = new HudPresenter(ui.Root, LegacyBridge(), Text);
+ Assert.AreEqual(DisplayStyle.None, ui.Q<VisualElement>("meter-cohesion").style.display.value);
+ Assert.AreEqual("", ui.Q<Label>("cohesion-value").text);
+ }
+
[Test]
public void EndTurnAdvancesTheGameAndShowsChanges()
{
@@ -596,7 +645,7 @@ public class HudTests
Assert.AreEqual(1, m.Security.Sign);
}
- static readonly string[] MeterIds = { "treasury", "immigration", "security", "support", "standing", "fx" };
+ static readonly string[] MeterIds = { "treasury", "immigration", "security", "support", "cohesion", "standing", "fx" };
static string Inv(System.FormattableString f) => System.FormattableString.Invariant(f);
static UiText He => UiText.Parse(AssetDatabase.LoadAssetAtPath<TextAsset>(UiPaths.Strings.Replace("strings.en.yaml", "strings.he.yaml")).text, "strings.he.yaml");
diff --git a/unity/Assets/Tests/EditMode/PromoHudTests.cs b/unity/Assets/Tests/EditMode/PromoHudTests.cs
index 28f880ba2..8439e50eb 100644
--- a/unity/Assets/Tests/EditMode/PromoHudTests.cs
+++ b/unity/Assets/Tests/EditMode/PromoHudTests.cs
@@ -25,7 +25,7 @@ public class PromoHudTests
{
using var ui = new UiTestKit();
foreach (var (meter, glyph) in new[] { ("meter-treasury", "coin"), ("meter-immigration", "people"), ("meter-security", "shield"),
- ("meter-support", "crowd"), ("meter-standing", "globe"), ("meter-fx", "banknote") })
+ ("meter-support", "crowd"), ("meter-cohesion", "rings"), ("meter-standing", "globe"), ("meter-fx", "banknote") })
{
var icon = ui.Q<VisualElement>(meter).Q<UiIcon>();
Assert.IsNotNull(icon, meter);
@@ -144,12 +144,16 @@ public class PromoHudTests
// tier starts that much narrower (part 3): 16:10 and 4:3 now keep the one-row bar with its icons; 5:4 the stacked bar
// with them. At 1024x768 the owner's text floor (#624) raises the small text to 20 px, and the bar takes the stacked
// tier without icons (HudPresenter.FloorGrowth).
- foreach (var (w, h, icons, narrow, twoRow, threeRow) in new[] { (1920, 1080, true, false, false, false), (1280, 720, true, false, false, false),
- (1366, 768, true, false, false, false), (1760, 1000, true, false, false, false),
+ // Social cohesion made seven meters (#380); the owner chose "tighten and re-tier" (16 October 2026). Only these rows
+ // moved, each to the tier the seven meters' measured widths need (HudPresenter's notes): 1280x720 and 1366x768 (the
+ // floor raises their captions to 18 and 17 px), 1920x1200 and 1440x900 (16:10) take the stacked bar with its icons;
+ // 1280x1024 (5:4) drops them; 1024x1024 (square) takes two rows. Every fit assert below is unchanged.
+ foreach (var (w, h, icons, narrow, twoRow, threeRow) in new[] { (1920, 1080, true, false, false, false), (1280, 720, true, true, false, false),
+ (1366, 768, true, true, false, false), (1760, 1000, true, false, false, false),
(2560, 1080, true, false, false, false),
- (1920, 1200, true, false, false, false), (1440, 900, true, false, false, false),
- (1024, 768, false, true, false, false), (1280, 1024, true, true, false, false),
- (1024, 1024, false, true, false, false), (960, 1080, false, true, true, false),
+ (1920, 1200, true, true, false, false), (1440, 900, true, true, false, false),
+ (1024, 768, false, true, false, false), (1280, 1024, false, true, false, false),
+ (1024, 1024, false, true, true, false), (960, 1080, false, true, true, false),
(800, 1000, false, true, true, false), (390, 844, false, true, true, true) })
{
var rt = new RenderTexture(w, h, 0);
@@ -172,6 +176,17 @@ public class PromoHudTests
hud = new HudPresenter(root, bridge, Text);
bridge.EndTurn(); // real changes on every meter that moved
for (int i = 0; i < 6; i++) yield return null;
+ if (threeRow)
+ {
+ // #380 (a consequence of the owner's "tighten + re-tier", 16 October 2026): a phone's seven meters take two lines with the turn-1 values
+ // too, so the bar's second meter line is never an empty band. A line's meters share their centre (.meters
+ // align-items: center); their tops differ with their captions' lines.
+ // (Within a line the centres can differ by a pixel: review of #831, so lines are 3 px apart or more.)
+ var centres = root.Q("meters").Children().Where(m => m.resolvedStyle.display != DisplayStyle.None)
+ .Select(m => m.worldBound.center.y).OrderBy(y => y).ToList();
+ var lines = 1 + centres.Zip(centres.Skip(1), (a, b) => b - a).Count(d => d > 3f);
+ Assert.AreEqual(2, lines, $"{w}x{h}: the meters' lines with the turn-1 values");
+ }
if ((w, h) == (1920, 1080) || (w, h) == (2560, 1080))
{
// Review P1: with typical (turn-1) values at 16:9, and at 21:9 (#398), the bar has room for the promo's sizes.
@@ -187,11 +202,11 @@ public class PromoHudTests
}
// The widest realistic changes, formatted as HudModel formats them, and the widest date line.
foreach (var (name, delta) in new[] { ("treasury", PlayerText.MoneyChange(C, "treasury", -12.4)), ("immigration", Text.Format("hud.delta_people", 12345.0)),
- ("security", "-10%"), ("support", "-10%"), ("standing", "+10%"), ("fx", PlayerText.MoneyChange(C, "fx_reserves", 12.5)) })
+ ("security", "-10%"), ("support", "-10%"), ("cohesion", "-10%"), ("standing", "+10%"), ("fx", PlayerText.MoneyChange(C, "fx_reserves", 12.5)) })
root.Q<Label>(name + "-delta").text = delta;
// ... and the widest late-game values (review N7).
foreach (var (name, value) in new[] { ("treasury", PlayerText.Money(C, "treasury", -123.4)), ("immigration", Text.Format("hud.people", 123456.0)),
- ("fx", PlayerText.Money(C, "fx_reserves", 123.4)), ("security", "100%"), ("support", "100%"), ("standing", "100%") })
+ ("fx", PlayerText.Money(C, "fx_reserves", 123.4)), ("security", "100%"), ("support", "100%"), ("cohesion", "100%"), ("standing", "100%") })
root.Q<Label>(name + "-value").text = value;
root.Q<Label>("security-level").text = Text.Format("hud.level", 5);
root.Q<Label>("turn").text = Text.Format("hud.turn", 120);
@@ -237,6 +252,18 @@ public class PromoHudTests
var used = meters[meters.Count - 1].worldBound.xMax - meters[0].worldBound.xMin;
var limit = twoRow ? barRect.xMax - 14f : root.Q("nav").worldBound.xMin;
Assert.GreaterOrEqual(limit - meters[meters.Count - 1].worldBound.xMax, 0.05f * used, $"{where}: the meters use {used:0} of {limit - meters[0].worldBound.xMin:0} px");
+ // On a phone the meters wrap into quarters (#380), so the rule above holds by construction there: each meter's
+ // labels keep 5% of its own quarter free instead (review of #831).
+ if (threeRow)
+ foreach (var m in meters.Where(m => m.resolvedStyle.display != DisplayStyle.None))
+ foreach (var l in m.Query<Label>().ToList().Where(l => !string.IsNullOrEmpty(l.text)))
+ {
+ // The text's own width (a caption's box stretches to its column), at most its box (a wrapped caption).
+ var natural = l.MeasureTextSize(l.text, 0, VisualElement.MeasureMode.Undefined, 0, VisualElement.MeasureMode.Undefined).x;
+ var right = l.worldBound.xMin + Mathf.Min(natural, l.worldBound.width);
+ Assert.LessOrEqual(right, m.worldBound.xMax - 0.05f * m.worldBound.width,
+ $"{where}: '{l.text}' ends at {right:0} and leaves less than 5% of {m.name} {m.worldBound}");
+ }
// Review P2: every screen button's caption fits its button (an icon-only button draws no caption: part 3).
foreach (var nb in root.Q("nav").Query<Button>().ToList().Where(b => b.resolvedStyle.color.a > 0.01f))
{
diff --git a/unity/Assets/Tests/EditMode/TopBarTests.cs b/unity/Assets/Tests/EditMode/TopBarTests.cs
index 4cdc38864..5a8a1ad01 100644
--- a/unity/Assets/Tests/EditMode/TopBarTests.cs
+++ b/unity/Assets/Tests/EditMode/TopBarTests.cs
@@ -37,14 +37,19 @@ public class TopBarTests
/// run), so 5:4 takes the stacked bar with its icons. (With the edge moved back to 1612, the one-row bar still fit at
/// 1635: the edge's place between 5:4 and 4:3 is a margin, not a measured limit.) A 4:3 window as large as 1600x1200
/// keeps the one-row bar; at 1024x768 the owner's text floor (TheBarsSmallTextKeepsTheFloorOnScreen) raises the small text
- /// to 20 px, which takes the stacked bar without icons (HudPresenter.FloorGrowth).</summary>
+ /// to 20 px, which takes the stacked bar without icons (HudPresenter.FloorGrowth).
+ /// Social cohesion made seven meters (#380), and the owner chose "tighten and re-tier" (16 October 2026): the one-row edge
+ /// moved to NarrowBelowPx 1860, so 1389x1024, 1600x1200 (4:3) and 1360x1024 now take the stacked bar (only those three
+ /// flags changed), and 1813x1080 (1865 logical, one row) and 1794x1080 (1855, stacked) hold the new edge.</summary>
static readonly (int w, int h, bool oneRow)[] Boundary =
- { (1315, 1024, false), (1317, 1024, false), (1389, 1024, true), (1280, 1024, false), (1600, 1200, true), (1024, 768, false),
- (1360, 1024, true), (1350, 1024, false), (1024, 1024, false) };
+ { (1315, 1024, false), (1317, 1024, false), (1389, 1024, false), (1280, 1024, false), (1600, 1200, false), (1024, 768, false),
+ (1360, 1024, false), (1350, 1024, false), (1024, 1024, false), (1813, 1080, true), (1794, 1080, false) };
/// <summary>The 16:9 windows, promo 03's frame shape. (21:9 is drawn larger: the panel scales by the plain mean of the two
- /// ratios, so a 2560x1080 window has 926 panel rows; its share is logged, not pinned.)</summary>
- static readonly (int w, int h)[] PromoShapes = { (1920, 1080), (1280, 720), (1366, 768) };
+ /// ratios, so a 2560x1080 window has 926 panel rows; its share is logged, not pinned.) With seven meters (#380; the owner's
+ /// "tighten and re-tier", 16 October 2026) only 1920x1080 keeps the one-row bar: at 1280x720 and 1366x768 the text floor
+ /// raises the captions to 18 and 17 px, and those windows take the stacked bar (PromoHudTests pins their tier).</summary>
+ static readonly (int w, int h)[] PromoShapes = { (1920, 1080) };
/// <summary>The real Game.uxml on the real PanelSettings at w x h, in English or Hebrew, as the game builds it: the bar laid
/// out (the loading screen) before the HUD is made, a turn played, then the widest values, changes and date, and a
@@ -90,10 +95,10 @@ public class TopBarTests
if (widest)
{
foreach (var (name, delta) in new[] { ("treasury", PlayerText.MoneyChange(C, "treasury", -12.4)), ("immigration", text.Format("hud.delta_people", 12345.0)),
- ("security", "-10%"), ("support", "-10%"), ("standing", "+10%"), ("fx", PlayerText.MoneyChange(C, "fx_reserves", 12.5)) })
+ ("security", "-10%"), ("support", "-10%"), ("cohesion", "-10%"), ("standing", "+10%"), ("fx", PlayerText.MoneyChange(C, "fx_reserves", 12.5)) })
root.Q<Label>(name + "-delta").text = delta;
foreach (var (name, value) in new[] { ("treasury", PlayerText.Money(C, "treasury", -123.4)), ("immigration", text.Format("hud.people", 123456.0)),
- ("fx", PlayerText.Money(C, "fx_reserves", 123.4)), ("security", "100%"), ("support", "100%"), ("standing", "100%") })
+ ("fx", PlayerText.Money(C, "fx_reserves", 123.4)), ("security", "100%"), ("support", "100%"), ("cohesion", "100%"), ("standing", "100%") })
root.Q<Label>(name + "-value").text = value;
root.Q<Label>("security-level").text = text.Format("hud.level", 5);
root.Q<Label>("turn").text = text.Format("hud.turn", 120);
@@ -381,7 +386,7 @@ public class TopBarTests
labels.Add(root.Q<Label>("attention")); // the captions' query also holds security-level (class meter-name)
labels.Add(root.Q<Label>("turn")); labels.Add(root.Q<Label>("date")); // the plate's date line
labels = labels.Distinct().ToList();
- if (labels.Count != 10) problems.Add($"{at}: precondition: 10 small labels, found {labels.Count}");
+ if (labels.Count != 11) problems.Add($"{at}: precondition: 11 small labels (Social cohesion's caption with #380), found {labels.Count}");
foreach (var l in labels)
{
if (string.IsNullOrEmpty(l.text) || !(l.worldBound.height > 0)) { problems.Add($"{at}: precondition: {l.name} '{l.text}' shows"); continue; }
diff --git a/unity/Assets/Tests/EditMode/UiFoundationTests.cs b/unity/Assets/Tests/EditMode/UiFoundationTests.cs
index 95b75ba49..4ba0bb9b5 100644
--- a/unity/Assets/Tests/EditMode/UiFoundationTests.cs
+++ b/unity/Assets/Tests/EditMode/UiFoundationTests.cs
@@ -35,7 +35,7 @@ public class UiFoundationTests
using var ui = new UiTestKit();
foreach (var name in new[] { "top-bar", "event-card", "info-panel", "minimap", "screen-cabinet", "screen-budget", "screen-defence", "screen-why", "toast" })
ui.Q<VisualElement>(name);
- foreach (var name in new[] { "treasury", "immigration", "security", "support", "standing", "fx" })
+ foreach (var name in new[] { "treasury", "immigration", "security", "support", "cohesion", "standing", "fx" })
{
ui.Q<Label>(name + "-value");
ui.Q<Label>(name + "-delta");
diff --git a/unity/Assets/Tests/EditMode/UiLayoutTests.cs b/unity/Assets/Tests/EditMode/UiLayoutTests.cs
index f4c35e4d1..34baeb024 100644
--- a/unity/Assets/Tests/EditMode/UiLayoutTests.cs
+++ b/unity/Assets/Tests/EditMode/UiLayoutTests.cs
@@ -488,6 +488,8 @@ public class UiLayoutTests
var g = GameSession.New(C, GoldenRun.Seed, Mode.Historical);
g.State.Date = e.From; // the text names the office holders of the event's own time
g.State.PendingEvents.Clear(); g.State.PendingEvents.Add(e.Id);
+ // An objective card shows its line under the text (#380), at its longest (completed early, both dates).
+ if (e.Objective != "") g.State.Objectives[e.Objective] = new System.DateTime(1948, 11, 30);
bridge.Replace(g);
for (int i = 0; i < 4; i++) yield return null; // the fourth: a photograph dropped for height settles
CheckPhoto($"{w}x{h}: {e.Id}", root, card, problems);
diff --git a/unity/Assets/UI/EventImages/event-images.yaml b/unity/Assets/UI/EventImages/event-images.yaml
index 761721cc5..d02f4327d 100644
--- a/unity/Assets/UI/EventImages/event-images.yaml
+++ b/unity/Assets/UI/EventImages/event-images.yaml
@@ -342,3 +342,17 @@ images:
sensitive: false
sensitivity_reviewed: false
note: "US federal work (Abbie Rowe, National Park Service photographer at the White House), public domain in the US."
+ - event: first_new_yishuv
+ file: first_new_yishuv.jpg
+ commons: "https://commons.wikimedia.org/wiki/File:Mefalsim_(997009452698205171.jpg"
+ original: "https://upload.wikimedia.org/wikipedia/commons/e/e3/Mefalsim_%28997009452698205171.jpg"
+ sha1: f4d82b8f08f810081145eec13d24ac09f672873f
+ original_size: [1528, 1566]
+ licence: CC-BY-4.0
+ artist: "Boris Carmi"
+ credit: "Boris Carmi / Meitar Collection / National Library of Israel / The Pritzker Family National Photography Collection · CC BY 4.0 · graded and cropped"
+ alt: "Two men put up a barbed-wire fence on open ground in the first days of Kibbutz Mefalsim, June 1949."
+ crop: [0.5, 0.53, 1.0]
+ sensitive: false
+ sensitivity_reviewed: false
+ note: "The GDD objective card (content/events/first_new_yishuv.yaml; #380). NLI title 'ימיו הראשונים של קיבוץ מפלסים' (the first days of kibbutz Mefalsim), dated June 1949, the founding month (research_notes/GDD objectives/designated-site-1.md). Two unnamed men at work; nothing graphic. Licence, artist, credit and SHA-1 read through the Commons API on 2026-10-16."
diff --git a/unity/Assets/UI/EventImages/first_new_yishuv.jpg b/unity/Assets/UI/EventImages/first_new_yishuv.jpg
new file mode 100644
index 000000000..a81213e1a
Binary files /dev/null and b/unity/Assets/UI/EventImages/first_new_yishuv.jpg differ
diff --git a/unity/Assets/UI/EventImages/first_new_yishuv.jpg.meta b/unity/Assets/UI/EventImages/first_new_yishuv.jpg.meta
new file mode 100644
index 000000000..4d914f2d9
--- /dev/null
+++ b/unity/Assets/UI/EventImages/first_new_yishuv.jpg.meta
@@ -0,0 +1,130 @@
+fileFormatVersion: 2
+guid: 8622975d7ac09487890f20fcc50bc45f
+TextureImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 13
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ flipGreenChannel: 0
+ isReadable: 0
+ streamingMipmaps: 0
+ streamingMipmapsPriority: 0
+ vTOnly: 0
+ ignoreMipmapLimit: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 1024
+ textureSettings:
+ serializedVersion: 2
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapU: 1
+ wrapV: 1
+ wrapW: 1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 0
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 0
+ spriteTessellationDetail: -1
+ textureType: 0
+ textureShape: 1
+ singleChannelComponent: 0
+ flipbookRows: 1
+ flipbookColumns: 1
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ ignorePngGamma: 0
+ applyGammaDecoding: 0
+ swizzle: 50462976
+ cookieLightType: 0
+ platformSettings:
+ - serializedVersion: 4
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 1024
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 75
+ crunchedCompression: 1
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 4
+ buildTarget: Standalone
+ maxTextureSize: 1024
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 75
+ crunchedCompression: 1
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 4
+ buildTarget: WebGL
+ maxTextureSize: 1024
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 75
+ crunchedCompression: 1
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ customData:
+ physicsShape: []
+ bones: []
+ spriteID:
+ internalID: 0
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ secondaryTextures: []
+ spriteCustomMetadata:
+ entries: []
+ nameFileIdTable: {}
+ mipmapLimitGroupName:
+ pSDRemoveMatte: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/unity/Assets/UI/Game.uxml b/unity/Assets/UI/Game.uxml
index b4e0e2bfe..c19a6699d 100644
--- a/unity/Assets/UI/Game.uxml
+++ b/unity/Assets/UI/Game.uxml
@@ -65,6 +65,14 @@
<ui:VisualElement class="meter-row"><ui:Label name="support-value" class="meter-value" /><ui:Label name="support-delta" class="meter-delta" /></ui:VisualElement>
</ui:VisualElement>
</ui:VisualElement>
+ <!-- Social cohesion (#380): shown only in the GDD loop (HudModel.ShowsCohesion). -->
+ <ui:VisualElement name="meter-cohesion" class="meter">
+ <Statecraft.Game.UI.UiIcon glyph="rings" class="meter-icon" />
+ <ui:VisualElement class="meter-body">
+ <ui:Label text="Social cohesion" class="meter-name" />
+ <ui:VisualElement class="meter-row"><ui:Label name="cohesion-value" class="meter-value" /><ui:Label name="cohesion-delta" class="meter-delta" /></ui:VisualElement>
+ </ui:VisualElement>
+ </ui:VisualElement>
<ui:VisualElement name="meter-standing" class="meter">
<Statecraft.Game.UI.UiIcon glyph="globe" class="meter-icon" />
<ui:VisualElement class="meter-body">
@@ -157,7 +165,7 @@
</ui:VisualElement>
</ui:VisualElement>
<ui:VisualElement class="gold-rule" />
- <ui:ScrollView name="event-scroll" class="event-scroll"><ui:Label name="event-text" class="event-text" /></ui:ScrollView>
+ <ui:ScrollView name="event-scroll" class="event-scroll"><ui:Label name="event-text" class="event-text" /><ui:Label name="event-objective" class="muted event-objective" /></ui:ScrollView>
<ui:VisualElement name="event-options" />
<!-- The count of other open decisions, and Hide: the card collapses to "Decision waiting" so the map can be
inspected (EventCardPresenter.Collapse); focus order: the options, then Hide. -->
diff --git a/unity/Assets/UI/Statecraft.uss b/unity/Assets/UI/Statecraft.uss
index c792bb045..ded1c03e5 100644
--- a/unity/Assets/UI/Statecraft.uss
+++ b/unity/Assets/UI/Statecraft.uss
@@ -96,8 +96,10 @@ Button:disabled { color: var(--ink-dim); border-color: rgba(120, 120, 120, 0.4);
.date-row Label { font-size: 15px; margin-right: 8px; }
.year { -unity-font-definition: url("project://database/Assets/UI/Fonts/EBGaramond-SemiBold.ttf"); font-size: 27px; color: var(--ink); }
.meters { flex-direction: row; flex-grow: 1; align-items: center; }
+/* Seven meters with Social cohesion (#380): the owner chose "tighten and re-tier" (16 October 2026), so each meter's
+ sides are 6 px narrower than the six meters' 7 and 6 px, here, on the stacked bar and in Hebrew. */
.meter {
- flex-direction: row; align-items: center; min-width: 130px; flex-shrink: 1; padding: 0 7px 0 6px;
+ flex-direction: row; align-items: center; min-width: 130px; flex-shrink: 1; padding: 0 4px 0 3px;
border-right-width: 1px; border-color: rgba(196, 160, 92, 0.25);
}
/* The icon gives way first in a narrow window (down to 26px), so the caption keeps its line. */
@@ -149,7 +151,7 @@ Button:disabled { color: var(--ink-dim); border-color: rgba(120, 120, 120, 0.4);
change under the value, so no change runs into its neighbour; the panels below the bar move down with it. */
.hud-narrow .top-bar { height: 124px; }
.hud-narrow .right-column, .hud-narrow .left-column, .hud-narrow .event-gutter, .hud-narrow .event-layer, .hud-narrow .screen, .hud-narrow .toast { top: 140px; }
-.hud-narrow .meter { min-width: 96px; padding: 0 6px; }
+.hud-narrow .meter { min-width: 96px; padding: 0 3px; }
.hud-narrow .meter-row { flex-direction: column; align-items: flex-start; }
.hud-narrow .meter-value { font-size: 22px; }
.hud-narrow .meter-delta { margin-left: 0; font-size: 15px; }
@@ -158,11 +160,25 @@ Button:disabled { color: var(--ink-dim); border-color: rgba(120, 120, 120, 0.4);
.hud-two-row .top-bar { height: 216px; padding-top: 6px; padding-bottom: 4px; flex-wrap: wrap; justify-content: space-between; align-content: space-around; }
.hud-two-row .meters { width: 78%; flex-grow: 1; }
.hud-two-row .right-column, .hud-two-row .left-column, .hud-two-row .event-gutter, .hud-two-row .event-layer, .hud-two-row .screen, .hud-two-row .toast { top: 232px; }
+/* #380's re-tier gives a square window (1024x1024) the two-row bar: the event layer keeps the 92 px the bar grew by free at its
+ bottom (padding: the backdrop still reaches the window's bottom), so the centred card stays where the stacked bar left it,
+ clear of the map's border label (review B1 of #831; ArmisticeTests). */
+.hud-two-row .event-layer { padding-bottom: 92px; }
/* Narrower still (a phone upright; HudPresenter adds hud-three-row with hud-two-row): the badge, the meters and the
- screen buttons with End Turn take a row each, and the panels move down under the taller bar (#210). */
-.hud-three-row .top-bar { height: 312px; }
-.hud-three-row .meters { width: 100%; }
-.hud-three-row .right-column, .hud-three-row .left-column, .hud-three-row .event-gutter, .hud-three-row .event-layer, .hud-three-row .screen, .hud-three-row .toast { top: 328px; }
+ screen buttons with End Turn take a row each, and the panels move down under the taller bar (#210). Seven meters do not
+ fit a phone's width with the widest values (#380): they wrap to two lines (a consequence of the owner's "tighten + re-tier", 16 October 2026), and the bar is a meter line
+ (96 px) taller than the six meters' 312 px. */
+.hud-three-row .top-bar { height: 408px; }
+.hud-three-row .meters { width: 100%; flex-wrap: wrap; }
+/* Each meter a quarter of the row, so the seven always take two lines (four, then three) and the bar's second line is
+ never an empty band (a phone's turn-1 values would otherwise fit one line). A quarter (~190 px) is wider than the widest
+ meter there (~154 px). */
+.hud-three-row .meter { flex-basis: 25%; flex-grow: 0; flex-shrink: 0; }
+.hud-three-row .right-column, .hud-three-row .left-column, .hud-three-row .event-gutter, .hud-three-row .event-layer, .hud-three-row .screen, .hud-three-row .toast { top: 424px; }
+/* The event layer keeps the same 96 px free at its bottom (padding, so its backdrop still reaches the window's bottom:
+ DecisionCardTests.TheBackdropReachesTheWindowsEdgesAtEveryTier), so the centred card stays where the six meters left it,
+ clear of the map's border label above the minimap (ArmisticeTests.TheLongestMapLabelFitsBesideTheEventCard). */
+.hud-three-row .event-layer { padding-bottom: 96px; }
.turn-box { width: 150px; flex-shrink: 1; min-width: 150px; align-items: flex-end; }
#attention { font-size: 15px; } /* the audit's floor (H4): 15 px in the stylesheet */
.end-turn {
@@ -272,6 +288,8 @@ Button:disabled { color: var(--ink-dim); border-color: rgba(120, 120, 120, 0.4);
.event-option { min-height: 42px; padding: 5px 12px 5px 46px; margin: 3px 0; border-color: rgba(196, 160, 92, 0.6); }
.event-title { -unity-text-align: middle-center; margin-bottom: 4px; white-space: normal; font-size: 28px; } /* centred, as before, in the card */
.event-text { white-space: normal; margin-bottom: 8px; }
+/* An objective card's line under its text (#380): when it was completed against history. */
+.event-objective { white-space: normal; margin-bottom: 8px; }
.draft { display: none; color: var(--down); -unity-font-definition: url("project://database/Assets/UI/Fonts/EBGaramond-SemiBold.ttf"); -unity-text-align: middle-center; }
/* The info panel: the hex's terrain sign (UiIcon on the biome's map colour, InfoPanelPresenter) beside its facts. */
.info-panel { position: absolute; left: 16px; bottom: 16px; width: 520px; min-height: 160px; flex-direction: row; align-items: flex-start; }
@@ -669,7 +687,7 @@ Button:disabled { color: var(--ink-dim); border-color: rgba(120, 120, 120, 0.4);
.lang-he .top-bar { padding: 0 8px 0 14px; }
.lang-he .date-box { margin-right: 0; margin-left: 10px; padding: 0 12px 0 10px; }
.lang-he .date-row Label { margin-right: 0; margin-left: 8px; }
-.lang-he .meter { border-right-width: 0; border-left-width: 1px; padding: 0 6px 0 7px; }
+.lang-he .meter { border-right-width: 0; border-left-width: 1px; padding: 0 3px 0 4px; }
.lang-he .meter-icon { margin-right: 0; margin-left: 5px; }
.lang-he .meter-delta { margin-left: 0; margin-right: 7px; }
.lang-he.hud-narrow .meter-delta { margin-right: 0; }
diff --git a/unity/Assets/UI/strings.en.yaml b/unity/Assets/UI/strings.en.yaml
index 3688b2aaf..94fa9fb01 100644
--- a/unity/Assets/UI/strings.en.yaml
+++ b/unity/Assets/UI/strings.en.yaml
@@ -27,6 +27,8 @@ hud.caption.security: "Security"
hud.caption.support: "Public support"
hud.caption.standing: "International support"
hud.caption.fx: "Foreign currency"
+# Social cohesion (GameState.Cohesion, R-CITY-005), the GDD loop only; the owner's ruling of 15 October 2026 (#380).
+hud.caption.cohesion: "Social cohesion"
# The other static texts of Game.uxml, each set by the presenter that owns its element (#193). Each English string is
# the UXML's own text (HebrewUiTests.EachEnglishStaticTextIsTheUxmlsOwnText), so English shows what it always showed.
# The top bar (HudPresenter):
@@ -64,6 +66,13 @@ event.reopen: "Decision waiting"
event.illustration: "Illustration"
event.photo: "Photograph"
event.ai_label: "AI-generated illustration"
+# An objective card's line under its text (#380), from Objectives.MonthsFromHistory: early, in the same month as history,
+# or later. The owner's wording (#379, 14 October 2026). {0} the completion date, {1} the historical date, {2} months.
+event.objective_early: "Completed on {0}; historically {1}; {2} months early."
+event.objective_early_one: "Completed on {0}; historically {1}; 1 month early."
+event.objective_on_time: "Completed on time, as in history."
+event.objective_late: "Completed {0} months later than in history."
+event.objective_late_one: "Completed 1 month later than in history."
start.listen: "Play the recording"
start.stop: "Stop the recording"
start.loading: "Loading the recording…"
diff --git a/unity/Assets/UI/strings.he.yaml b/unity/Assets/UI/strings.he.yaml
index e5029e2a0..51ab7f682 100644
--- a/unity/Assets/UI/strings.he.yaml
+++ b/unity/Assets/UI/strings.he.yaml
@@ -23,6 +23,8 @@ hud.caption.support: "תמיכה ציבורית"
# hud.caption.standing: International support (#622 decision 3); the owner's Hebrew word for it (Q-HUD-3, 15 October 2026, #375).
hud.caption.standing: "תמיכה בינלאומית"
hud.caption.fx: "מטבע חוץ"
+# hud.caption.cohesion: Social cohesion; the GDD's Hebrew, kept by the owner (Q-HUD-3, 15 October 2026, #375; #380).
+hud.caption.cohesion: "לכידות חברתית"
hud.nav.cabinet: "ממשלה"
hud.nav.budget: "תקציב"
hud.nav.defence: "ביטחון"
@@ -59,6 +61,12 @@ event.reopen: "החלטה ממתינה"
event.illustration: "איור"
event.photo: "תצלום"
event.ai_label: "איור שנוצר בבינה מלאכותית"
+# The objective card's line (#380; the owner's wording, #379): early, on time, later.
+event.objective_early: "הושלם ב־{0}; בהיסטוריה ב־{1}; מוקדם ב־{2} חודשים."
+event.objective_early_one: "הושלם ב־{0}; בהיסטוריה ב־{1}; מוקדם בחודש אחד."
+event.objective_on_time: "הושלם בזמן, כמו בהיסטוריה."
+event.objective_late: "הושלם באיחור של {0} חודשים לעומת ההיסטוריה."
+event.objective_late_one: "הושלם באיחור של חודש אחד לעומת ההיסטוריה."
start.listen: "השמעת ההקלטה"
start.stop: "עצירת ההקלטה"
start.loading: "טוען את ההקלטה…"