Aetheria/tools/AetherDb/Economy/ExtractionKindDescriptions.cs
Nibu ac45a5c836 AetherDb: mining and volatiles descriptions name Diamond and Ammonia; the ExtractionKindDescriptions batch restates them
Every commodity a kind extracts (a recipe with no inputs) is named in that kind's description: checked over the shipped catalog, only these
two kinds broke it. The batch applies in the catalog commit that follows; until then the catalog tests for it fail.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-11 04:35:18 +00:00

24 lines
1.1 KiB
C#

using System;
using GameCult.Caching;
// Economy content, batch 1c: the mining and volatiles station-kind descriptions name every good their kind now extracts.
// MunitionsFeed gave mining a Diamond recipe and volatiles an Ammonia recipe; the descriptions the station-round bench
// wrote predate them. The same text is StationKindsCatalog.Table's, so a catalog authored fresh says the same thing.
// Sets the description whatever it was, so a rerun converges.
public sealed class ExtractionKindDescriptions : EconomyBatch
{
public override void Author(EconomyAuthor author)
{
foreach (var (id, description) in new[]
{
("mining", StationKindsCatalog.DescriptionOf("mining")),
("volatiles", StationKindsCatalog.DescriptionOf("volatiles")),
})
{
var key = StationKindData.KeyOf(id);
var kind = author.Catalog.Get<StationKindData>(key) ?? throw new InvalidOperationException($"The catalog holds no station kind '{id}'.");
kind.Description = description;
author.Put(kind, key);
}
}
}