From 82dc3e878dae37d83592cfc1e3fcdfc31ec06278 Mon Sep 17 00:00:00 2001 From: soul Date: Sat, 28 Nov 2026 22:45:34 +0100 Subject: [PATCH] GalaxyProvince.Region: the region index BuildProvinces derives, never persisted StationDeck deals a faction's stations per region; BuildProvinces sets it on generation and on save. Co-Authored-By: Claude Sonnet 5.5 --- Assets/Scripts/ServerShared/Galaxy.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/ServerShared/Galaxy.cs b/Assets/Scripts/ServerShared/Galaxy.cs index adafe7467..600413c8b 100644 --- a/Assets/Scripts/ServerShared/Galaxy.cs +++ b/Assets/Scripts/ServerShared/Galaxy.cs @@ -208,7 +208,7 @@ public class Galaxy for (var place = 0; place < seeds.Length; place++) { var type = types != null && types.TryGetValue(seeds[place], out var saved) && _cache.Get(saved) != null ? saved : hand[place]; - var province = new GalaxyProvince {Seed = Zones[seeds[place]], Type = type, Zones = region.Where(zone => seedOf[zone] == seeds[place]).Select(zone => Zones[zone]).ToArray()}; + var province = new GalaxyProvince {Seed = Zones[seeds[place]], Type = type, Region = region.Key, Zones = region.Where(zone => seedOf[zone] == seeds[place]).Select(zone => Zones[zone]).ToArray()}; foreach (var zone in province.Zones) zone.Province = province; provinces.Add(province); } @@ -703,6 +703,9 @@ public class GalaxyProvince { public GalaxyZone Seed; public CultRecordRef Type; + // The region index Provinces.Regions gives this province's zones: derived by BuildProvinces on generation and on save, never + // persisted. StationDeck deals a faction's stations per region. + public int Region; public GalaxyZone[] Zones; }