From 85a38ddd0f03b78f6fdaf154e2f7aa7da71a9bb5 Mon Sep 17 00:00:00 2001 From: soul Date: Sat, 28 Nov 2026 22:42:29 +0100 Subject: [PATCH] StationRings batch: first-draft rings for the nine kinds a faction fields (economy author StationRings apply) mining 0, volatiles 0, agriculture 1, processing 1, fabrication 2, munitions-works 2, depot 3, trade-hub 3, shipyard 3; seven records change, a rerun writes nothing. Aetheria.cc committed with it. Co-Authored-By: Claude Sonnet 5.5 --- GameData/Aetheria.cc | 4 ++-- tools/AetherDb/Economy/StationRings.cs | 30 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 tools/AetherDb/Economy/StationRings.cs diff --git a/GameData/Aetheria.cc b/GameData/Aetheria.cc index 3b66563cd..3f72dd5b4 100644 --- a/GameData/Aetheria.cc +++ b/GameData/Aetheria.cc @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0dae97097ea34d5423bc8876b84fc182223836437fc3103cd77999f5aaac5775 -size 293677 +oid sha256:1aed37638475db36145837d2639b5f1de55260033d6b1094386a2dd9b7e56d37 +size 295057 diff --git a/tools/AetherDb/Economy/StationRings.cs b/tools/AetherDb/Economy/StationRings.cs new file mode 100644 index 000000000..ca1870311 --- /dev/null +++ b/tools/AetherDb/Economy/StationRings.cs @@ -0,0 +1,30 @@ +using System; +using GameCult.Caching; + +// Economy content: which ring of a faction's territory each station kind sits in (aetheria-living-world, cut region-chain-deck; ruling +// demo-chain-spans-the-region). StationDeck places a faction's stations by StationKindData.Ring, 0 at its frontier and higher toward +// its home: raw extraction at the edge, processing and agriculture behind it, fabrication and munitions-works deeper, and the depot, +// trade hub and shipyard at the heart. The rings are first drafts and sim-tuned knobs like prices (ruling +// economy-numbers-are-sim-tuned-knobs). Writes a kind only where its Ring differs, so a rerun touches nothing. +public sealed class StationRings : EconomyBatch +{ + private static readonly (string Kind, int Ring)[] Table = + { + ("mining", 0), ("volatiles", 0), + ("agriculture", 1), ("processing", 1), + ("fabrication", 2), ("munitions-works", 2), + ("depot", 3), ("trade-hub", 3), ("shipyard", 3), + }; + + public override void Author(EconomyAuthor author) + { + foreach (var (id, ring) in Table) + { + var key = StationKindData.KeyOf(id); + var kind = author.Catalog.Get(key) ?? throw new InvalidOperationException($"The catalog holds no station kind '{id}'."); + if (kind.Ring == ring) continue; + kind.Ring = ring; + author.Put(kind, key); + } + } +}