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 <noreply@anthropic.com>
This commit is contained in:
soul 2026-11-28 22:42:29 +01:00
commit 85a38ddd0f
2 changed files with 32 additions and 2 deletions

BIN
GameData/Aetheria.cc (Stored with Git LFS)

Binary file not shown.

View file

@ -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<StationKindData>(key) ?? throw new InvalidOperationException($"The catalog holds no station kind '{id}'.");
if (kind.Ring == ring) continue;
kind.Ring = ring;
author.Put(kind, key);
}
}
}